Keys, credit and costs

Give each app, course and chat page a key paid the way you intend, and know who pays for every request.

5 min read · Updated Nov 21, 2026

Give each piece of work its own key and set its limits. Requests use the project owner’s VIABLE credits or a provider pool available to that project.

API keys

An API key, made in Operate → API keys, is how code calls VIABLE.

  • A service key belongs to the project and keeps working when people leave. Only the owner makes one. Use it for apps, courses and chat pages.
  • A personal key belongs to the member who made it. It stops if they are paused, leave or become a viewer.

Choose Create key (editors see Create personal key), set its Scopes, Limits and Model access, and keep the secret on your server. Before someone leaves, the owner can choose Make service key on their key.

  • Scopes: courses and chat pages need Run agents (agents:execute).
  • Limits: Requests per minute, Daily tokens and Monthly cost (USD), all optional.
  • Model access: with Selected models only, allow every model the key's agents use.

Pausing a key can be undone; revoking can't. Either one stops the courses, chat pages and knowledge bases that run on the key, and the confirmation names them.

A course's or chat page's key

  • A course: its Settings → The AI → The AI key: who pays for the course's AI. AI messages per learner per day can cap each learner.
  • A chat page: the agent's Chat page → Key & limits → Runs on.

Use a service key, one per course or chat page, so Usage shows what each costs.

Warning

A whole class shares the course's key. A low daily token limit can stop the AI for all 30 learners mid-lesson.

Provider keys and key pools

In New project, choose Bring your own key and pick Saved pool, Key I added, or Paste a key. Key I added copies your saved key into a pool for the new project. Each copy tracks its own usage and shares the same provider balance.

  • Personal pool belongs to your account. You choose which projects you own can use it. Their members can see which pool pays in Project Overview.
  • Project pool belongs to one project. Its owner and allowed editors manage it, and it stays with the project if ownership changes.

Saved secrets stay hidden. When a pool has several keys, it can try the next key if one runs out or is rejected.

Under Account → Billing → Provider keys, Keys you added to projects shows where each contribution lives. Those projects can keep using a key after you leave. You can still manage your own key or Copy it to a personal pool. Once you leave, the pool detail shows just your keys and their usage.

Credit and who pays

Account → Billing → Credits shows one balance. Every project you own draws from it, whichever member's key made the request.

Request Paid by
A catalog model whose provider has a pool set to Every … model request That pool
A catalog model with no such pool The owner's VIABLE credits
A model called as @name/<model> That pool
A pool with no key available An error, or credits if the pool chose Use VIABLE credits

The project's Overview shows the result under How this project is billed.

A knowledge base's embedding is billed to the key its settings name in Billed to key: see Who pays for it.

Costs are estimated from listed model prices; an agent run costs the sum of its model calls. When credit runs out, requests fail with 429 account_credit_exceeded, but provider-key requests keep working.

The project's budget

Without a budget, a project can spend up to its owner's whole credit, and a key's limits don't hold an editor back, since editors can change them. The budget caps how much of the owner's VIABLE credits the project uses. The owner sets it in the project's Settings → Budget: turn on Stop at a budget, enter the Amount (US dollars), and choose whether it Counts In all or Each month (a month is counted in UTC and starts again on the 1st).

  • It counts what every key in the project spends in VIABLE credits, whoever made the key.
  • Provider keys are their own pools: whoever added one pays for it and sets its limits under Provider keys. What they pay doesn't count, and requests on them keep working past the budget. That includes the owner's own provider keys.
  • When it's reached, requests that would use credits fail with 429 project_budget_exceeded. The project's API keys, its courses' AI and its chat pages stop until the owner raises it, and learners are told the AI credit is used up. Requests already running can pass it slightly.
  • A key pool set to Use VIABLE credits when no key is available (its When no key is available setting; the default is Stop with a clear error) uses the owner's credits, so it does that only while the budget has room. Past it, its requests fail with 429 project_budget_exceeded, naming the pool, rather than saying the provider is out of credit.
  • Email me when it reaches emails the owner at each percentage they choose (50%, 80% and 100% to start), once each period, within about a minute of spending reaching it, whether or not another request comes. Under Also email, the owner can pick members to get the same emails; nobody is added on their own, and anyone who leaves stops getting them.
  • Every member sees the budget and what has been spent on the project's Overview. Changes, under the budget, lists each change and who made it.

This page is also plain Markdown at /docs/project/keys-and-costs.md. Point your AI at /llms.txt to find every page.