Skip to main content
Spillway is an OpenAI- and Anthropic-compatible gateway. You keep your SDK; you change two lines — the base URL and the API key. Every request is then metered, priced, governed, and logged.
  • Data plane (the gateway): http://localhost:3000/v1
  • Control plane (dashboard + admin API): http://localhost:3000/api
  • Self-hosting: both planes are served from one process, http://localhost:3000 by default. See Installation.
1

Get a virtual key

Sign in to the dashboard, open Keys, and create a virtual key. The plaintext (mk-live-…) is shown once — copy it then; only its hash is stored.Running locally? The seed script mints one for you:
2

Switch two lines

The only change to your code is the base URL and the key. Nothing else about your request changes.
The Anthropic SDK works the same way: point it at /v1 and pass the same key as x-api-key, then call client.messages.create(...) as usual. Spillway speaks both dialects natively and cross-translates when a request targets the other provider’s model.Every response carries an x-spillway-request-id header — the id of the logged request row.
3

Stream

Streaming works exactly as it does upstream. Spillway passes the SSE through untouched and injects stream_options.include_usage so token usage — and therefore cost — is always accounted, even for streamed responses.
If the upstream connection drops mid-stream, the request is still recorded with usage_estimated=true — you never lose a row, and you never lose the spend.
4

Watch a budget block the spend

Governance is the point. Create a budget in the dashboard (Budgets → New), scoped to your org, a team, or a single key, with mode: enforce:
Once the scope’s spend for the period would exceed the limit, the next request is blocked before it reaches the provider — no upstream call, no charge:
The block is written as a request row with status: blocked and blockReason: budget_exceeded, so it shows in the live feed and the reports. Set mode: alert instead of enforce to fire an alert at 80%/100% without blocking, or onExceed: "fallback" to reroute to a cheaper alias instead of failing. See Budgets for the full field reference.

Where next

Configuration

Budgets, guardrail policies, routing rules, approvals, and teams.

API reference

Every endpoint, generated from the request/response schemas.

Architecture

How the two planes fit together, and what happens on a request.

Pricing

Flat tiers — never a percentage of your spend.