Skip to navigation

Errors

Error envelope, codes and what to do next
View as Markdown

Errors that happen before a run exists use one envelope:

{
"error": {
"code": "PRICING_CHANGED",
"message": "The price of this tool changed since describe; nothing was executed",
"hints": [{ "code": "DESCRIBE_TOOL", "message": "Read the current contract and pricing_version with describe, then invoke again.", "params": { "tool_id": "exa.search" } }],
"details": { "current_pricing_version": "…" }
}
}

When a run was created and then blocked or failed, the response is the Run itself with status and error, so you always keep the run_id. Hints are generated by AgentRouter; provider text never becomes a hint.

Refused before anything runs (never charged)

HTTPCodeWhat to do
400INVALID_REQUESTFix the request body.
400INPUT_INVALIDFix input to match input_schema; details.issues lists the problems.
400PRICING_VERSION_REQUIREDDescribe the tool and send its pricing_version.
400PRICE_NOT_CLIENT_SETTABLERemove price or multiplier fields; AgentRouter sets them.
401UNAUTHENTICATED, INVALID_CREDENTIALSend a valid API key or OAuth token.
403INSUFFICIENT_SCOPEThe credential lacks a permission (for example invoke or topup).
404TOOL_NOT_FOUND, RUN_NOT_FOUNDUse find; runs are visible only to their own account.
409PRICING_CHANGEDThe price changed after describe, including a free promotion ending. Describe again and decide with the new price.
409TOOL_VERSION_CHANGEDDescribe again; the schema may have changed.
409TOOL_NOT_ENABLED, PRICE_UNAVAILABLEThe tool cannot run right now; choose another.
409IDEMPOTENCY_KEY_CONFLICTThe key was used for a different request; use a new key.

Blocked runs (recorded, never charged)

These come back as a Run with status: BLOCKED, error.origin: client and billing.reason: blocked_before_execution.

HTTPerror.codeMeaning
402INSUFFICIENT_BALANCEAvailable balance cannot cover the hold; the provider was not called and no funds were reserved or charged. Follow TOP_UP, or wait for other holds to release, then make a new attempt. See holds and insufficient balance.
409MAX_COST_EXCEEDEDThis input can cost more than max_cost_usd. The RAISE_MAX_COST hint gives the amount; raise it only if the user allows.
409BUDGET_EXCEEDEDAn account, key or session budget would be exceeded.
409PROMOTION_EXHAUSTED, FREE_CALL_QUOTAA free promotion’s budget or your daily free calls ran out. It never turns into a paid call by itself; describe again to see the current price.

Blocked runs do not automatically resume when balance or limits change. After resolving the cause, invoke again with a new Idempotency-Key if you use one; the old key keeps returning the original blocked run.

Failed runs

error.originChargedWhat to do
providerNoThe provider returned an error (bad target, not found, rate limit). If retryable is true, a RETRY_LATER hint gives a delay; a new invoke is a new call.
platformNoAgentRouter failed. Retry later.

TIMED_OUT and STOPPED runs are not charged either.

Other errors

HTTPCodeMeaning
404NO_RESULTThe run has no stored result (it failed, was blocked, or is still running).
410RESULT_EXPIREDThe stored result passed its retention.
409RUN_ALREADY_FINISHED, RUN_NOT_STOPPABLEStop is not possible.
409NOT_DISPUTABLE, DISPUTE_WINDOW_CLOSED, DISPUTE_ALREADY_OPENSee disputes.
429RATE_LIMITEDSlow down.
503TOPUPS_UNAVAILABLETop-ups are off; contact support to add funds.

CLI exit codes

CodeMeaning
0OK
1Error
2Usage
3Authentication
4Run failed
5Price or version changed (nothing ran)
6Blocked by budget or balance
7Still running (use runs get --wait)
8Output file not written (the run is unaffected)
9Not found