Skip to content

Budget and billing ​

Yi Code works on credit held by your organization, in US dollars. Each turn has a budget, set by you, and is never charged more than that.

Ask us about pricing and credit for your organization through the contact form.

Credit ​

The wallet at the bottom of the sidebar shows the organization's available credit. Click it for "Know where your credit goes":

FigureMeaning
"Available credit"What new turns can use: the balance minus what is held
"Held for tasks"Budgets of turns that haven't been settled yet
"Account balance"Everything credited, minus everything charged

"Account ledger" lists each entry: credit added, trial credit, budget holds and task settlements. "Export ledger CSV" downloads it. Amounts show in dollars and cents.

At the current hosted endpoint, Yi Code uses the organization's Code credit. Subscriptions and balances in the Yi Labs account or another product do not add credit to this wallet. Check the available Code credit shown in the sidebar before starting a turn.

A budget per turn ​

Before you send, the "Budget" chip shows the turn's budget. Open it to change "Turn budget (USD)". It must be:

  • At least the mode's minimum, which covers the longest possible turn on the cheapest available execution environment.
  • At most your available credit.

When the turn starts, its budget is held. When it ends, the actual cost is charged and the rest of the hold is released. Every turn in a session holds and settles its own budget.

What a turn costs ​

A turn is charged for:

  • Model usage: the input, cached input and output tokens of the model calls the agent makes.
  • Execution time: the seconds the execution environment runs the turn.

Rates are pinned when the turn starts, along with the model, role and code. A change of rates later doesn't affect a turn already running. The receipt under each turn shows "Turn cost" and the budget. "Session details" shows the session's total.

Before each model call, Yi Code checks that the known usage plus the call still fits in the turn's budget, the organization's credit and the platform's limit. If it doesn't, the turn stops with "The remaining task, account, or platform budget cannot cover another model request."

Never more than the budget ​

A turn is never charged more than its budget. If the actual cost runs over, for example because a call was already in flight, the difference is on us.

Cancelling a turn charges what was used up to that point, within the budget.

When you're not charged ​

Failures on the platform's side are not charged:

  • The execution environment couldn't be prepared ("Environment preparation failed. This turn is not charged to the customer.").
  • The source couldn't be fetched, for example when the GitHub installation was removed.
  • A virtual machine couldn't be created, or the platform lost contact with it.
  • When the platform has to run something again because it lost contact, you don't pay twice.

Checks we run on model endpoints, and the embeddings that index your knowledge base within its quota, are not charged to turns either.

Usage awaiting reconciliation ​

Sometimes a model provider doesn't report how much a call used, for example after a timeout. Yi Code never assumes that was zero and doesn't retry the call. The turn shows "Usage awaiting reconciliation" and its budget stays held until we settle it from the provider's records. Then the turn is charged, still within its budget.

While a call's usage is unconfirmed, the turn makes no further model calls.

Who sets prices ​

On the cloud service, model and execution rates are set by Yi Labs. Organization owners and administrators can't change them.

Private deployments ​

Private deployments use contract quota, with no online payment. The deployment's operator records credit against a contract reference. yi-admin runs inside the API container, from BUNDLE/deploy with the image variables set as described in Run yi-admin:

sh
docker compose exec api yi-admin credit ORG MICRO --key CONTRACT_REFERENCE

ORG is the value of YI_PRIVATE_ORG_ID. The organization exists once the first person has signed in. MICRO is the amount in millionths of a dollar. The same reference is never credited twice. The ledger and its CSV export show usage locally. See Private and offline deployment.