View as Markdown

Embeddings

An embedding turns a piece of text into a list of numbers that captures its meaning. Texts about the same thing get similar numbers, so you can search by meaning rather than by keyword. It's the first step in answering questions from your own documents.

The endpoint is POST /v1/embeddings, the same shape as OpenAI's. Any tool built for OpenAI embeddings works by changing the address and the key.

python
from openai import OpenAI

client = OpenAI(base_url="https://api.continuumlabs.ai/v1", api_key="cl-your-key")

result = client.embeddings.create(
    model="qwen3-embedding-8b",
    input=[
        "Notifiable data breaches must be assessed within 30 days.",
        "Fresh fruit is GST-free in Australia.",
    ],
)
vectors = [item.embedding for item in result.data]
bash
curl https://api.continuumlabs.ai/v1/embeddings \
  -H "Authorization: Bearer cl-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "bge-m3", "input": "Fresh fruit is GST-free in Australia."}'

Which model

Model IDNameUse it for
qwen3-embedding-8bLibrarianThe best search quality. Over 100 languages.
bge-m3IndexerLarge collections where speed and cost matter most.

Use the same model to embed your documents and your questions. Vectors from different models can't be compared.

How it's charged

You pay for the tokens you send. There are no output tokens. Prices are on the pricing page.

Good practice

  • Split long documents into passages of a few hundred words before embedding. Search works on passages, not whole files.
  • Send up to a few hundred inputs per request. It's faster than one at a time.
  • Store the vectors yourself, in a vector database or Postgres with pgvector. We don't keep anything you send, including your vectors.