Skip to content

Embeddings

POST https://api.katara.com/v1/embeddings takes the OpenAI embeddings request and returns one vector per input. The model is katara/bge-base-en-v1.5@1, an English model with 768 dimensions.

Terminal window
curl https://api.katara.com/v1/embeddings \
-H "Authorization: Bearer $KATARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"katara/bge-base-en-v1.5@1","input":["The first passage.","The second passage."]}'

With the OpenAI client, client.embeddings.create(model="katara/bge-base-en-v1.5@1", input=[...]) works unchanged.

Field
modelkatara/bge-base-en-v1.5@1.
inputA string, or a list of up to 100 strings. Each input is read up to 512 tokens. Token arrays are not accepted.
encoding_formatfloat (the default) or base64, little-endian 32-bit floats as OpenAI sends them.
dimensionsOnly 768. The model cannot shorten its vectors.
userAccepted and not passed on.

Any other field is refused with 400 and code unsupported_parameter.

{
"object": "list",
"data": [{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456] }],
"model": "katara/bge-base-en-v1.5@1",
"usage": { "prompt_tokens": 9, "total_tokens": 9 },
"katara": { "cost_usdc": "0.000001", "provider": "managed", "fallback": true }
}

usage.prompt_tokens is what you are charged for: the count the model reports, or, when it reports none, one token for every four bytes of an input plus two per input, never more than 512 per input.

  • A key that pays with USDC is charged 0.079966 USDC per million input tokens, settled like a chat reply.
  • A key that pays with Account Credits is charged 0.079966 in credits per million input tokens; katara.cost_usd carries the charge.
  • Without a key, the request is paid with x402: the same quote, schemes, 0.025 USDC minimum and settlement as a chat completion. The quote counts each input as its length in bytes plus two tokens, up to 512, and the settlement charges the tokens counted.

Embeddings are served by Katara’s own models only, never by Katara Community, whatever pays. A failure before the vectors come back is not charged.