LM-Kit OneDocs2026.8.10lm-kit.com
API Compatibility

OpenAI · Embeddings

Creates an embedding for the provided input.#

POST/v1/embeddings

Generates embeddings for the given input text or array of texts and returns an EmbeddingResponse containing the generated embeddings.

This endpoint implements the OpenAI embeddings API specification. For complete reference, please see the official OpenAI documentation: https://platform.openai.com/docs/api-reference/embeddings/create

If processing exceeds the configured timeout, returns 202 Accepted with a job_id. Poll GET /lmkit/v1/jobs/ for status and results.

Request body

application/json ·

PropertyTypeDescription
modelstring

The IF of the model used for embeddings. If not specified, the default model will be used.

inputrequiredobject

Input text to embed. Can be a string or an array (of strings, integers, or arrays of integers).

encoding_formatstring

The format to return the embeddings in. Can be either "float" or "base64". Defaults to "float".

dimensionsobject (int32)

The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

userstring

A unique identifier representing your end-user, which can help OpenAI monitor and detect abuse.

Responses

StatusTypeDescription
200

OK

202

Accepted

400

Bad Request

500application/json

Internal Server Error

404

Not Found

curl -X POST "$LMKIT_ONE_URL/v1/embeddings" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "string",
  "input": {},
  "encoding_format": "string",
  "dimensions": "string",
  "user": "string"
}'