Generate vector embeddings for one or more inputs using an OpenAI-compatible embeddings model.

post/v1/embeddings

Request

  • Base URL
    https://api.llmgateway.io
  • Auth
    HTTP bearer

Request body

modelstring required

ID of the embedding model to use.

encoding_format'float' | 'base64'

Format of the returned embeddings. float returns plain arrays, base64 returns a packed base64 string.

dimensionsinteger

Number of dimensions for the output embeddings. Only supported by models that allow shortening output (e.g. text-embedding-3-*, gemini-embedding-*, qwen3-embedding-8b).

userstring

Opaque end-user identifier stored in log params.safety_identifier (up to 128 characters). Credits requests use LLM Gateway's fixed API-key identifier upstream; BYOK requests omit it.

Example request

{
  "model": "text-embedding-3-small",
  "encoding_format": "float",
  "dimensions": 1536
}

Response

Embeddings response.

object'list'
modelstring

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status