Endpoint

POST /api/openai/embeddings

Auxot implements the OpenAI Embeddings API specification. Any tool or SDK that generates embeddings against OpenAI can point at Auxot instead by changing the base URL. An embedding is a list of floating-point numbers that captures the meaning of a piece of text, used for semantic search, retrieval-augmented generation (RAG), clustering, and similarity comparisons.

Authenticate with a personal (user. prefix) or team (team. prefix) API key from Settings → API Keys on Auxot Server (authentication).

Request Format

curl http://localhost:8420/api/openai/embeddings \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "input": "The quick brown fox jumps over the lazy dog."
  }'

The input field accepts a single string or an array of strings for batch requests:

curl http://localhost:8420/api/openai/embeddings \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "input": ["first document", "second document", "third document"]
  }'

Supported Parameters

ParameterTypeDescription
modelstringModel ID, or "auto" (or omit) to use the configured default. See Choosing a Model.
inputstring or arrayThe text to embed. A single string returns one vector; an array returns one vector per element, in order.
encoding_formatstringOptional. Only "float" is supported. Requesting "base64" returns an error.
dimensionsintegerOptional, accepted for client compatibility but not applied. Vector length is fixed by the model.

Choosing a Model

The model field selects which backend produces the vectors:

ValueBackend
auto (or omitted)The organization default configured in Settings → Providers → Embeddings model. Falls back to the internal embedder when no default is set.
auxot-embed (alias all-MiniLM-L6-v2)The built-in, in-process embedder. Fixed at 384 dimensions. No provider or API key required.
PROVIDER_ID:MODELA specific model on a specific configured provider — for example an OpenAI or Gemini embedding model.
A bare model nameRouted to the first active provider whose model catalog advertises that name.

The auto, auxot-embed, and all-MiniLM-L6-v2 keywords are matched case-insensitively. Provider model names are case-sensitive.

Cloud providers: OpenAI and Gemini expose embedding models. Anthropic has no embeddings API, so Anthropic providers cannot serve embedding requests.

Setting the Default

To control what "auto" resolves to, go to Settings → Providers and use the Embeddings model card. Choose Auxot internal embedding model to use the built-in embedder, or select a configured provider and one of its embedding models. Only organization admins can change this.

Keep embedding models consistent. Vectors from different models are not comparable, and different models produce different vector lengths. Use one embedding model for everything stored in a single search index. Mixing models across one index degrades retrieval quality.

Response Format

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0123, -0.0456, 0.0789, "..."]
    }
  ],
  "model": "auxot-embed",
  "usage": {
    "prompt_tokens": 9,
    "total_tokens": 9
  }
}

For batch requests, data contains one object per input. The index field maps each vector back to its position in the request input array. The model field reports which model actually served the request, which is useful when using "auto".

Using with the OpenAI Python SDK

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8420/api/openai",
    api_key="user.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)

response = client.embeddings.create(
    model="auto",
    input=["semantic search", "vector database"],
)

for item in response.data:
    print(item.index, len(item.embedding))

Errors

Errors return a JSON body with an error field and a standard HTTP status code (see error responses):

StatusCause
401Missing or invalid API key.
422Empty input, or an unsupported encoding_format such as "base64".
422A requested model that no active provider can serve.
404A PROVIDER_ID:MODEL value referencing a provider that does not exist.

/api/openai/v1/embeddings is also accepted for client compatibility.