Skip to content

Create embeddings (OpenAI-compatible)

POST
/oai/v1/embeddings
curl --request POST \
--url https://dashboard.quantcdn.io/oai/v1/embeddings \
--header 'Content-Type: application/json' \
--data '{ "model": "amazon.titan-embed-text-v2:0", "input": "example" }'

Drop-in replacement for OpenAI’s POST /v1/embeddings. Accepts a single string or an array of strings in input and returns a list of embedding objects.

Media typeapplication/json
object
model
required
string
Example
amazon.titan-embed-text-v2:0
input
required

A string or array of strings to embed

A list of embedding objects

Media typeapplication/json
object
object
string
data
Array<object>
object
object
string
index
integer
embedding
Array<number>
model
string
usage
object
prompt_tokens
integer
total_tokens
integer
Example
{
"object": "list",
"data": [
{
"object": "embedding"
}
]
}

Missing or invalid API key

Token not scoped to an organisation, or org lacks AI access