Skip to Content
Konduit docs

konduit gateway API

OpenAI-compatible inference over European providers, with per-request sovereignty routing, and Anthropic's Messages API for organisations granted it.

OpenAPI 3.1.1 · version 1.10.0 · download the document

konduit speaks the OpenAI chat completions, legacy completions and embeddings APIs, and Mistral's fill-in-the-middle completions for code. Its audio transcription API is specified here and served once a transcription model is listed in GET /models; none is yet. An existing OpenAI SDK talks to it by changing two settings — the base URL and the key — and needs to know nothing else.

For organisations a model of modality messages is granted to, konduit also speaks Anthropic's own Messages API (POST /messages and POST /messages/count_tokens, tag Messages). The same holds there: an Anthropic SDK or client changes its base URL to https://api.konduit.eu (without /v1) and its key, sent as x-api-key or as a Bearer token. Those models are served by Anthropic, not by a European provider, and are not offered to other organisations: for them both routes answer 404 not_found_error, exactly as for a model that does not exist.

On top of that compatibility konduit adds three things, all of them optional to use and none of them breaking an SDK that ignores them:

  • a provider object in the request body, which is the sovereignty policy: which countries, which certifications, which operators may serve this one request;
  • the Konduit-Provider and Konduit-Deployment response headers, which name who actually served it;
  • an extended GET /v1/models, whose entries carry pricing and a sovereignty block beside OpenAI's four fields, and GET /v1/models/{model} for one of them.

Errors follow OpenAI's envelope, except on the two Messages routes, whose errors follow Anthropic's (AnthropicError). konduit's own machine-readable codes are listed under ErrorEnvelope; the ones prefixed upstream_ describe something a provider did, and the ones without that prefix describe something konduit decided before any provider was asked.

Base URL

https://api.konduit.eu/v1 — Production.

Authentication

ApiKeyAuth — http (bearer)

Authorization: Bearer <key>. The scheme is matched case-insensitively. The only other place a key is read from is the x-api-key header, see XApiKeyAuth; there is no query parameter.

A key is a configurable prefix (kdt- unless an install changes it) followed by 32 characters of lowercase base32. Keys are minted in the console and shown once.

A 401 carries no WWW-Authenticate header, deliberately: OpenAI's API sends none, and a drop-in replacement that sent one would make some clients behave differently against konduit than against the API they were written for.

XApiKeyAuth — apiKey

x-api-key: <key>, the header Anthropic's SDKs and n8n's Anthropic nodes send. It is accepted on every route, not only on the Messages routes, and the key is the same one. When a request carries an Authorization header, that header is the key presented and x-api-key is not read, so a wrong Bearer key beside a valid x-api-key is refused.

Endpoints

POST /chat/completions

Create a chat completion

Relays a chat completion to whichever deployment konduit's routing chose for it, and returns the provider's own response bytes.

What konduit reads, and what it forwards

The body is forwarded to the provider as it arrived, with the routing decision written into it and nothing else. konduit validates only that the body is one JSON object, that model is a non-empty string, and that messages has at least one entry; temperature, tools, response_format and anything OpenAI ships next travel through untouched and unvalidated, because judging them is the provider's job. It also refuses (invalid_request) a body a JSON parser could read two ways: two keys, at the top level or inside stream_options, that are the same once case is ignored, or one of the fields it reads (model, messages, stream, stream_options, max_tokens, max_completion_tokens, n, provider, and include_usage inside stream_options) spelled in any other case, such as "Stream".

The exceptions to byte-for-byte relaying are exactly four: provider is removed, model is replaced by the chosen provider's own name for the deployment, on a streaming request stream_options.include_usage is set to true, and for a deployment whose chat template accepts only nine-character alphanumeric tool-call ids, every tool_calls[].id and tool_call_id in messages that is not already one is replaced by one, the same for a call and its result.

Which deployment serves it

model resolves against konduit's catalog, most specific first:

You send konduit tries
a deployment id from GET /v1/models exactly that deployment
provider/model every deployment of that model from that provider
model:variant every provider's deployment of that model in that variant
model every deployment of that model, from every provider

A prefix before the first / is read as a provider only when konduit's catalog knows a provider by that name — so a model id that contains a slash still resolves as a model.

An embedding model — modality: embedding in GET /models — is not served here: it is refused with 400 model_does_not_support_endpoint, whose message names POST /v1/embeddings, before any credit is reserved or any provider is asked. Every chat deployment serves this route; deployment.endpoints in GET /models lists it for each.

Everything that survives the provider policy is then ordered cheapest first (input plus output price per million tokens) and tried in that order. A candidate that fails before konduit has committed to an answer is replaced by the next one; on a stream, that boundary is the first flushed byte.

This endpoint requires the chat:write scope. A key with no scopes is unrestricted.

Request body

application/json — ChatCompletionRequest

FieldTypeNotes
model *string

A model, a model at a provider, one exact deployment, or a variant. See the resolution table on the operation.

messages *object[]

The conversation. konduit counts the entries and forwards them; it never reads one, which is why no message schema is given here — the provider's own is the one that applies.

streamboolean

Serve the completion as server-sent events.

stream_optionsStreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

max_completion_tokensinteger

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

max_tokensintegerDeprecated.

OpenAI's deprecated spelling of max_completion_tokens. konduit reads both and reserves for the larger one when both are present.

ninteger

How many choices to generate. Each is a completion the provider bills, so konduit reads it to reserve credit for that many completions of the ceiling above; it is forwarded like every other field. It must be an integer. The per-request reservation limit clamps only a single choice: with n above 1, a request whose whole reservation would exceed it is refused with 400 invalid_request before anything is reserved. Without max_tokens the ceiling is the deployment's max_output_tokens, or its whole context window, so set or lower max_tokens as well.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

The smallest request konduit accepts
{
  "model": "mistral-small-3.2",
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ]
}
Pin one deployment by its catalog id
{
  "model": "scaleway/mistral-small-3.2",
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ]
}
Germany or France only, zero retention, Scaleway preferred
{
  "model": "mistral-small-3.2",
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ],
  "provider": {
    "countries": [
      "DE",
      "FR"
    ],
    "zero_retention": true,
    "order": [
      "scaleway"
    ]
  }
}
A stream that also wants the usage chunk
{
  "model": "mistral-small-3.2",
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ]
}

Responses

StatusDescription
200

The completion. For stream: false this is the provider's own JSON response body, relayed unchanged; for stream: true it is a server-sent event stream.

Headers: Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

POST /completions

Create a completion (legacy)

Relays an OpenAI legacy completions request — a prompt to continue rather than a conversation — to whichever deployment konduit's routing chose for it, and returns the provider's own response bytes. Code assistants that template fill-in-the-middle into prompt themselves use it for autocomplete.

Which deployments serve it

Only the chat deployments whose deployment.endpoints in GET /models lists /v1/completions. Whether an operator serves the route is a property of how it serves the weights, so konduit probes it per deployment. model resolves as on POST /chat/completions, and then every deployment that does not serve this route is dropped: a model with none left is refused with 400 model_does_not_support_endpoint before any credit is reserved or any provider is asked — an embedding model with the message naming POST /v1/embeddings. A fallback only ever reaches another deployment that serves the route.

What konduit reads, and what it forwards

konduit validates only that the body is one JSON object, that model is a non-empty string and that prompt is one string. The legacy API's array forms — several prompts, or token ids — are refused with 400 invalid_request: the provider answers them with one completion per element, which the credit konduit reserves for one would not cover, so send one request per prompt. It also refuses (invalid_request) a body a JSON parser could read two ways, judged against the fields it reads here: model, prompt, stream, stream_options, max_tokens, n, best_of, provider, and include_usage inside stream_options.

The exceptions to byte-for-byte relaying are exactly three: provider is removed, model is replaced by the chosen provider's own name for the deployment, and on a streaming request stream_options.include_usage is set to true. Everything else — suffix, stop, echo, logprobs — reaches the provider as sent and is the provider's to judge. The providers behind this route refuse suffix with a 400 (upstream_invalid_request); send fill-in-the-middle with a suffix to POST /fim/completions instead.

What it costs

Like a chat completion: the provider's own usage, at the deployment's input and output prices. max_tokens sizes the credit reserved before the request runs, times n or best_of, whichever is larger, because each is a completion the provider bills. The per-request reservation limit clamps only a request for one: one for several whose whole reservation would exceed it is refused with 400 invalid_request before anything is reserved. Without max_tokens the reservation is sized from the deployment's max_output_tokens, or from its whole context window when it publishes none, while the provider's own default may be as short as 16 tokens. The difference is released when the request is charged, but until then it is credit that cannot be spent, so send max_tokens.

This endpoint requires the completions:write scope. A key with no scopes is unrestricted.

Request body

application/json — CompletionRequest

FieldTypeNotes
model *string

A model, a model at a provider, or one exact deployment, resolved as on a chat completion among the deployments that serve the route.

prompt *string

The text to continue — for fill-in-the-middle, the code before the cursor. konduit checks that it is one string and never reads it. The legacy API's array forms are refused with 400 invalid_request: each element would be a completion of its own on credit reserved for one.

suffixstring

Fill-in-the-middle only: the code after the cursor. Forwarded unread. The providers behind POST /completions refuse it, so a client that templates fill-in-the-middle into prompt itself sends none there.

streamboolean

Serve the completion as server-sent events.

stream_optionsStreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

max_tokensinteger

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

ninteger

How many completions to return. Each is billed, so konduit reserves credit for that many; forwarded like every other field. It must be an integer. Above 1, a request whose whole reservation would exceed the per-request limit is refused with 400 invalid_request.

best_ofinteger

Legacy completions only: how many completions the provider generates to return the best n of. Each is billed, so when it is larger than n konduit reserves credit for this many, under the same limit as n. It must be an integer.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

Continue a prompt
{
  "model": "llama-3.3-70b-instruct",
  "prompt": "def add(a, b):\n    ",
  "max_tokens": 16
}
A stream that also wants the usage chunk
{
  "model": "llama-3.3-70b-instruct",
  "prompt": "def add(a, b):\n    ",
  "max_tokens": 16,
  "stream": true,
  "stream_options": {
    "include_usage": true
  }
}

Responses

StatusDescription
200

The completion. For stream: false this is the provider's own JSON response body, relayed unchanged; for stream: true it is a server-sent event stream.

Headers: Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

POST /fim/completions

Create a fill-in-the-middle completion

Relays a fill-in-the-middle request — the code before the cursor in prompt, the code after it in suffix — to a deployment that serves Mistral's FIM endpoint, and returns the provider's own response bytes. The answer is chat-shaped: choices[].message.content holds the text to insert, and a stream sends chat.completion.chunk frames.

Which deployments serve it

Only the chat deployments whose deployment.endpoints in GET /models lists /v1/fim/completions; any other model is refused with 400 model_does_not_support_endpoint before any credit is reserved or any provider is asked. model resolves as on POST /chat/completions, and a fallback only ever reaches another deployment that serves the route.

What konduit reads, and what it forwards

The same as on POST /completions: model and a prompt that is one string must be there, the same fields are checked for a second reading, and the same three exceptions to byte-for-byte relaying apply. suffix, stop and min_tokens are forwarded unread. Mistral refuses a field it does not know with a 422 (upstream_invalid_request), which is one reason konduit's provider object never reaches it.

What it costs

Like a chat completion: the provider's own usage, at the deployment's input and output prices. Mistral puts the counts on the last content chunk of a stream; a client that did not ask for usage receives that chunk with usage set to null.

Send max_tokens: it sizes the credit reserved before the request runs. Without it the reservation is the deployment's max_output_tokens, or its whole context window when it publishes none — 256 000 tokens for codestral-2508 — on every request an editor sends, which a modest balance answers with 402 insufficient_balance long before the real completions would have cost that much.

This endpoint requires the completions:write scope. A key with no scopes is unrestricted.

Request body

application/json — CompletionRequest

FieldTypeNotes
model *string

A model, a model at a provider, or one exact deployment, resolved as on a chat completion among the deployments that serve the route.

prompt *string

The text to continue — for fill-in-the-middle, the code before the cursor. konduit checks that it is one string and never reads it. The legacy API's array forms are refused with 400 invalid_request: each element would be a completion of its own on credit reserved for one.

suffixstring

Fill-in-the-middle only: the code after the cursor. Forwarded unread. The providers behind POST /completions refuse it, so a client that templates fill-in-the-middle into prompt itself sends none there.

streamboolean

Serve the completion as server-sent events.

stream_optionsStreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

max_tokensinteger

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

ninteger

How many completions to return. Each is billed, so konduit reserves credit for that many; forwarded like every other field. It must be an integer. Above 1, a request whose whole reservation would exceed the per-request limit is refused with 400 invalid_request.

best_ofinteger

Legacy completions only: how many completions the provider generates to return the best n of. Each is billed, so when it is larger than n konduit reserves credit for this many, under the same limit as n. It must be an integer.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

Complete the middle of a function
{
  "model": "codestral-2508",
  "prompt": "def add(a, b):\n    ",
  "suffix": "\n\nprint(add(1, 2))",
  "max_tokens": 64
}

Responses

StatusDescription
200

The completion. For stream: false this is the provider's own JSON response body, relayed unchanged; for stream: true it is a server-sent event stream.

Headers: Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

POST /embeddings

Create embeddings

Relays an embeddings request to whichever embedding deployment konduit's routing chose for it, and returns the provider's own response bytes.

What konduit reads, and what it forwards

The body is forwarded to the provider as it arrived, with the routing decision written into it and nothing else: provider is removed and model is replaced by the chosen provider's own name for the deployment. konduit validates only that the body is one JSON object, that model is a non-empty string, and that there is something to embed — input, or messages for a multimodal embedding model that takes text and images in one conversation-shaped request. It also refuses (invalid_request) a body whose top-level object holds two keys that are the same once case is ignored, or spells one of the fields it reads (model, input, messages, provider) in any other case, such as "Input". encoding_format, dimensions and anything a provider adds travel through untouched and unvalidated, and konduit adds no defaults of its own.

Which deployment serves it

model resolves exactly as on POST /chat/completions, among the catalog's embedding deployments only — modality: embedding in GET /models. A chat model sent here is refused with 400 model_does_not_support_endpoint, whose message names POST /v1/chat/completions, before any credit is reserved or any provider is asked. Candidates are ordered cheapest first, and one that fails with a 429 or a 5xx is replaced by the next. One that answers 200 is not, even if its body then never comes: the provider computed, and bills, every vector before it sent that status, so konduit answers 502 upstream_error and records the request for reconciliation rather than buying the vectors again elsewhere.

The response, and what it costs

The provider's response is relayed as it arrives rather than collected first, so a large batch — hundreds of inputs at thousands of dimensions is tens of megabytes of JSON — reaches the client without konduit holding it. konduit reads the top-level usage and id out of those bytes as they pass and bills the provider's own count at the deployment's input price: an embedding deployment has no output price. A response whose usage never reaches konduit is recorded for reconciliation, never charged on an estimate: it is charged only if the provider's own numbers prove the usage within three days, and after that konduit absorbs the cost.

The status is committed with the first byte of the provider's body. A provider that fails after that, before the whole document has gone out, has the connection cut off rather than the response finished: the client sees a broken connection, never a 200 carrying truncated JSON. Not every SDK retries a failure that arrives after the status — openai-node does not — so treat it as a transport error and retry.

One timeout covers the whole exchange: the provider computing every vector and the client downloading them must finish within the gateway's upstream timeout, 120 seconds unless the operator configured another. A client that stops reading for 30 seconds is taken for gone, sooner if the operator configured a shorter upstream idle timeout.

This endpoint requires the embeddings:write scope. A key with no scopes is unrestricted.

Request body

application/json — EmbeddingRequest

FieldTypeNotes
model *string

An embedding model, a model at a provider, or one exact deployment. It resolves the way model does on a chat completion.

inputany

What to embed: a string, or an array of them for a batch. konduit checks that it is there and never reads it, so its shape, how many entries a batch may hold and how long each may be are the provider's limits to enforce.

messagesobject[]

The conversation-shaped input of a multimodal embedding model: text and image_url parts that are embedded into one vector, sent in place of input. konduit reads only which parts are images, to size the credit reservation.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

One string
{
  "model": "qwen3-embedding-8b",
  "input": "The quick brown fox jumps over the lazy dog."
}
A batch, pinned to one deployment
{
  "model": "stackit/e5-mistral-7b-instruct",
  "input": [
    "The API is fast and reliable.",
    "The system reacts just in time and is stable."
  ]
}
Text and an image in one vector
{
  "model": "stackit/qwen3-vl-embedding-8b",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "A red bicycle against a white wall."
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
          }
        }
      ]
    }
  ]
}

Responses

StatusDescription
200

The provider's own JSON response body, relayed unchanged as it arrives.

Headers: Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

POST /systemone

Ask a decision model

Relays a decision request to whichever decision deployment konduit's routing chose for it, and returns the provider's own response bytes. A decision model answers a set of questions about a state — a text and what goes with it — with a choice, a score or a probability for each.

This endpoint is available to organisations a decision model is granted to. A key whose organisation holds no grant for the model it names is answered exactly as for a model that does not exist: 404 model_not_found.

What konduit reads, and what it forwards

The body is forwarded to the provider as it arrived, with the routing decision written into it and nothing else: provider is removed and model is replaced by the chosen provider's own name for the deployment. state and questions are relayed unread. konduit validates that the body is one JSON object, that model is a non-empty string, that state is present, and that questions is a non-empty object, and refuses (invalid_request) a body that carries assets, konduit relaying text-only decision requests, or a stream other than false, because decision requests are not streamed. It also refuses a body whose top-level object holds two keys that are the same once case is ignored, or spells one of the fields it reads (model, state, questions, assets, stream, provider) in any other case. Every refusal comes before any credit is reserved or any provider is asked.

Which deployment serves it

model resolves exactly as on POST /chat/completions, among the catalog's decision deployments only — modality: decision in GET /models. Any other model sent here is refused with 400 model_does_not_support_endpoint, whose message names the endpoint that serves it, and a decision model sent to another endpoint is refused the same way, naming this one. Candidates are ordered cheapest first, and one that fails with a 429 or a 5xx is replaced by the next.

The response, and what it costs

The provider's response is relayed unchanged. konduit reads its top-level usage — input_tokens and output_tokens — and bills the provider's own count at the deployment's input price; a decision deployment's output is free. A response without a usable usage is recorded for reconciliation, never charged on an estimate.

This endpoint requires the decisions:write scope. A key with no scopes is unrestricted.

Request body

application/json — DecisionRequest

FieldTypeNotes
model *string

A decision model, a model at a provider, or one exact deployment. It resolves the way model does on a chat completion.

state *any

What the questions are about: any JSON value, relayed unread. It must be present and not null.

questions *object

The questions to answer, by name. Their shape is the provider's to judge; the answers come back under the same names.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

One choice question
{
  "model": "example-decision-model",
  "state": {
    "text": "The match ended 2:1 after extra time."
  },
  "questions": {
    "topic": {
      "type": "choice",
      "criteria": {
        "politik": "about politics",
        "sport": "about sport"
      }
    }
  }
}

Responses

StatusDescription
200

The provider's own JSON response body, relayed unchanged.

Headers: Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

POST /messages

Create a message

Relays a request in Anthropic's Messages API to the deployment konduit's routing chose for it, and returns the provider's own response, buffered or streamed. A client written for that API — an Anthropic SDK, n8n's Anthropic nodes, Claude Code — changes its base URL and its key and nothing else.

This endpoint is available to organisations a model of modality messages is granted to. A key whose organisation holds no grant for the model it names is answered exactly as for a model that does not exist: a 404 of type not_found_error.

What konduit reads, and what it forwards

The body is forwarded as it arrived, with the routing decision written into it and nothing else: provider is removed and model is replaced by the chosen provider's own name for the deployment, which for these models is the id you sent. system, messages, tools, thinking, cache_control, speed, inference_geo and every other field, including fields Anthropic ships next, travel through untouched, in the order they arrived, because prompt caching depends on it. konduit validates only that the body is one JSON object, that model is a non-empty string, that messages is a non-empty array, that max_tokens is a positive integer and that stream, when present, is a boolean; judging the rest is the provider's job. It also refuses (invalid_request_error) a body a JSON parser could read two ways: two keys that are the same once case is ignored, or one of the fields it reads (model, provider, stream, max_tokens, messages, speed, inference_geo) spelled in any other case.

Two request headers are relayed upstream, verbatim: anthropic-version and anthropic-beta. When the client sends no anthropic-version, konduit sends 2023-06-01. The beta query parameter is relayed too; no other query parameter and no other header is.

Which deployment serves it

model resolves as on POST /chat/completions, among the catalog's messages deployments only. Any other model sent here is refused with a 400 whose message names the endpoint that serves it, and a messages model sent to another endpoint is refused the same way, naming this one. This route accepts the provider policy as the other routes do.

The response

The response is relayed unchanged: the body of a buffered request, and every event of a stream — each event: line, ping events and unknown events included — with usage exactly as the provider reported it. A stream carries no data: [DONE]; it ends with message_stop. The provider's request-id, retry-after, x-should-retry and anthropic-ratelimit-* headers reach the client, on success and on an error, together with Konduit-Provider and Konduit-Deployment.

What it costs

konduit bills from the usage the provider reports, never from an estimate. Five token classes are each charged at the deployment's own price: input_tokens, output_tokens, cache_read_input_tokens, and cache writes in two classes, five-minute and one-hour (cache_creation; without the split, all five-minute). The prices are in pricing in GET /models. A prompt over the deployment's long-prompt threshold, usage.speed: "fast" and usage.inference_geo: "us" each multiply every class's price by the deployment's multiplier, and the three stack. Each web search, usage.server_tool_use.web_search_requests, is charged at the deployment's price per search. When usage.iterations is present, every entry is charged at the prices of the model that ran it. Usage the catalog has no price for, such as fast on a deployment that states no fast multiplier, is relayed and the record is marked for reconciliation: nothing is charged in part, and nothing is estimated.

This endpoint requires the chat:write scope. A key with no scopes is unrestricted.

Request body

application/json — MessagesRequest

FieldTypeNotes
model *string

A model from GET /models with modality: messages. konduit's catalog id for these models is the provider's own, so the id an Anthropic client already sends routes as it is.

messages *object[]

The conversation. konduit checks that it is a non-empty array and forwards it; it never reads an entry, which is why no message schema is given here.

max_tokens *integer

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

streamboolean

Serve the message as server-sent events.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

The smallest request konduit accepts
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 256,
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ]
}
A stream, with a cached system prompt
{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "stream": true,
  "system": [
    {
      "type": "text",
      "text": "You read build logs and say what broke.",
      "cache_control": {
        "type": "ephemeral"
      }
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "Why did the last run fail?"
    }
  ]
}

Responses

StatusDescription
200

The message. For stream: false this is the provider's own JSON response body, relayed unchanged; for stream: true it is a server-sent event stream.

Headers: request-id Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no non-empty messages, no positive max_tokens, two keys that are the same once case is ignored, a provider policy it could not read, or a model sent to an endpoint it is not served on. Type invalid_request_error. A provider can also refuse a request konduit accepted; that answer is relayed unchanged, with the provider's own status and body.

messagesBadRequest
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "max_tokens must be a positive integer"
  }
}
401

No key was sent, or the key is not valid. Type authentication_error. A 401 or 403 the provider itself sends is about konduit's own credentials, not yours, and is answered as a 502.

messagesUnauthorized
{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "the API key is not valid"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Type billing_error. A top-up helps; a retry does not.

messagesPaymentRequired
{
  "type": "error",
  "error": {
    "type": "billing_error",
    "message": "the organisation does not have enough credit for this request"
  }
}
403

The key lacks the chat:write scope, or its organisation is not active. Type permission_error.

messagesForbidden
{
  "type": "error",
  "error": {
    "type": "permission_error",
    "message": "the API key does not have the required scope"
  }
}
404

The model does not exist, is retired, or is not granted to the calling organisation; the three are answered identically. Type not_found_error.

messagesNotFound
{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "the model does not exist"
  }
}
413

The request body is larger than konduit accepts. Type request_too_large.

messagesPayloadTooLarge
{
  "type": "error",
  "error": {
    "type": "request_too_large",
    "message": "the request body is too large"
  }
}
429

A rate limit was hit, konduit's own or the provider's. Type rate_limit_error. A provider's answer is relayed unchanged, retry-after included.

Headers: Retry-After

messagesTooManyRequests
{
  "type": "error",
  "error": {
    "type": "rate_limit_error",
    "message": "rate limit exceeded"
  }
}
500

An error the provider answered with, relayed unchanged: its status, its body and its request-id. Type api_error.

messagesServerError
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "Internal server error"
  }
}
502

The provider failed or could not be reached, or refused konduit's own credentials. Type api_error.

messagesBadGateway
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "the upstream provider returned an error"
  }
}
503

konduit cannot serve the request right now: its catalog or its ledger is unavailable. Type api_error.

messagesServiceUnavailable
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "the service is temporarily unavailable"
  }
}
504

The provider did not answer in time. Type timeout_error. A stream that times out after its first byte ends with an error event of the same type.

messagesGatewayTimeout
{
  "type": "error",
  "error": {
    "type": "timeout_error",
    "message": "the upstream provider timed out"
  }
}
529

The provider is overloaded, an answer relayed unchanged. Type overloaded_error.

messagesOverloaded
{
  "type": "error",
  "error": {
    "type": "overloaded_error",
    "message": "Overloaded"
  }
}

POST /messages/count_tokens

Count the tokens of a message

Asks the provider how many input tokens a Messages request would use. It is routed exactly like POST /messages — by model, by modality, by the provider policy and by the key's entitlements — and relayed the same way: provider is removed, model is replaced by the provider's own name for the deployment, everything else goes upstream untouched, and the response comes back unchanged, with the same headers and the same error rules.

It is not billed. konduit reserves no credit for it and records no usage for it. The only validation is that the body is one JSON object with a non-empty string model; the rest is the provider's to judge.

This endpoint requires the chat:write scope. A key with no scopes is unrestricted.

Request body

application/json — CountTokensRequest

FieldTypeNotes
model *string

A model from GET /models with modality: messages.

messagesobject[]

Forwarded unread.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

Count one user message
{
  "model": "claude-sonnet-5-5",
  "messages": [
    {
      "role": "user",
      "content": "Say hello in one word."
    }
  ]
}

Responses

StatusDescription
200

The provider's own count, relayed unchanged.

Headers: request-id Konduit-Provider Konduit-Deployment

400

konduit refused the request before routing it: a body that is not one JSON object, no model, no non-empty messages, no positive max_tokens, two keys that are the same once case is ignored, a provider policy it could not read, or a model sent to an endpoint it is not served on. Type invalid_request_error. A provider can also refuse a request konduit accepted; that answer is relayed unchanged, with the provider's own status and body.

messagesBadRequest
{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "max_tokens must be a positive integer"
  }
}
401

No key was sent, or the key is not valid. Type authentication_error. A 401 or 403 the provider itself sends is about konduit's own credentials, not yours, and is answered as a 502.

messagesUnauthorized
{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "the API key is not valid"
  }
}
403

The key lacks the chat:write scope, or its organisation is not active. Type permission_error.

messagesForbidden
{
  "type": "error",
  "error": {
    "type": "permission_error",
    "message": "the API key does not have the required scope"
  }
}
404

The model does not exist, is retired, or is not granted to the calling organisation; the three are answered identically. Type not_found_error.

messagesNotFound
{
  "type": "error",
  "error": {
    "type": "not_found_error",
    "message": "the model does not exist"
  }
}
413

The request body is larger than konduit accepts. Type request_too_large.

messagesPayloadTooLarge
{
  "type": "error",
  "error": {
    "type": "request_too_large",
    "message": "the request body is too large"
  }
}
429

A rate limit was hit, konduit's own or the provider's. Type rate_limit_error. A provider's answer is relayed unchanged, retry-after included.

Headers: Retry-After

messagesTooManyRequests
{
  "type": "error",
  "error": {
    "type": "rate_limit_error",
    "message": "rate limit exceeded"
  }
}
500

An error the provider answered with, relayed unchanged: its status, its body and its request-id. Type api_error.

messagesServerError
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "Internal server error"
  }
}
502

The provider failed or could not be reached, or refused konduit's own credentials. Type api_error.

messagesBadGateway
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "the upstream provider returned an error"
  }
}
503

konduit cannot serve the request right now: its catalog or its ledger is unavailable. Type api_error.

messagesServiceUnavailable
{
  "type": "error",
  "error": {
    "type": "api_error",
    "message": "the service is temporarily unavailable"
  }
}
504

The provider did not answer in time. Type timeout_error. A stream that times out after its first byte ends with an error event of the same type.

messagesGatewayTimeout
{
  "type": "error",
  "error": {
    "type": "timeout_error",
    "message": "the upstream provider timed out"
  }
}
529

The provider is overloaded, an answer relayed unchanged. Type overloaded_error.

messagesOverloaded
{
  "type": "error",
  "error": {
    "type": "overloaded_error",
    "message": "Overloaded"
  }
}

POST /audio/transcriptions

Transcribe audio

Relays a transcription request to whichever transcription deployment konduit's routing chose for it, and returns the provider's own response bytes.

No transcription deployment is listed yet, so until one is, every request here is refused before any provider is asked. GET /models shows one, with modality: transcription, once it is listed; take model from there.

What konduit reads, and what it forwards

The body is multipart/form-data, as OpenAI's. konduit reads four of its parts — model, provider, stream and response_format — and relays every other one (file, language, prompt, temperature, timestamp_granularities[], anything a provider adds) in its original order with its bytes unchanged. The routing decision is written in as on the JSON endpoints: the model part's value becomes the chosen provider's own name for the deployment, in its original position, and the provider part is removed. The body is re-framed rather than patched — a new boundary, and each part's header rebuilt from the name, filename and Content-Type konduit read — so that konduit and the provider read exactly the same parts.

provider is the same sovereignty policy as on chat completions, sent as one part whose value is the JSON object (with openai-python: extra_body={"provider": json.dumps({...})}). A policy spread over provider[...] parts, the way a client flattens a nested object into a form, is refused with invalid_policy rather than read.

konduit refuses, with 400 invalid_request and before any credit is reserved or any provider is asked:

  • a body that is not multipart/form-data with a boundary, that does not parse to its closing delimiter, or that carries more than 1000 parts;
  • a part whose Content-Disposition is not exactly one form-data with a name, or that carries a Content-Transfer-Encoding;
  • a filename* in a charset other than UTF-8 or US-ASCII, or split into RFC 2231 continuations;
  • model, provider, stream or response_format sent twice, in another letter case, or with a filename;
  • a missing or blank model;
  • a response_format other than json or verbose_json;
  • a stream other than false: konduit does not stream transcriptions.

Which deployment serves it

model resolves exactly as on POST /chat/completions, among the catalog's transcription deployments only — modality: transcription in GET /models. A chat or embedding model sent here, or a transcription model sent to one of the other endpoints, is refused with 400 model_does_not_support_endpoint, whose message names the endpoint that serves it. Candidates are ordered cheapest first, and one that fails with a 429 or a 5xx is replaced by the next.

The response, and what it costs

The provider's answer is relayed unchanged, usage included. A transcription is billed per second of audio: the provider's own usage.seconds (when usage.type is duration or absent; a fraction counts as a whole second) at the deployment's price per audio hour, pricing.unit: micro_eur_per_audio_hour in GET /models, rounded up to a whole micro-EUR. A response without such a usage is recorded for reconciliation and never charged on an estimate. While the request runs, konduit holds the per-request ceiling, the most any one request may reserve, because an upload's size does not bound how long its audio runs; the hold is released down to the charge.

A transcription counts against a key's requests-per-minute limit and not against its tokens-per-minute limit. A transcription may take up to ten minutes, fallbacks included, unless the operator configured another bound. A request, the audio file and every other field together, may be 20 MiB like every request body; keep the file a little under that.

This endpoint requires the audio:write scope. A key with no scopes is unrestricted.

Request body

multipart/form-data — TranscriptionRequest

FieldTypeNotes
file *string

The audio, as a file part.

model *string

Resolved as on chat completions, among transcription deployments: an id GET /models lists with modality: transcription.

providerstring

The routing policy as a JSON object in one part. Never forwarded.

response_formatstringOne of: json verbose_json

Anything else is refused with a 400. Absent is the provider's default, json.

streamstringOne of: false

konduit does not stream transcriptions; any other value is refused with a 400.

languagestring

Relayed unchanged.

promptstring

Relayed unchanged.

temperaturenumber

Relayed unchanged.

timestamp_granularities[]string[]

Relayed unchanged.

Responses

StatusDescription
200

The provider's own JSON response body, relayed unchanged.

Headers: Konduit-Provider Konduit-Deployment

response_format json
{
  "text": "Hello from konduit.",
  "usage": {
    "type": "duration",
    "seconds": 4
  }
}
400

konduit refused the request before routing it: a body that is not one JSON object, no model, no messages on a chat completion, no prompt on a legacy or fill-in-the-middle completion, nothing to embed on an embeddings request, two keys that are the same once case is ignored, or a field konduit reads spelled in another case (invalid_request); on a transcription, a multipart/form-data body konduit cannot read in exactly one way, a response_format other than json or verbose_json, or a stream other than false (invalid_request); a provider policy it could not read (invalid_policy), a model sent to an endpoint none of its deployments serve — an embedding model to a completions route, a chat model to embeddings, a chat model whose deployment.endpoints do not list /v1/completions or /v1/fim/completions to that route, or a transcription model anywhere but audio transcriptions and any other model there, or a messages model anywhere but POST /v1/messages and POST /v1/messages/count_tokens (model_does_not_support_endpoint) — or, on a chat completion only, an image content part (image_url or input_image) for a model with no deployment whose capabilities.vision is true (model_does_not_support_images). The last two are decided from the catalog before any credit is reserved or any provider is asked.

A provider can also refuse a request konduit accepted, and konduit keeps the provider's own status when it does — so a 400 may instead carry upstream_invalid_request. That code is the only one whose status is not konduit's decision: it arrives at whatever 4xx the provider chose, which includes statuses this document does not enumerate, such as 409, 422 or 451. The 401, 403, 408 and 429 a provider sends are the exceptions, and they are translated rather than relayed.

A body konduit could not accept
{
  "error": {
    "message": "messages must contain at least one message",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_request"
  }
}
An image sent to a model without vision
{
  "error": {
    "message": "the requested model does not accept image input",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_images"
  }
}
An embedding model sent to chat completions
{
  "error": {
    "message": "the requested model is an embedding model: send it to POST /v1/embeddings",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
A chat model sent to a completions route none of its deployments serve
{
  "error": {
    "message": "the requested model is not served on POST /v1/fim/completions: deployment.endpoints in GET /v1/models says where each deployment is",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_does_not_support_endpoint"
  }
}
An unrecognised key inside `provider`
{
  "error": {
    "message": "provider contains a field konduit does not recognise: allowed fields are require, countries, zero_retention and order",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_policy"
  }
}
The provider rejected the request, at the provider's own status
{
  "error": {
    "message": "the upstream provider rejected the request",
    "type": "invalid_request_error",
    "param": null,
    "code": "upstream_invalid_request"
  }
}
401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
402

The organisation's available credit does not cover the reservation this request needs. Retrying does not help; a top-up does.

Out of credit
{
  "error": {
    "message": "your organisation's credit balance does not cover this request",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
413

The request body exceeded the gateway's limit, 20 MiB (20971520 bytes) unless the operator configured another. The message quotes the limit in bytes. Base64 adds a third to an image, so one phone photo is typically 4-11 MB on the wire.

Body over 20 MiB
{
  "error": {
    "message": "request body must not exceed 20971520 bytes",
    "type": "invalid_request_error",
    "param": null,
    "code": "request_too_large"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
502

The hop after konduit did not answer the question usably. Either every candidate deployment konduit tried failed, and the last failure was a provider error (upstream_error), a provider rejecting konduit's own credential (upstream_unauthorized) or a connection that could not be made (upstream_unavailable); or a provider answered with something konduit could not relay, in which case no other candidate was asked.

upstream_response_too_large is that second case for an answer past konduit's response bound — n, best_of, echo or logprobs can make one. The provider generated it and bills it, so a retry would buy it again: it carries x-should-retry: false, which the official SDKs honour, and the fix is a smaller request. A provider that ignored stream: true and answered a stream with one JSON document is the same case under upstream_error.

Headers: x-should-retry

The provider returned an error
{
  "error": {
    "message": "the upstream provider returned an error",
    "type": "server_error",
    "param": null,
    "code": "upstream_error"
  }
}
The provider rejected konduit's own credential
{
  "error": {
    "message": "the gateway is not authorised against the upstream provider",
    "type": "server_error",
    "param": null,
    "code": "upstream_unauthorized"
  }
}
The provider could not be reached at all
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
The provider answered past konduit's response bound
{
  "error": {
    "message": "the upstream provider returned a response that is too large to relay",
    "type": "server_error",
    "param": null,
    "code": "upstream_response_too_large"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}
504

The provider did not answer in time.

The provider did not answer in time
{
  "error": {
    "message": "the upstream provider did not respond in time",
    "type": "server_error",
    "param": null,
    "code": "upstream_timeout"
  }
}

GET /models

List what the calling key may call

Lists exactly what the calling key may call: the deployments its organisation and member are entitled to, narrowed by the key's own model allowlist. Answers from the catalog snapshot the gateway holds in memory, so it never blocks on konduit's control plane. A gateway that has never managed to load a catalog answers 503 catalog_unavailable; one whose catalog database is merely unreachable keeps serving the last snapshot it loaded.

The first four fields of each entry are OpenAI's model object, so an OpenAI SDK lists konduit's models without knowing anything about konduit. Everything after them is konduit's extension.

This endpoint requires a key like every other one, and the models:read scope; a key with no scopes is unrestricted. It is not the public catalog: its active deployments, with their prices, hosting country and certifications, are listed without a key at https://konduit.eu/en/models/. Deprecated deployments that still serve are listed only here.

Responses

StatusDescription
200

The catalog snapshot.

401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}

GET /models/{model}

Retrieve one deployment

Answers with the one entry GET /models lists under this id, byte for byte the same object, from the same in-memory snapshot. It calls no provider and is not billed.

model is a deployment id exactly as GET /models publishes it, such as scaleway/mistral-small-3.2 or hetzner/qwen3.6-35b-a3b:fp8. It contains a /, which may be sent as is or percent-encoded as %2F — current OpenAI SDKs encode it, older ones do not, and both reach the same deployment. Only an exact id matches: the shorter names a completion request accepts, such as mistral-small-3.2, name a set of deployments rather than one, and are answered 404 model_not_found here.

A model the key may not see, because its organisation or member is not entitled to it or the key's allowlist excludes it, answers 404 model_not_found exactly like an unknown one.

A deprecated deployment is still served, as in the list. A retired one, an unknown id and an empty one are 404 model_not_found. A gateway that has never loaded a catalog answers 503 catalog_unavailable.

Requires the models:read scope, like the list. A key with no scopes is unrestricted.

Responses

StatusDescription
200

The deployment, in the shape of one GET /models entry.

401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
404

The request has nowhere to go: konduit's catalog knows no deployment under the requested name (model_not_found); the API key is restricted to models that include none of its deployments (also model_not_found, with the message "the requested model is not permitted for this API key", which only an inference request made with such a key can meet — GET /models/{model} does not check the key's list); or every deployment of it was excluded by the request's own provider policy (no_deployment_matches_policy, which only a request carrying such a policy can meet).

konduit serves no such model
{
  "error": {
    "message": "the requested model is not served by konduit",
    "type": "invalid_request_error",
    "param": null,
    "code": "model_not_found"
  }
}
The policy excluded every deployment
{
  "error": {
    "message": "no deployment matches your sovereignty policy",
    "type": "invalid_request_error",
    "param": null,
    "code": "no_deployment_matches_policy"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}

GET /usage

The credit behind this key, and the limits it is held to

Answers from the key that authenticated the request plus one read on konduit's ledger. The balance is the organisation's: every key of an organisation sees the same three numbers, because the balance is what explains a refused request and hiding it from the people whose requests are being refused protects nothing.

limits reports what the rate limiter will actually hold this key to. The key numbers are the key's own. The organisation numbers are the organisation's own where it has them and this deployment's default where it does not, resolved per field. A field is null only when neither is set, which is the one case where "no ceiling" is true; it is never 0.

This endpoint requires the usage:read scope. A key with no scopes is unrestricted and may call it; a key that was narrowed to other scopes is refused with 403 insufficient_scope. It is rate limited like every other route, against the same per-key bucket.

Nothing here is cached. A wedged ledger costs this call the ledger timeout and a 503 ledger_unavailable; completions are failing for the same reason at that moment.

Responses

StatusDescription
200

The balance and the effective limits.

401

No key was sent, or the key is not valid.

No key was sent
{
  "error": {
    "message": "no API key was provided; send it as an Authorization: Bearer or x-api-key header",
    "type": "invalid_request_error",
    "param": null,
    "code": "missing_api_key"
  }
}
A key was sent and refused
{
  "error": {
    "message": "the API key is not valid",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}
403

The credential is genuine and refused anyway: either the key does not carry the scope this endpoint requires (insufficient_scope), or the organisation behind it has not been activated by konduit — or has been suspended (organisation_not_active). Neither is fixed by sending a different key.

The key is valid but not authorised for this endpoint
{
  "error": {
    "message": "this API key is not permitted to use this endpoint",
    "type": "invalid_request_error",
    "param": null,
    "code": "insufficient_scope"
  }
}
The organisation behind the key is not active
{
  "error": {
    "message": "this organisation is not active, so its API keys cannot be used",
    "type": "invalid_request_error",
    "param": null,
    "code": "organisation_not_active"
  }
}
429

A rate limit was reached. rate_limit_exceeded is konduit's own per-key or per-organisation limit, and the fix is a larger limit; upstream_rate_limited is the provider running out of capacity, and the fix is to wait. Both are 429s with rate_limit_exceeded as the type, so the code is the only thing that tells them apart.

Headers: Retry-After

konduit's own rate limit
{
  "error": {
    "message": "the requests-per-minute limit for this API key was reached; retry after the delay in the Retry-After header",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}
The provider is out of capacity
{
  "error": {
    "message": "the upstream provider is rate limiting this request",
    "type": "rate_limit_exceeded",
    "param": null,
    "code": "upstream_rate_limited"
  }
}
503

konduit cannot answer right now. catalog_unavailable — this gateway has never loaded a catalog and does not know what it serves; no_provider_configured — the catalog lists the model but this gateway has no adapter for any provider serving it; ledger_unavailable — credit could not be checked, and konduit fails closed on money; gateway_busy — the request bodies in flight already fill the memory konduit gives them, or the organisation's share of it, so this one was not read; retry after the delay; upstream_unavailable — the provider said it was overloaded.

Headers: Retry-After

This gateway has no catalog yet
{
  "error": {
    "message": "the model catalog is not available yet",
    "type": "server_error",
    "param": null,
    "code": "catalog_unavailable"
  }
}
No adapter for any operator serving this model
{
  "error": {
    "message": "no provider adapter is configured for any deployment of the requested model",
    "type": "server_error",
    "param": null,
    "code": "no_provider_configured"
  }
}
Credit could not be reserved
{
  "error": {
    "message": "konduit could not reserve credit for this request",
    "type": "server_error",
    "param": null,
    "code": "ledger_unavailable"
  }
}
Too many request bytes in flight; retry shortly
{
  "error": {
    "message": "the gateway is holding as many request bytes as it can at the moment; retry after the delay in the Retry-After header",
    "type": "server_error",
    "param": null,
    "code": "gateway_busy"
  }
}
The provider said it was overloaded (its own message is relayed when readable)
{
  "error": {
    "message": "the upstream provider could not be reached",
    "type": "server_error",
    "param": null,
    "code": "upstream_unavailable"
  }
}

Schemas

ChatCompletionRequest

An OpenAI chat completions request, plus konduit's optional provider policy. Additional properties are allowed and are forwarded to the provider untouched — this schema names the fields konduit itself reads, not the fields it accepts.

FieldTypeNotes
model *string

A model, a model at a provider, one exact deployment, or a variant. See the resolution table on the operation.

messages *object[]

The conversation. konduit counts the entries and forwards them; it never reads one, which is why no message schema is given here — the provider's own is the one that applies.

streamboolean

Serve the completion as server-sent events.

stream_optionsStreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

max_completion_tokensinteger

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

max_tokensintegerDeprecated.

OpenAI's deprecated spelling of max_completion_tokens. konduit reads both and reserves for the larger one when both are present.

ninteger

How many choices to generate. Each is a completion the provider bills, so konduit reads it to reserve credit for that many completions of the ceiling above; it is forwarded like every other field. It must be an integer. The per-request reservation limit clamps only a single choice: with n above 1, a request whose whole reservation would exceed it is refused with 400 invalid_request before anything is reserved. Without max_tokens the ceiling is the deployment's max_output_tokens, or its whole context window, so set or lower max_tokens as well.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

StreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

FieldTypeNotes
include_usageboolean

Whether you receive the final usage chunk. konduit always asks the provider for it — provider-native counts are the only thing it will bill from — and withholds it from a client that did not ask. A chunk that carries usage next to completion content cannot be withheld, so it is relayed with usage set to null instead.

ProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

FieldTypeNotes
requirestring[]

Certification types the serving provider must hold — all of them, not any. Matched case-insensitively against the certifications published in GET /v1/models.

countriesstring[]

ISO 3166-1 alpha-2 hosting countries a deployment may run in — any of them. Matched against the deployment's effective hosting country, so a deployment that overrides its provider's is judged on its own value.

zero_retentionboolean

Require an operator that stores neither prompt nor completion. false and absent mean the same thing — no constraint. There is no reading of false as "only providers that do retain".

orderstring[]

Provider ids in the order you would like them tried. A preference, not a filter: a provider that is not named still serves, it just sorts after every provider that is. Within one rank the cheapest deployment still goes first.

ChatCompletion

The provider's own response body, relayed byte for byte. konduit reads id, model and usage out of it for its own records and changes none of them; the fields below are what any OpenAI-compatible provider sends, and a provider that sends more sends it through.

FieldTypeNotes
idstring
objectstring
createdinteger
modelstring

The provider's own name for what served the request, which is not the string that was sent when a provider resolved an alias.

choicesobject[]
usageCompletionUsage

Provider-native token counts. konduit never computes them and never estimates them: a response that carries no usage object is recorded as needing reconciliation rather than filled in.

CompletionRequest

A legacy or fill-in-the-middle completions request, plus konduit's optional provider policy. Additional properties are allowed and are forwarded to the provider untouched — this schema names the fields konduit itself reads, and suffix, which it forwards without reading, not the fields it accepts.

FieldTypeNotes
model *string

A model, a model at a provider, or one exact deployment, resolved as on a chat completion among the deployments that serve the route.

prompt *string

The text to continue — for fill-in-the-middle, the code before the cursor. konduit checks that it is one string and never reads it. The legacy API's array forms are refused with 400 invalid_request: each element would be a completion of its own on credit reserved for one.

suffixstring

Fill-in-the-middle only: the code after the cursor. Forwarded unread. The providers behind POST /completions refuse it, so a client that templates fill-in-the-middle into prompt itself sends none there.

streamboolean

Serve the completion as server-sent events.

stream_optionsStreamOptions

Forwarded to the provider with every field it arrived with. konduit sets exactly one of them.

max_tokensinteger

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

ninteger

How many completions to return. Each is billed, so konduit reserves credit for that many; forwarded like every other field. It must be an integer. Above 1, a request whose whole reservation would exceed the per-request limit is refused with 400 invalid_request.

best_ofinteger

Legacy completions only: how many completions the provider generates to return the best n of. Each is billed, so when it is larger than n konduit reserves credit for this many, under the same limit as n. It must be an integer.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

TextCompletion

The provider's own legacy completion response, relayed byte for byte. konduit reads id, model and usage out of it for its own records and changes none of them.

FieldTypeNotes
idstring
objectstring
createdinteger
modelstring

The provider's own name for what served the request.

choicesobject[]
usageCompletionUsage

Provider-native token counts. konduit never computes them and never estimates them: a response that carries no usage object is recorded as needing reconciliation rather than filled in.

CompletionUsage

Provider-native token counts. konduit never computes them and never estimates them: a response that carries no usage object is recorded as needing reconciliation rather than filled in.

FieldTypeNotes
prompt_tokensinteger
completion_tokensinteger
total_tokensinteger

TranscriptionRequest

The parts konduit reads or documents. Any other part is relayed to the provider unchanged and unvalidated.

FieldTypeNotes
file *string

The audio, as a file part.

model *string

Resolved as on chat completions, among transcription deployments: an id GET /models lists with modality: transcription.

providerstring

The routing policy as a JSON object in one part. Never forwarded.

response_formatstringOne of: json verbose_json

Anything else is refused with a 400. Absent is the provider's default, json.

streamstringOne of: false

konduit does not stream transcriptions; any other value is refused with a 400.

languagestring

Relayed unchanged.

promptstring

Relayed unchanged.

temperaturenumber

Relayed unchanged.

timestamp_granularities[]string[]

Relayed unchanged.

Transcription

The provider's answer. verbose_json adds fields such as language and segments, relayed as they come.

FieldTypeNotes
text *string
usageTranscriptionUsage

Provider-native duration. konduit bills seconds when type is duration or absent, and never estimates it.

TranscriptionUsage

Provider-native duration. konduit bills seconds when type is duration or absent, and never estimates it.

FieldTypeNotes
typestring
secondsnumber

EmbeddingRequest

An OpenAI embeddings request, plus konduit's optional provider policy. Additional properties are allowed and are forwarded to the provider untouched — this schema names the fields konduit itself reads, not the fields it accepts. encoding_format and dimensions are among the ones it forwards without reading.

input must be present and not null, or messages must be an array with at least one entry; which of the two a model takes is the provider's to say.

FieldTypeNotes
model *string

An embedding model, a model at a provider, or one exact deployment. It resolves the way model does on a chat completion.

inputany

What to embed: a string, or an array of them for a batch. konduit checks that it is there and never reads it, so its shape, how many entries a batch may hold and how long each may be are the provider's limits to enforce.

messagesobject[]

The conversation-shaped input of a multimodal embedding model: text and image_url parts that are embedded into one vector, sent in place of input. konduit reads only which parts are images, to size the credit reservation.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

DecisionRequest

A decision request, plus konduit's optional provider policy. Additional properties are allowed and are forwarded to the provider untouched, except assets and a stream other than false, which konduit refuses.

FieldTypeNotes
model *string

A decision model, a model at a provider, or one exact deployment. It resolves the way model does on a chat completion.

state *any

What the questions are about: any JSON value, relayed unread. It must be present and not null.

questions *object

The questions to answer, by name. Their shape is the provider's to judge; the answers come back under the same names.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

DecisionResponse

The provider's own response body; see the operation for how it is relayed and billed.

FieldTypeNotes
modelstring

The provider's own name for what served the request.

answersobject

One answer per question, under the question's name.

usageobject

The provider's own token count, which is what konduit bills. An answer without input_tokens greater than zero is not billed and is recorded for reconciliation.

EmbeddingList

The provider's own response body; see the operation for how it is relayed and billed. The fields below are what an OpenAI-compatible provider sends, and a provider that sends more — an id, a created — sends it through. An embedding produces no completion, so usage usually has no completion_tokens, or has them as 0.

FieldTypeNotes
objectstring
dataany[]
modelstring

The provider's own name for what served the request.

usageCompletionUsage

Provider-native token counts. konduit never computes them and never estimates them: a response that carries no usage object is recorded as needing reconciliation rather than filled in.

Embedding

FieldTypeNotes
objectstring
indexinteger

The position of the input this vector belongs to.

embeddingany

The vector: an array of floats, or a base64 string where the request asked for encoding_format: base64 and the provider supports it.

MessagesRequest

An Anthropic Messages request, plus konduit's optional provider policy. Every other field of the Messages API is passed through unchanged: this schema names the fields konduit itself reads, not the fields it accepts.

FieldTypeNotes
model *string

A model from GET /models with modality: messages. konduit's catalog id for these models is the provider's own, so the id an Anthropic client already sends routes as it is.

messages *object[]

The conversation. konduit checks that it is a non-empty array and forwards it; it never reads an entry, which is why no message schema is given here.

max_tokens *integer

The completion ceiling. konduit reads it to size the credit reservation the request needs before it runs; it is forwarded like every other field.

streamboolean

Serve the message as server-sent events.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

CountTokensRequest

An Anthropic token-counting request, plus konduit's optional provider policy. Every other field is passed through unchanged.

FieldTypeNotes
model *string

A model from GET /models with modality: messages.

messagesobject[]

Forwarded unread.

providerProviderPolicy

konduit's sovereignty and preference statement about one request. It is removed from the body before anything goes upstream — no provider ever sees konduit's routing vocabulary.

A body field rather than a header, because every OpenAI client library has a way to add an unknown field to a request body (extra_body in openai-python) and few make it easy to add a header to one call.

Three of the four fields are filters and one is a preference: require, countries and zero_retention decide which deployments may serve the request, order decides only which of them is tried first. An unrecognised key is refused with invalid_policy rather than ignored — a typo in a sovereignty filter that silently did not filter would send a prompt to a country the customer asked it to stay out of.

Message

The provider's own response body; see the operation for how it is relayed and billed.

FieldTypeNotes
idstring
typestringAlways message.
rolestring
modelstring

The provider's own name for the model that produced the message.

contentobject[]
stop_reasonstring | null
usageobject

The provider's own counts, relayed unchanged, and what konduit bills from. Fields konduit does not read are left as they arrived.

CountTokensResponse

The provider's own response body.

FieldTypeNotes
input_tokens *integer

AnthropicError

The error body of POST /messages and POST /messages/count_tokens, in Anthropic's shape so that an Anthropic SDK classifies it as it does the provider's own errors. konduit's own refusals on these two routes use it: authentication, scope, rate limit, validation, routing, balance and ledger. konduit's statuses and messages stay its own; the type is chosen by status — 400 invalid_request_error, 401 authentication_error, 402 billing_error, 403 permission_error, 404 not_found_error, 413 request_too_large, 429 rate_limit_error, 529 overloaded_error, and api_error for every other 5xx (timeout_error for a 504). The error.code field of ErrorEnvelope does not exist here.

An error the provider answered with is relayed unchanged — its status, its body, and its request-id, retry-after and x-should-retry headers — because Anthropic's clients decide whether to retry from its own wording. The exception is a 401 or 403 from the provider: it is about konduit's credentials, not the caller's, and is answered as a 502 api_error. The body is never logged.

FieldTypeNotes
type *stringAlways error.
error *object
request_idstring | null

Present on an error the provider answered with.

ModelList

FieldTypeNotes
object *stringAlways list.
data *any[]

Model

FieldTypeNotes
id *string

konduit's deployment id, provider/model or provider/model:variant. Send it back as model to pin exactly this deployment.

object *stringAlways model.
created *integer

Unix seconds.

owned_by *string

The operator, not konduit. "Who runs this" is the answer a customer asking about sovereignty wants from this field.

display_name *string
description *string

One sentence about what the model is for. An empty string when nobody has described the model; it is always present, never omitted, so a client can tell "not described" from a konduit too old to have the field.

modality *stringOne of: chat embedding image transcription decision messages

What the weights produce. A closed set in the catalog schema for a given API version, so a consumer may branch on it exhaustively; a new value arrives with a new minor version (transcription in 1.7.0, decision in 1.9.0, messages in 1.10.0). konduit routes on it: an embedding deployment is served on POST /embeddings only, a transcription deployment on POST /audio/transcriptions only, a decision deployment on POST /systemone only, a messages deployment on POST /messages and POST /messages/count_tokens only, a chat deployment on POST /chat/completions and on the completions routes its operator serves, and an image deployment on none. deployment.endpoints lists the routes of each.

context_window *integer
max_output_tokens *integer | null
reasoning *boolean

Whether this model answers with reasoning tokens before its reply, left alone. Those tokens are billed as output, so two deployments' output prices are comparable only when this field agrees.

It states behaviour, not capability: it does not claim the weights are merely able to reason, and makes no claim about whether that can be switched off. It is outside capabilities for that reason.

capabilities *object

What the weights can do, not what this deployment charges for.

deployment *object
pricing *object

The unit travels with the number on purpose. A client that assumed euros per token would be wrong by twelve orders of magnitude. A transcription deployment is priced per hour of audio and billed per second of it, so its unit is micro_eur_per_audio_hour and its output is null; every other deployment's is micro_eur_per_million_tokens.

A messages deployment is billed in five token classes, so its pricing adds the fields below, each present only where the deployment states it. The multipliers are percentages, 500 meaning five times, and apply to every price of the deployment.

sovereignty *Sovereignty

Already resolved against the provider, so a consumer never has to know that a deployment may override its operator's values.

Usage

FieldTypeNotes
object *stringAlways usage.
organisation_id *string

The organisation the authenticating key belongs to.

api_key_id *string

The id of the key that made this request — the same id the console shows — so a client can confirm which key it is holding without ever seeing the secret again.

balance *Balance

The organisation's wallet, field for field what the console reads. Amounts are integers in micro-EUR: 1000000 is one euro.

limits *Limits
expires_at *string | null

When this key stops authenticating. null means never.

Balance

The organisation's wallet, field for field what the console reads. Amounts are integers in micro-EUR: 1000000 is one euro.

FieldTypeNotes
currency *string

ISO 4217. Always EUR today.

booked_micro_eur *integer

Every entry ever written to the wallet, summed.

reserved_micro_eur *integer

Every open reservation against the wallet, summed. Never negative.

available_micro_eur *integer

Booked minus reserved. It may be negative: a settlement is allowed to exceed the reservation that preceded it, because the provider's usage counts are the only billing truth and a reservation is only ever an estimate.

Limits

FieldTypeNotes
key *Limit

One pair of ceilings, per minute. null is no ceiling — never zero per minute. For organisation, a number may be this deployment's default rather than something the organisation configured; the limiter enforces exactly what is reported here.

organisation *Limit

One pair of ceilings, per minute. null is no ceiling — never zero per minute. For organisation, a number may be this deployment's default rather than something the organisation configured; the limiter enforces exactly what is reported here.

Limit

One pair of ceilings, per minute. null is no ceiling — never zero per minute. For organisation, a number may be this deployment's default rather than something the organisation configured; the limiter enforces exactly what is reported here.

FieldTypeNotes
requests_per_minute *integer | null
tokens_per_minute *integer | null

Sovereignty

Already resolved against the provider, so a consumer never has to know that a deployment may override its operator's values.

FieldTypeNotes
hosting_country *string

ISO 3166-1 alpha-2.

ownership *string

Whether a party outside the EU can direct this operator — control in fact, not the nationality of its capital. eu: EU parties control it and no non-EU party holds a material stake or a direction right. eu-majority: no non-EU party controls it, but the claim carries a qualification — material non-EU capital short of control, or evidence resting on secondary sources. non-eu: a party outside the EU controls it, whatever its country of incorporation. unknown: control could not be established from available sources.

zero_retention *boolean
tier *string
note *string | null
certifications *object[]

Never null. A provider that has attested nothing sends [], and every entry carries the link to its evidence.

ErrorEnvelope

The error body of every endpoint except the two Messages routes, whose errors are AnthropicError. param is always null: konduit never blames a single field, because naming one would mean quoting it, and a field name plus its value is request content.

FieldTypeNotes
error *object

On this page