Embeddings
OpenAI-compatible embeddings endpoint.
Authentication modes:
Master key + user field: Use specified user (must exist)
API key + user field: Use specified user (must exist)
API key without user field: Use the shared "default" user
A priced response carries its cost on usage as cost_usd (a six-decimal USD string) and pricing_source, as a chat completion does; an unpriced one carries neither.
Enter your API key here (sent as Otari-Key header).
OpenAI-compatible embedding request.
Input text to embed
What the input will be used for, for providers whose embedding depends on it: Cohere (search_document, search_query, classification, clustering, image) and Voyage (query, document). The provider validates the value. Any other provider answers 400, rather than embedding the input as if the field were absent.
Successful Response
An OpenAI-compatible embeddings response, with the gateway's inline cost on usage.
listValidation Error
POST /api/v1/embeddings HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 105
{
"dimensions": 1,
"encoding_format": "text",
"input": "text",
"input_type": "text",
"model": "text",
"user": "text"
}{
"data": [
{
"embedding": [
1
],
"index": 1,
"object": "embedding"
}
],
"model": "text",
"object": "list",
"usage": {
"cost_usd": "text",
"pricing_source": "text",
"prompt_tokens": 1,
"total_tokens": 1
}
}Last updated
Was this helpful?
