Operator path - one-api on a Dynamo-capped base URL
Not in the preview yet. This feature is built in the repository but is off in the v2.2.6 preview (test mode). Do not treat this page as available on a preview core. See ../preview.md and the release notes.
A deployment recipe for gateway operators who resell model access through one-api: point the one-api channel at a Dynamo-capped OpenAI-compatible base URL and use each user's allowance credential as the channel API key. A path, not a fork - nothing in one-api is patched; the hard cap, fail-closed 402s, revocation, and metering all live in the proxy layer.
one-api (storefront: users, tokens, quotas)
│ channel base_url = the capped proxy
│ channel key = the user's Dynamo allowance credential (JWS)
▼
dynamo-gateway-kong (guard flow: OFFLINE credential verify, 402 fail-closed,
│ inline cap enforcement, ASYNC metering)
▼
your OpenAI-compatible upstream
The engine host - billing truth: voucher signing keys plus the session ledger - runs BESIDE the data plane, next to your billing infrastructure, never inside the proxy fleet. One user = one capped stream + one offline-verifiable credential; issuing a user is three SDK lines (budget.stream(...) → stream.credential(...)).
Run the recipe
cd "$DYNAMO_REPO"
pwd
pnpm install && pnpm -r build # once: builds the SDK the host imports
cd operator-path
node host/host.mjs & # engine host (Control Mode)
docker compose up -d # one-api storefront + capped proxy
The compose stack also needs the proxy's declarative config, operator-path/.runtime/kong.yml (the engine URL and the pinned engine signer the host writes to .runtime/session.json). The block above does not create it; make demo-oneapi generates it.
The host opens a Control Mode budget: no money moves. The compose stack pins the justsong/one-api:v0.6.10 and kong:3.9 images. The host serves a mock upstream so the stack runs offline; a real provider key just re-points the proxy's upstream service. make demo-oneapi drives the whole flow: a call without an allowance gets 402, metering matches between the engine and the proxy, and a revoke brings the 402 back.
Demo-only login: the one-api admin flow uses the image's well-known
default root login on a throwaway local container. Change it immediately
for anything that outlives a demo.
The operator posture
The protocol's checks run in your proxy layer - offline credential verification, fail-closed denials, async metering - and they are only as sound as the operation running them. If you run a gateway and want capped, revocable, per-user allowances underneath your storefront, start with this recipe; the integrator acceptance checklist is the bar to clear.