Skip to main content
The app and member MCP use your subscription allowance. REST billing depends on your credential, including when you use the CLI or SDK. Choose the app for direct work, MCP inside another assistant, or REST through HTTP, CLI, or SDK for an integration. The CLI and SDK do not have separate usage prices. MCP is for interactive work inside an assistant. Automated or machine-scale traffic must use the REST API.
Contracted partner accounts can have API-key MCP traffic billed to the API wallet. OAuth still uses the subscription allowance. Confirm partner terms with your StefanBrain contact.

REST API rates

The wallet bills per token. One rate applies to every request; there is no model parameter.
  • Repeated tokens in a conversation bill at the cached-input rate automatically.
  • Cache writes bill as ordinary input. There is no separate write premium.
  • An Agent Run that stops at the runtime’s step limit (last_error: "budget_limited") is not billed.
  • Non-token usage, including image generation and web search, bills per use. The wallet history shows the exact charge.
  • Video generation remains on its own per-minute meter.
  • Wallet-billed calls and plan-pool calls remain separate. The credential and any partner billing rule select the lane for each request.

Included credit

Your plan adds API credit to the wallet at the start of its billing cycle. This credit is separate from your app and MCP allowance. Monthly plan credit resets each cycle and is spent before purchased top-ups. Purchased top-ups remain available until spent, for a maximum of 12 months.

When the wallet runs low

Each wallet-billed request that starts work first places a temporary hold on the wallet (currently $4.38). A sync tool call releases it when it returns. An Agent Run, a parked ask_stefanbrain, or a submitted job keeps it until that work ends, for at most 8 hours. A job the agent starts during a wallet-billed Agent Run, such as images or a funnel review, bills the wallet too and takes its own hold until it ends. A request returns 429 api_wallet_exhausted when the balance minus active holds is below one hold. A wallet can refuse new work before $0; each concurrent run uses one hold. The refusal body contains:
  • error.code: api_wallet_exhausted.
  • error.type: rate_limit_error.
  • error.message: available credit, the required hold, any active holds, and how to add API credit in Settings → Developers.
  • retryable: false. Add credit or let active holds release before submitting again.
  • Top-level resets_at: the wallet’s reset timestamp, or null when unavailable. This is not a short-retry delay or a promise of renewed credit.
  • refusal: the typed reason, with kind: "budget_exhausted", funding: "wallet_hold", resetsAt, and the same remedy message.
The message explains that holds release as requests finish and that you pay only for actual usage. It also distinguishes API credit from your normal chat allowance. When monthly credit renews, the message can include its renewal date; trial credit is one time. Wallet refusals do not include a structured wallet balance object or a Retry-After header. Responses that start billable work do not include wallet-state headers.

Read your wallet balance

Call the read-only account_status tool with {"lane":"rest"} or {"lane":"all"}. Over REST, use POST /api/developers/v1/tools/account_status with {"arguments":{"lane":"rest"}} and read structured_content.api_wallet. Over MCP, read structuredContent.api_wallet.
  • api_wallet.balance_usd reports the wallet balance in US dollars. It does not subtract active holds, so it is not the amount available for a new request.
  • api_wallet.monthly_credit_usd reports the included credit amount in US dollars. Trial credit is one time.
account_status does not expose active holds, spendable credit, or a wallet reset timestamp. Use the refusal’s message for available credit and holds, and its top-level resets_at for the reset time. For standard member accounts, plan-pool traffic is not affected by an empty API wallet. Wallet-routed partner traffic remains subject to the wallet. See Rate limits for throughput limits, which are separate from wallet and key-budget limits.