v52

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-311,1941,9384.1 MB
OpenAI Embeddings

Create embeddings

Creates an embedding vector representing the input text. This endpoint is compatible with the OpenAI Embeddings API and may be used with the OpenAI JS or Python SDK by setting the base URL to https://api.telnyx.com/v2/ai/openai.

post/ai/openai/embeddings

Request body

dimensionsinteger

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

encoding_format'float' | 'base64'

The format to return the embeddings in.

modelstring required

ID of the model to use. Use the List embedding models endpoint to see available models.

userstring

A unique identifier representing your end-user for monitoring and abuse detection.

Example request

{
  "model": "thenlper/gte-large"
}

Response

Successful Response

modelstring required

The model used for embedding

objectstring required

The object type, always 'list'