Get started
Introduction
The shape of the system, and where your code touches it.
There are three surfaces. The **gateway** is the inference path: authenticate the key, resolve the model, meter and reserve spend, call the provider, settle. The **console** is where your team configures models, routers, bundles, and keys. The **portal** is where your customers see usage and limits.
your app seams provider
───────── ───── ────────
OpenAI · Anthropic · Gemini
Authorization: ak_acme_… → resolve key → end user
check bundle → allowed model
reserve worst-case cost
→ provider
meter the stream ← tokens
settle: hold → charge
← 200 + usageThe four things you configure
| Thing | What it decides | Where |
|---|---|---|
| Bundle | Which models, at what markup, under what cap | Console → Bundles |
| Alias | The model name your users type | Console → Models |
| Router | How that name resolves across providers | Console → Routers |
| Credential | Whose provider key pays for the call | Console → Providers |
| Key | Which end user a request belongs to | POST /v1/keys |
Who a call belongs to
One end-user key (ak_) per person. That key is what ties spend to the right balance and portal account. Attribution lives on the credential, not in a request header.
Sharing one key across many people makes usage harder to break down later. Mint per end user when you can.
Money is integers
Every amount is a bigint of micro-dollars, a millionth of a dollar. Columns end in _micros and the API returns them that way. $3.00 per million tokens is 3000000. There is no float anywhere on the money path, and no rounding until the moment something is displayed.