Get started

Introduction

The shape of the system, and where your code touches it.

There are two surfaces and one path. The **gateway** is the path: it is the only thing on the hot route, and it proxies inference to the provider while measuring what went through. The **console** is where your staff configure what is for sale. The **portal** is where your customers see what they spent.

text

The four things you configure

ThingWhat it decidesWhere
BundleWhich models, at what markup, under what capConsole → Bundles
AliasThe model name your users typeConsole → Models
CredentialWhose provider key pays for the callConsole → Provider keys
KeyWhich end user a request belongs toPOST /v1/keys

Attribution is by key, never by header

An end user is identified by the ak_ key the request arrives with. There is no X-User-Id header to set, because a header is a claim the caller makes about themselves and a key is a fact we minted. If a key leaks, you rotate that one key and one user is affected.

This is why you mint a key per end user rather than sharing one. Sharing a key means every number on every page is an aggregate you cannot break down later.

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.