Skip to content

HTTP API

Generated from the gateway’s own OpenAPI schema — costhelm v0.1.0. A running gateway serves the interactive version at /docs and the raw schema at /openapi.json.

MethodPathSummary
GET/Index
GET/dashboardDashboard
GET/healthzHealthz
GET/helpHelp Page
GET/v1/budgetList Budgets
POST/v1/budgetSet Budget
DELETE/v1/budget/{principal}Delete Budget
GET/v1/budget/{principal}Get Budget
POST/v1/cache/purgeCache Purge
GET/v1/cache/statsCache Stats
GET/v1/callsCalls
GET/v1/capabilitiesCapabilities
POST/v1/chatChat
POST/v1/chat/batchChat Batch
GET/v1/cost/by_agentCost By Agent
GET/v1/cost/by_principalCost By Principal
POST/v1/embedEmbed
GET/v1/embeddersList Embedders
GET/v1/pricingPricing
GET/v1/providersList Providers
GET/v1/refusalsRefusals
GET/v1/routersRouters
GET/v1/statusStatus
GET/v1/telemetryTelemetry
GET/v1/traces/{trace_id}Trace Detail
GET/v1/traces/recentRecent Traces
POST/v1/visionVision

POST /v1/chat takes messages (or a bare prompt), plus optional routing and economics fields: provider, model, max_tokens, temperature, reasoning (off|low|medium|high, translated per vendor), tools, tool_choice, response_format (JSON-schema validated, with one in-place repair attempt), stream (SSE), auto_route (the role name), cost_quality_tradeoff, escalate, semantic_cache, cache_system, and the five principal dimensions tenant/project/user/agent/session.

Every non-streaming response carries four envelopes alongside the completion:

Envelope Contents
cost input/output/cache USD, total_usd, price_source, model, provider
budget whether admission ran, allowed/refused, the checked ceilings
cache hit/miss, similarity, tokens/USD saved, or the reason lookup was skipped
router_decision role, classified vs final tier, tier_path, escalations, confidence

Notable statuses: 402 budget refusal (with the arithmetic — see Budgets), 503 no provider can serve the tier (names the context limit), 400 unknown provider, 401 when auth is enabled and no valid key was sent.