For the complete documentation index, see llms.txt. This page is also available as Markdown.

Embeddings

Create Embeddings

post

Creates vector embeddings for text input. Supports models from OpenAI, Google, and DeepInfra. Compatible with OpenAI SDK.

Authorizations
AuthorizationstringRequired

FastRouter API Key. Get yours at https://fastrouter.ai

Format: Authorization: Bearer YOUR_API_KEY

Body
modelstring · enumRequired

The fully qualified model slug. Choose from supported models (openai/text-embedding-3-small, openai/text-embedding-3-large, openai/text-embedding-ada-002, google/gemini-embedding-001, deepinfra/intfloat-e5-base-v2)

Example: openai/text-embedding-3-largePossible values:
inputone ofRequired

The input text or list of text items to embed. Can be a single string or array of strings for batch processing.

stringOptional

Single text string to embed

or
string[]Optional

Array of text strings to embed (batch processing)

dimensionsinteger · min: 1Optional

Optional: Requested embedding size/dimensions. Supported only in text-embedding-3 series and newer models. Allows you to reduce embedding size for efficiency.

Example: 256
encoding_formatstring · enumOptional

Format for the embedding vector. 'float' returns array of numbers, 'base64' returns base64-encoded string.

Default: floatPossible values:
userstringOptional

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

Responses
200

Embeddings created successfully

application/json
objectstringOptional

Object type, always 'list'

Example: list
modelstringOptional

Model used for embedding generation

Example: openai/text-embedding-3-large
post/api/v1/embeddings

Last updated