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.

text
  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 + usage

The four things you configure

ThingWhat it decidesWhere
BundleWhich models, at what markup, under what capConsole → Bundles
AliasThe model name your users typeConsole → Models
RouterHow that name resolves across providersConsole → Routers
CredentialWhose provider key pays for the callConsole → Providers
KeyWhich end user a request belongs toPOST /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.