POST /v1/embeddings

OpenAI-compatible text embeddings. Anthropic does not expose an embeddings API — calls with Claude models on this endpoint return wrong_endpoint.

Request

{
  "model": "text-embedding-3-small",
  "input": ["the quick brown fox", "lazy dog"]
}

Fields

  • model — string, required. Any embedding model your BYOK provider exposes.
  • input — string or array of strings, required.
  • encoding_formatfloat (default) or base64.
  • dimensions — integer, optional truncation.

Response

{
  "object": "list",
  "model": "text-embedding-3-small",
  "data": [
    {"object": "embedding", "index": 0, "embedding": [0.013, -0.041, ...]},
    {"object": "embedding", "index": 1, "embedding": [0.122,  0.008, ...]}
  ],
  "usage": {"prompt_tokens": 8, "total_tokens": 8}
}