Convert text into dense vector representations for search, clustering, and semantic similarity.
The embeddings endpoint converts text into high-dimensional floating-point vectors. Use them to build semantic search, recommendation systems, document clustering, or any pipeline that needs to compare meaning rather than exact strings.
POST https://opendunes.com/v1/embeddingsThe request and response shape are compatible with the OpenAI embeddings API, so any SDK or library targeting that spec will work without changes.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Embedding model slug, e.g. openai/text-embedding-3-large |
input | string or array | Yes | Text to embed. Pass a string for a single input or an array of strings for batch embedding. |
encoding_format | string | No | "float" (default) or "base64" |
dimensions | integer | No | Truncate output vectors to this many dimensions (model-dependent) |
{
"model": "openai/text-embedding-3-large",
"input": ["Algiers is the capital of Algeria.", "Oran is a coastal city."]
}{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0089, 0.0412, "..."]
},
{
"object": "embedding",
"index": 1,
"embedding": [0.0105, -0.0034, 0.0298, "..."]
}
],
"model": "openai/text-embedding-3-large",
"usage": {
"prompt_tokens": 14,
"total_tokens": 14
}
}Results appear in the same order as your input array. The usage.prompt_tokens count covers all inputs combined.
Embeddings are billed at the model's input token rate in DA, deducted from your balance the same way as chat completions. The X-Balance-Available header reports your remaining balance after each request.
Filter the model catalog for embedding-capable models at /models?capability=embeddings or via the API:
GET /api/models?capability=embeddings