Skip to main content
POST
Create embeddings

リクエストボディ

string
必須
使用するエンベディングモデル(例:text-embedding-3-small、text-embedding-3-large)。
string | string[]
必須
エンベディングするテキスト。単一の文字列または文字列の配列。
string
デフォルト:"float"
エンベディングの形式。floatまたはbase64。
integer
出力エンベディングの次元数(モデルに依存)。

レスポンス

使用例

バッチエンベディング

1回のリクエストで複数のテキストをエンベディングできます:

承認

Authorization
string
header
必須

API key authentication. Pass your OpenModex API key as a Bearer token in the Authorization header: Authorization: Bearer omx_sk_...

ボディ

application/json

Request body for creating embeddings.

model
string
必須

ID of the model to use.

input
必須

Input text to embed. Can be a single string or an array of strings.

encoding_format
enum<string>
デフォルト:float

The format to return the embeddings in.

利用可能なオプション:
float,
base64
dimensions
integer

The number of dimensions the resulting output embeddings should have. Only supported by certain models.

user
string

A unique identifier representing your end-user.

レスポンス

Embedding response.

Response from an embedding request.

object
enum<string>

The object type, always 'list'.

利用可能なオプション:
list
data
object[]

A list of embedding objects.

model
string

The model used to generate the embeddings.

usage
object

Usage statistics for the embedding request.