Skip to content
HomeModels
DocsEmbeddings

Create embeddings

Turn text into numerical vectors for semantic search, similarity matching, and retrieval-augmented generation (RAG).

OpenAI compatible
POST/v1/embeddings
Base URLhttps://api.linkinfra.ai

Authorization

Bearer Token
AuthorizationBearer <token>

Authenticate requests with your API key in the request header:

Authorization: Bearer sk-your-api-key

Need a key? Create one in the console

Only the first three dimensions are shown. Actual dimensions depend on the model and the dimensions parameter.

Request body

application/json
modelstringrequired

Model ID from the model catalog. Availability depends on your account group and configured channels.

inputstring | array<string>required

A single text input or a list of texts.

encoding_formatstring

Embedding encoding: float or base64.

dimensionsinteger

Output dimensions, for models that support configurable dimensions.

Response

application/json
200Successful response
dataarray<object>

Embeddings in input order, with index and embedding values.

usageobject

Token usage for this request. Check usage logs in the console for actual charges.

Request failed? Read the error handling guide