News 2 min read

Embeddings: POST /v1/embeddings

The llmbox API now has a POST /v1/embeddings endpoint: text vectors for search, RAG and clustering in the OpenAI format, with two text-embedding-3 models.

Embeddings: POST /v1/embeddings

Change of November 12, 2026

The llmbox API now has a POST /v1/embeddings endpoint. It turns text into vectors for semantic search, RAG and clustering, and works in the OpenAI Embeddings format. The official SDKs and any client that can call OpenAI embeddings will work.

Available models

The catalog has two embedding models: text-embedding-3-small and text-embedding-3-large. They use the same key as the text models, and the model parameter takes an identifier from the catalog.

Example request

bash
curl https://llmbox.cc/v1/embeddings \
  -H "Authorization: Bearer $LLMBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/text-embedding-3-small",
    "input": ["How do I return an item?", "Delivery times within the city"]
  }'

The same through the Python SDK:

python
import os
from openai import OpenAI

client = OpenAI(base_url="https://llmbox.cc/v1", api_key=os.environ["LLMBOX_API_KEY"])
resp = client.embeddings.create(
    model="openai/text-embedding-3-small",
    input=["How do I return an item?", "Delivery times within the city"],
)
vectors = [item.embedding for item in resp.data]

The response contains an object with an index and a vector for each string, and the usage field shows the number of tokens processed.

Parameters

  • input accepts a string, an array of strings or an already tokenized input. You can send several strings in one request.
  • encoding_format: float by default, or base64. The OpenAI Python SDK requests base64 itself and decodes the response.
  • dimensions sets the vector size for models that support it, such as text-embedding-3-*. A shorter vector takes less space in storage.

Cost and details

Only input tokens are billed: embeddings do not generate output tokens. The rate per million tokens is on the model page, and usage is visible in the Logs and Usage sections of the cabinet.

The response arrives in full, not as a stream. The model type must match the endpoint: a text model on /v1/embeddings and an embedding model on the chat endpoint both return a 404 model_not_found error. The model sets the limits on the number of strings and the input length; exceeding them returns a 400 error.

The full reference is in the documentation page Embeddings.

Published November 15, 2026

One key — every model

GPT, Gemini, DeepSeek, Qwen, video and audio. Pay as you go.

Create a key