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.

4 min read · Updated Nov 9, 2026

Give each piece of work its own key, set its limits, and know who pays. The project's owner pays for every request.

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

Under Account → Billing → Provider keys, add your own keys for OpenAI, Google Gemini, UF NaviGator or another OpenAI-compatible endpoint. Requests then bill your provider, not VIABLE credits, with no code changes. Keys for one provider form a key pool: when one runs out or is rejected, the next takes over. A lab can pool its grant keys.

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.

No project has a budget until its owner sets one, so nothing stops on its own.

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