organization_wallet_not_provisioned vs insufficient_credits (402)
A Format run can fail at create with 402 for two reasons: an empty wallet or an unfunded organization wallet. How to tell them apart and who fixes each.

Both are 402 on create and both mean nothing ran. insufficient_credits says the workspace wallet cannot fund the run, so top it up; organization_wallet_not_provisioned says an organization workspace has no funded wallet at all, so an admin has to fund it. The distinction matters because the person who sees the error is rarely the person who can fix it.
What are the two 402 codes?
The Formats errors page lists the wallet as the gate that applies at create. The workspace must be able to fund the run, or the create fails before anything is spent.
The first code is for a workspace that exists and is funded but is too low. The second is for an organization workspace that has never been given a wallet.
| Code | Meaning | Who acts | Did anything run? |
|---|---|---|---|
| insufficient_credits | Workspace cannot fund the run | Whoever owns the balance adds funds (next_action add_funds) | No |
| organization_wallet_not_provisioned | Organization workspace with no funded wallet | An admin funds it | No |
Why does a team key matter here?
A Format owned by a team workspace is invoked with an API key created in that workspace. The docs state the rule "follows the money": the team Format's runs bill the team wallet, count against the team's generation concurrency, and read media through the team workspace. A personal key held by a team member is refused with 403 workspace_key_required, which is a different error from either 402.
The changelog for v0.2.59 lists "Org / team pooled wallet and team concurrency controls", which is the feature this error belongs to. If you are the engineer and not the admin, the useful move is to send the admin the workspace id and the code, not the key.
How should a client handle both?
Branch on error.code, not on the status alone. Retrying a 402 will not help; the same idempotency key is released after a failed create, so once the wallet is funded you can resend the identical request and get the run.
The snippet below maps the two codes to the right owner. It only reads error.code, which is the documented envelope field.
import json, urllib.error, urllib.request
OWNER = {
"insufficient_credits": "top up the workspace balance",
"organization_wallet_not_provisioned": "ask an org admin to fund the wallet",
}
def explain(req: urllib.request.Request) -> str:
try:
urllib.request.urlopen(req, timeout=30)
return "accepted"
except urllib.error.HTTPError as e:
if e.code != 402:
return f"HTTP {e.code}"
code = json.load(e).get("error", {}).get("code", "")
return OWNER.get(code, f"402 {code}")What does this not tell you?
It does not tell you how much to add. For that, read the rate card, size the run's spend cap, and check GET /v1/balance. A wallet that clears the create gate can still hit the run's own spend cap later, which ends the run as failed, and the two controls are separate: see Spend caps.
Sources
Related posts
More in Pricing
- generation_admission_preview: check before paid hosted MCP calls
Sume's hosted MCP has generation_admission_preview, dry_run and max_spend_usd. What each one checks, when to use it, and when a plain single create is fine.
- Can a per-run spend cap raise the limit? Formats yes, schedules no
Formats honor a per-run generation_spend_cap_usd above the Format cap, schedules clamp it, and Agent Completions require it. Defaults and edge cases.
- Rask AI minute credits and 3x lip-sync vs a Sume dubbing pipeline
Rask bills 1 credit per video minute for Standard lip-sync, 3 for Enhanced. Sume has no dubbing endpoint; a chained pipeline runs about $0.55-$1.55 per 10 min.
- Realtime voice API cost per hour: Grok, GPT-Live-1, Gemini Live
Per-hour cost of realtime voice APIs from the vendors' own pages, set against Sume's async STT plus TTS jobs, with the arithmetic and its assumptions shown.
Written by Sume