Skip to content

Billing and receipts ​

Your workspace has one balance in US dollars. Model calls, sandboxes and VMs all spend from it. It is filled from the paid credit in your Yi Labs account. Every call and resource holds its largest possible cost before it starts and is never charged more than that hold. The balance never goes below zero.

Current prices are on the console's price page, at GET https://cloud.theyilabs.com/v1/catalog for models and at GET https://cloud.theyilabs.com/v1/compute/classes for sandbox and VM sizes.

The balance ​

The Billing page shows:

FigureMeaning
"Yi Labs wallet"What your Yi Labs wallet has that Yi Cloud can use, with a button to top up or change plan in your Yi Labs account.
"Available"What new calls and resources can use: the workspace balance minus what is held.
"Balance"Everything credited to the workspace, minus everything charged.
"Held"Holds of calls and resources that haven't been settled yet.

The Overview page shows the available balance, what is held, and the usage this month.

Paying for Yi Cloud ​

Yi Cloud is paid from the paid credit in your Yi Labs account. To add money, top up or choose a paid plan in your Yi Labs account at https://account.theyilabs.com/billing.

  • Paid credit works: top-ups and the credit a paid plan includes.
  • Free credit doesn't work on Yi Cloud: not the monthly $5, and not the new-user $20.

You don't need to move money to Yi Cloud yourself. When a call or resource needs more than the workspace balance has, Yi Cloud takes a small block from your Yi Labs wallet. The ledger shows each block as an "Adjustment". A block that isn't used goes back to your Yi Labs wallet, also as an "Adjustment". Your Yi Labs account is charged only for what you used. If your workspace already has a balance of its own, that is spent first.

When neither the workspace nor your Yi Labs wallet can cover a hold, the request gets 402 insufficient_funds. The message says why: not enough money (free credit doesn't count), or an unpaid balance in your Yi Labs account. A suspended Yi Labs account gets 403 forbidden instead.

Holds and settlement ​

WhatHeld before it startsCharged
Model callEstimated input tokens plus the maximum output tokens, at the model's pricesThe tokens the model reports, when the call ends
SandboxThe hourly price times timeout_sPer second from ready until deleted, at least 60 seconds, when it ends
VM leaseThe hourly price times hoursIn full, once the VM first runs
VM renewalThe hourly price times hoursAt once
Stopped VMThe stopped rate for the time stoppedEach full hour, and the last part by the second on start or delete

When a call or resource ends, the actual cost is charged and the rest of the hold is released. If the actual cost would be more than the hold, you pay the hold and we cover the difference. A hold left by a model request that lost contact is released within 30 minutes.

Not charged ​

  • A model call that fails before any output.
  • A sandbox that never becomes ready.
  • A VM that never runs.

No monthly cap ​

There is no monthly spending limit. The only limit is money: you can use Yi Cloud while your balance lasts.

  • Only paid credit counts. See Paying for Yi Cloud.
  • When the balance can't cover the next hold, new work gets 402 insufficient_funds. Work that already holds its cost can finish.
  • If your Yi Labs account owes money, new work is refused with a message that says so.
  • If your Yi Labs account is suspended, new work gets 403 forbidden within seconds (at most about a minute). What already ran is still charged; the rest of the money goes back to your Yi Labs wallet.
  • The Billing page shows what was spent and is held this UTC month.

Keys can have their own spend limits. See API keys and limits.

How each product is charged ​

  • Models: by token. Input, cached input and output tokens are priced separately, per million tokens. Each call is rounded up to a whole micro-dollar. When a model doesn't report usage, the cost is estimated and marked "Estimated". See Models API.
  • Sandboxes: per second, with a 60-second minimum, from ready until deleted. See Sandboxes.
  • VMs: the lease is prepaid in whole hours. Stopping doesn't refund it. A stopped VM is charged a stopped rate for its disk and IP address, and is deleted after 24 hours stopped. See VMs.

Prices are fixed when a call or resource starts. A sandbox or VM keeps the hourly price and stopped rate it was created with, for renewals too.

Ledger and receipts ​

WhereWhat
Billing page, "Ledger"Every entry, with UTC time, kind, amount and the balance after it. Kinds are "Hold", "Settled", "Hold released", "Adjustment", "Top-up" and "Refund".
Billing page, "Export CSV"The latest 500 ledger entries: time_utc, kind, amount_usd, balance_after_usd, held_after_usd, ref.
Billing page, "Daily model API receipt"One UTC day of model usage per model and key: requests, tokens and amount. "Download CSV" saves it.
Model API page, "Download usage CSV"The last 30 days of model usage by day, model and key.
Model API page, "Recent requests"Each recent call with its model, status, cost and latency.
Sandboxes and VMs pages, "Download usage receipt"Every charge for one resource.
GET /v1/sandboxes/{id}/receipt, GET /v1/vms/{id}/receiptThe same per resource, as JSON or with ?format=csv.

A resource's JSON receipt has rows (each charge with its kind, quantity, amount_micro and time), total_micro, the resource's hourly and stopped prices, and final. final is true once the resource is deleted and nothing more will be charged.

Ledger entries are only ever added. They are never changed or deleted.

Money in the API ​

The API gives amounts as whole numbers of micro-dollars: 1 USD = 1,000,000. For example 2500000 is $2.50. Fields that hold money end in _micro, such as price_micro_per_hour and total_micro.