POST · /v1/embeddings
Embeddings.
OpenAI-compatible embeddings endpoint. Pass-through routing to any embedding model in the catalog.
Quick example
Generate an embedding
from openai import OpenAI
client = OpenAI(base_url="https://api.anoman.io/v1", api_key="anm-sk-...")
response = client.embeddings.create(
model="text-embedding-3-small",
input="The food was delicious and the waiter was friendly.",
)
vector = response.data[0].embedding
print(len(vector), "dimensions") # 1536Request body
Parameters
| Field | Type | Req? | Description |
|---|---|---|---|
| model | string | ✓ | Embedding model slug (/models with category=embedding). |
| input | string / array | ✓ | Single string or array of up to 2048 strings. |
| dimensions | integer | — | Override embedding dimensions (only some models support this). |
| encoding_format | string | — | "float" (default) or "base64". |
| user | string | — | End-user identifier — surfaces in traces. |
200 response
Response shape
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0091, 0.0314, ..., -0.0007]
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 12,
"total_tokens": 12
},
"_anoman": {
"routing": { "region": "id" },
"cost_usd": "0.0000003"
}
}Guardrails
Limited pipeline on embeddings
Embeddings requests skip the prompt injection detector and tool policy enforcement (no tools/messages), but PII masking still applies — text input is scanned and masked per your policy group PII mode before being sent upstream.
The _anoman response extension is present but contains only routing + cost data on this endpoint.
Browse embedding models.
Filter the catalog by category=embedding to see all available options.