anoman
Sign InGet API Key
Documentation home

Embeddings.

POST · /v1/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")  # 1536
response = client.embeddings.create(
    model="text-embedding-3-large",
    input=[
        "First document text...",
        "Second document text...",
        "Third document text...",
    ],
)
# response.data is a list of {embedding, index, object}
for item in response.data:
    print(f"#{item.index}: {len(item.embedding)} dims")
curl https://api.anoman.io/v1/embeddings \
  -H "Authorization: Bearer anm-sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "The food was delicious and the waiter was friendly."
  }'

Request body

Parameters

FieldTypeReq?Description
modelstring✓Embedding model slug (/models with category=embedding).
inputstring / array✓Single string or array of up to 2048 strings.
dimensionsinteger—Override embedding dimensions (only some models support this).
encoding_formatstring—"float" (default) or "base64".
userstring—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.

On this page