Endpoint
POST https://api.inquantum.ai/v1/embeddings
Request
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Embedding model. A provider prefix selects a provider explicitly. |
input | string or string[] | Yes | One input string or a batch of strings. |
encoding_format | string | No | Output encoding supported by the selected model. |
dimensions | integer | No | Requested dimensions for models that support it. |
user | string | No | End-user identifier stored with request attribution. |
curl https://api.inquantum.ai/v1/embeddings \
-H "Authorization: Bearer $PLANCK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-small",
"input": ["first document", "second document"]
}'
Response
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.0123, -0.0456],
"index": 0
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}