Skip to main content
A consumer is the runtime identity of a calling application. It is what holds credentials and routing configuration, and its slug (a short, URL-safe random string) is the first path segment on the proxy:
POST /{consumer_slug}/v1/chat/completions
Each consumer belongs to one gateway and has a type:
typeTraffic
LLMChat / Responses / Messages (default).
MCPMCP tool endpoints.
A2AAgent-to-agent (planned).

Routing modes

A consumer routes in one of two modes:
ModeRouting config lives onAuth
inline (default)The consumer directly — registry_ids, lb_config, fallback, model_policies.API key or OAuth2.
role_basedThe consumer’s roles; roles are selected from IDP token claims.IDP JWT.

Inline routing

Inline consumers own their routing directly:
FieldMeaning
registry_idsThe registries this consumer may use.
registry_weightsPer-registry weight (1..100) for weighted load balancing.
lb_configNamed load-balancing pool (overrides simple registry_ids) — see Load balancing.
fallbackOrdered retry chain across registries — see Fallback.
model_policiesPer-registry allow-list and default model — see Model resolution.

Model policies

model_policies maps a registry to { allowed: string[], default: string }. allowed restricts which models a consumer may request from that registry (empty = all); default is used when the request names no model and must be in allowed.

Credentials, headers, and MCP

FieldMeaning
auth_idsThe auth credentials that can authenticate as this consumer.
headersStatic headers injected on forwarded requests.
mcpFor MCP consumers: { toolkit, fail_mode }.
activeWhether the consumer can authenticate at all.

Managing consumers

CRUD lives under /v1/gateways/{gateway_id}/consumers, plus attach/detach sub-resources:
  • …/{id}/registries/{registry_id} — attach a registry (body { "weight": 1..100 }).
  • …/{id}/roles/{role_id} — attach a role (role-based mode).
  • …/{id}/auths/{auth_id} — attach an auth credential.
  • …/{id}/policies/{policy_id} — attach a policy.
See the Consumers API. Next: authenticate consumers with auth credentials.