Embeddings
OpenAI's Embeddings API, for embeddings models: vectors for one or more inputs, never streamed. A call bills the input tokens the provider reports at that provider's input price, with no output. A request without dimensions gets vectors of the model's declared dimensions. Send no stream, or false; unknown fields are dropped. There is no answer store: Idempotency-Key is ignored, so a retry is a new, billed call. GET /api/v1/embeddings/models lists the embeddings models your key can call.
curl -X POST https://api.llm.buzz/api/v1/embeddings \
-H "Authorization: Bearer $LLM_BUZZ_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-embedding-8b",
"input": "The quick brown fox"
}'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0123,
-0.0456
]
}
],
"model": "qwen/qwen3-embedding-8b",
"provider": "DeepInfra",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4,
"cost": 4e-8
}
}{
"error": {
"code": 400,
"message": "...",
"metadata": {
"error_type": "invalid_request",
"gateway_code": "invalid_request",
"param": "messages"
}
}
}{
"error": {
"code": 401,
"message": "A valid gateway Bearer key is required. Send the virtual key as 'Authorization: Bearer <key>'.",
"metadata": {
"error_type": "authentication",
"gateway_code": "invalid_key"
}
}
}{
"error": {
"code": 402,
"message": "...",
"metadata": {
"error_type": "payment_required",
"gateway_code": "insufficient_credits"
}
}
}{
"error": {
"code": 404,
"message": "The requested model does not exist or is not granted to this key. GET /api/v1/models lists the model aliases available to this key.",
"metadata": {
"error_type": "not_found",
"gateway_code": "model_not_found",
"param": "model"
}
}
}{
"error": {
"code": 429,
"message": "...",
"metadata": {
"error_type": "rate_limit_exceeded",
"gateway_code": "unavailable_route"
}
}
}Authorization
An inference key, as Authorization: Bearer KEY.
Body application/json
modelstringrequiredAn embeddings model from
GET /api/v1/embeddings/models, such asqwen/qwen3-embedding-8b.inputstring or string[] or integer[] or integer[][]requiredA string, a list of strings, a list of token IDs, or a list of such lists. Token IDs must match the model's tokenizer.
encoding_formatstringHow the vectors come back.
floatbase64dimensionsintegerThe vectors' size, sent to the provider as given.
providerobjectSteers one request across the model's providers. With the OpenAI SDK, send it in
extra_body. Every field acceptsnull. A name matches a provider's display name, its tag or the tag's first part, ignoring case:llm.buzzorllm-buzznames llm.buzz's own provider, andllm-buzz/euonly its capacity in the EU.Show 7 child fields
orderstring[]Try these providers first, in this order, then the others. At most 64 names.
onlystring[]Use only these providers.
ignorestring[]Never use these providers.
allow_fallbacksbooleanfalsestops moving to other providers.sortstringThe order to try providers in. Ignored when
orderis set.pricethroughputlatencysmartzdrbooleantruekeeps the request on providers that declare 0 days of retention.data_collectionstringdenykeeps the request on providers that declare no training and 0 days of retention.allowdeny
userstringYour end user's label, recorded and never forwarded.
Response 200
One vector per input, exactly as the provider returned it, with provider and usage, whose cost is in US dollars.
Errors
400A field is missing or malformed (
invalid_request, withmetadata.param), or the model cannot do what the request asks (unsupported_capability).401No key, or the key is unknown, expired, revoked or disabled.
402Your balance is spent and the model is not free, or the request could cost more than your balance.
404No model has this name, or your key may not call it.
429Providers are throttling, or the model is at capacity (
unavailable_route): retry afterRetry-Afterseconds. Or a free offer's allowance is used (free_allowance_exceeded): your organization's tokens, or your key's requests per minute. Choose a paid model, or for the per-minute limit retry afterRetry-Afterseconds.