Crescendo Lab

AI Gateway guide

A team on Claude Code.
Who controls the cost?

Give each person a key of their own, with a monthly cap and the models it may use. Spending stops at the cap, not at the invoice.

Short answer

Three settings do it

Someone might spend too much in a month
A monthly spend cap on each key; requests are refused at it
Everyone reaches for the most expensive model
A model allowlist on each key, or auto to pick by difficulty
You need to know whose spend it is
Charge keys to teams; read usage by key, model and team

Compared

One shared key, or a Gateway key each

The difference is whether anything stops a problem before it happens.

A shared API key compared with one Agent Lab Gateway key per person
What you manageOne shared API keyA Gateway key each
Who spent whatCannot tellBy key, model and team
Spend capOne for the whole keyOne per key and per team
Which modelsAll of themAn allowlist per key
Someone leavesRotate the key; everyone reconfiguresRevoke that one key
Prompt textDepends on the providerNot stored by the Gateway; metadata only

Details in the docs: Claude Code setup; keys; limits and budgets.

Is it for you

Check both sides first

A good fit

  • Three or more people on Claude Code, with costs to split or expense
  • You want the cap in place before people start
  • The same key should also serve Codex, Cursor or your own code

Worth knowing

  • Model spend is drawn from prepaid credit at list price; each top-up carries a 5% fee
  • Claude Code needs four environment variables, set once on each machine
  • A cap holds the cost before sending: a request that does not fit is refused, not reported later

FAQ

Claude Code through a gateway

How do I point Claude Code at an AI gateway?
Set four environment variables: ANTHROPIC_BASE_URL to https://api.agentlab.cresclab.com, ANTHROPIC_AUTH_TOKEN to your Gateway key, ANTHROPIC_MODEL to the Claude model to use, and ANTHROPIC_DEFAULT_HAIKU_MODEL to a cheap model for its small background calls. Then run claude as usual. Full setup →
What happens at the cap?
The request is refused before it reaches the model, and nothing is charged. The message names the limit, how much is used and when it resets. An owner or admin can raise it.
Can I allow only cheaper models?
Yes. Each key has a model allowlist, and a model outside it is refused. Claude Code can also ask for auto, and the Gateway picks a model from the list by how hard the task is.
Does the Gateway see our code?
Requests pass through the Gateway on the way to the model, but it stores no prompt or reply text: only metadata such as usage, model and cost. How data is handled →
What does it cost?
Turning it on is free, with no credit card. Model spend is at list price with no markup, drawn from prepaid credit; a top-up starts at US$5 and carries a 5% fee.

Make one key for yourself with a small cap, and read a day of usage.