Overview
The/v1/embeddings endpoint returns vector embeddings for one or more input strings. Allternit normalizes the request, routes it to the configured embeddings provider when available, and returns a consistent response shape. If no provider is configured, the gateway falls back to deterministic hash-based embeddings suitable for development and testing.
Base URL
Endpoints
Create embeddings
Request body
Example request
Example response
Batch embedding
Pass an array of strings to embed multiple inputs in a single request. The order ofdata matches the order of input.
Base64 encoding
Requestencoding_format: "base64" to receive embeddings as base64-encoded little-endian f32 bytes. The data[].embedding array is a placeholder when base64 is requested; decode the actual payload separately if your provider returns it.
Validation rules
inputmust contain at least one string and at most 2048 strings.- Each input string must be non-empty.
encoding_formatmust befloatorbase64.dimensionsmust be between1and3072.
Error codes
Related pages
- Chat Completions — conversational LLM requests
- Files — upload documents for retrieval
- Models — model registry and pricing