v1

latestOpenAPI 3.0.32026-07-26172157253.6 KB
Client

Generate embeddings (deprecated)

Deprecated compatibility proxy. New integrations should call https://openrouter.ai/api/v1/embeddings directly with the provisioned OpenRouter key.

post/api/ai/embeddings

Request body

modelstring required

Embedding model identifier

encoding_format'float' | 'base64'

The format to return the embeddings in. Can be either float or base64.

dimensionsinteger

The number of dimensions the resulting output embeddings should have. Only supported in certain models.

Example request

{
  "model": "google/gemini-embedding-001"
}

Response

Embeddings generated successfully

object'list'

Object type, always "list"

Example response

{
  "metadata": {
    "model": "text-embedding-ada-002"
  }
}