Errors
Every error the API returns and every error the program raises, with what causes it.
An API error answers with the HTTP status from the table below and a JSON body { "error": { ... } } with these fields:
| Field | Type | Meaning |
|---|---|---|
code | string | One of the codes below. |
message | string | A sentence to show a person. |
retryable | boolean | Whether the same request can succeed later unchanged. |
stage | string | Where the request stopped. |
fieldErrors (optional) | object (free form) | Per-field problems of a refused request body. |
programError (optional) | object | The program, error name and code of an on-chain failure. |
retryAfterSeconds (optional) | integer | Seconds to wait before retrying. |
requestId (optional) | string | Identifier to quote when reporting the error. |
requiredBaseUnits (optional) | base units | Credits the action needed, base units. |
availableBaseUnits (optional) | base units | Credits available, base units. |
capBaseUnits (optional) | base units | The agent cap that was hit, base units. |
spentBaseUnits (optional) | base units | What the agent key has spent today, base units. |
expiresAt (optional) | UTC timestamp | When the quote or request expired. |
topUp (optional) | boolean | True when adding credits resolves the error. |
reason (optional) | string | For x402, the machine-readable reason a payment was refused, such as quote_expired. |
stage is one of validation, auth, read, upload, build, wallet, co_sign, simulation, send, confirmation. When a transaction fails on chain, programError names the program error from the second table.
#API errors
| Code | HTTP | Raised when |
|---|---|---|
VALIDATION_ERROR | 400 | The request body or query does not match its schema. fieldErrors names the fields. |
| 401 | The route needs a session or an agent token and the request has neither; the sign-in proof is wrong or already used; or an agent token called a route that builds a transaction for the wallet to sign. | |
ORIGIN_NOT_ALLOWED | 403 | A browser request came from an origin the API does not serve. |
NOT_FOUND | 404 | The instance, job, receipt, transaction or GPU model does not exist for this caller. |
| 409 | The on-chain program cannot be reached right now. | |
CONFIGURATION_REQUIRED | 409 | The action needs a configuration value that is not set yet, such as a generation provider key. |
IDEMPOTENCY_CONFLICT | 409 | An idempotencyKey was reused with a different request. |
TRANSACTION_EXPIRED | 409 | The built transaction's blockhash expired before it was signed and sent. Build it again. |
PAYLOAD_TOO_LARGE | 413 | The request body is too large. |
UNSUPPORTED_MEDIA_TYPE | 415 | The request body is not JSON. |
SIMULATION_FAILED | 422 | The signed transaction failed simulation. programError names the program error. |
CHAIN_REFUSED | 422 | The transaction landed and failed on chain. programError names the program error. |
RATE_LIMITED | 429 | Too many requests. Wait retryAfterSeconds. |
INTERNAL_ERROR | 500 | The API failed. Quote requestId when reporting it. |
| 502 | A service the API depends on (RPC, GPU provider, generation provider) did not answer. | |
AUTH_NONCE_EXPIRED | 401 | The sign-in nonce expired. Ask for a new one. |
AUTH_SIGNATURE_INVALID | 401 | The sign-in signature does not verify for the public key. |
SESSION_EXPIRED | 401 | The session has expired. Sign in again. |
AGENT_TOKEN_INVALID | 401 | The bearer token is not a known agent token. |
AGENT_TOKEN_REVOKED | 403 | The agent token's key has been revoked. |
CREDITS_TOO_LOW | 409 | The balance is below what the action needs: a launch's headroom or a generation's estimate. requiredBaseUnits, availableBaseUnits and topUp say by how much. |
GPU_SOLD_OUT | 409 | The GPU model has no free machine. |
| 503 | No machine of that model can be quoted right now. | |
INSTANCE_NOT_STOPPABLE | 409 | The instance is already stopping, stopped or failed. |
INSTANCE_NOT_EXTENDABLE | 409 | The rental is not running, so it cannot be extended. |
METER_ALREADY_REGISTERED | 409 | The rental's meter has already registered; a meter registers once. |
EXTENSION_PENDING | 409 | The rental already has an extension that is not in use yet. |
QUOTE_EXPIRED | 409 | The deposit quote expired. Ask for a new one. |
QUOTE_ASSET_UNSUPPORTED | 409 | The asset is not a supported payment asset. |
WALLET_REJECTED | 409 | The wallet declined to sign. |
AGENT_CAP_EXCEEDED | 409 | The charge is above the agent key's per-request cap. capBaseUnits holds the cap. |
AGENT_DAILY_CAP_EXCEEDED | 409 | The charge would take the agent key past its per-day cap. capBaseUnits and spentBaseUnits say how far. |
AGENT_KEY_REVOKED | 409 | The agent key named in the request is revoked. |
ASSET_NOT_LIVE | 409 | The asset has no mint yet: SHDR deposits and Earn wait for the token. |
PAYMENT_REQUIRED | 402 | An x402 route was called without PAYMENT-SIGNATURE. The PAYMENT-REQUIRED header says what to pay. |
PAYMENT_INVALID | 402 | The PAYMENT-SIGNATURE payload is not base64 JSON, or does not match the requirement it answers. |
PAYMENT_SETTLEMENT_FAILED | 502 | The x402 payment verified but could not be settled on chain. |
TRANSACTION_NOT_FOUND | 404 | No transaction with that id or signature is known. |
NOT_IMPLEMENTED | 501 | The route is not available on this server yet. |
#Program errors
Custom errors of the shader program. A failed transaction's logs show the code in hex; the first "Program … failed" line names the program it belongs to.
| Code | Name | Message | Raised by |
|---|---|---|---|
6000 (0x1770) | The caller is not authorized for this instruction | deposit_shdr, migrate_config, record_x402_revenue, set_require_meter, set_shdr_mint, settle, update_config, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue | |
6001 (0x1771) | The requested authority is invalid | initialize, update_config | |
6002 (0x1772) | Fee share basis points must not exceed 10,000 | initialize, update_config | |
6003 (0x1773) | InvalidMint | The supplied mint does not match configuration | burn_used, claim, deposit_shdr, deposit_usdc, fund_earn, initialize, record_x402_revenue, set_shdr_mint, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue |
6004 (0x1774) | TokenProgramMismatch | The supplied token program does not own the mint | burn_used, claim, deposit_shdr, deposit_usdc, fund_earn, initialize, record_x402_revenue, set_shdr_mint, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue |
6005 (0x1775) | ShdrMintNotSet | The SHDR mint has not been set | burn_used, claim, deposit_shdr, fund_earn, stake, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake |
6006 (0x1776) | ShdrMintAlreadySet | The SHDR mint has already been set | set_shdr_mint |
6007 (0x1777) | QuoteExpired | The price quote has expired | deposit_shdr |
6008 (0x1778) | ZeroAmount | An amount must be greater than zero | deposit_shdr, deposit_usdc, fund_earn, record_x402_revenue, stake, unstake, withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake, withdraw_revenue |
6009 (0x1779) | ZeroCredits | Credits must be greater than zero | deposit_shdr |
6010 (0x177a) | NoTokensReceived | The transfer credited no tokens | deposit_shdr, deposit_usdc, fund_earn, stake |
6011 (0x177b) | TreasuryBalanceDecreased | The treasury balance unexpectedly decreased | deposit_usdc |
6012 (0x177c) | EscrowBalanceDecreased | The escrow balance unexpectedly decreased | deposit_shdr |
6013 (0x177d) | RewardVaultBalanceDecreased | The reward vault balance unexpectedly decreased | fund_earn |
6014 (0x177e) | StakeVaultBalanceDecreased | The stake vault balance unexpectedly decreased | stake |
6015 (0x177f) | CreditAccountNotInitialized | The credit account is not initialized | settle |
6016 (0x1780) | CreditAccountWrongWallet | The credit account belongs to another wallet | deposit_shdr, deposit_usdc, initialize |
6017 (0x1781) | NonceMismatch | Settlement nonce does not match | settle |
6018 (0x1782) | EmptySettlement | Settlement must contain at least one line | settle |
6019 (0x1783) | InvalidSettlementKind | Settlement kind is invalid | settle |
6020 (0x1784) | TooManySettlementLines | Too many settlement lines | settle |
6021 (0x1785) | AgentKeyIndexOutOfBounds | Agent key index is out of bounds | settle |
6022 (0x1786) | AgentKeyNotWritable | Agent key must be writable | settle |
6023 (0x1787) | AgentKeyWrongWallet | Agent key belongs to another wallet | revoke_agent_key, settle, update_agent_key |
6024 (0x1788) | InvalidAgentKey | Agent key does not match its PDA | settle |
6025 (0x1789) | AgentKeyRevoked | Agent key is revoked | revoke_agent_key, settle, update_agent_key |
6026 (0x178a) | PerRequestCapExceeded | The requested amount exceeds the agent key request cap | settle |
6027 (0x178b) | PerDayCapExceeded | The requested amount exceeds the agent key daily cap | settle |
6028 (0x178c) | InvalidLabel | Agent key label is longer than 32 bytes | create_agent_key |
6029 (0x178d) | InvalidLaunchWallet | Launch wallet does not match configuration | sweep_fee_share |
6030 (0x178e) | WithdrawExceedsRevenue | The withdrawal exceeds available revenue | withdraw_revenue |
6031 (0x178f) | ExcessWithdrawalExceedsAvailable | The withdrawal exceeds available excess tokens | withdraw_excess_rewards, withdraw_excess_shdr, withdraw_excess_stake |
6032 (0x1790) | ShdrEscrowStillOwed | The SHDR escrow still backs unused credits or pending burns | withdraw_excess_shdr |
6033 (0x1791) | InsufficientStake | Insufficient SHDR stake | unstake |
6034 (0x1792) | StakeWrongWallet | Earn stake belongs to another wallet | claim, stake, unstake |
6035 (0x1793) | MathOverflow | Arithmetic overflow | burn_used, claim, deposit_shdr, deposit_usdc, fund_earn, record_x402_revenue, settle, stake, sweep_fee_share, unstake, withdraw_revenue |
6036 (0x1794) | MathUnderflow | Arithmetic underflow | claim, fund_earn, record_x402_revenue, settle, stake, sweep_fee_share, unstake, withdraw_excess_rewards, withdraw_revenue |
6037 (0x1795) | X402RevenueExceedsTreasury | The treasury cannot cover outstanding USDC credits and the fee share after recording x402 revenue | record_x402_revenue |
6038 (0x1796) | MeterSealMissing | No preceding Ed25519 instruction verifies this meter seal with local offsets | checked arithmetic and balance checks |
6039 (0x1797) | MeterKeyMismatch | The meter key or GPU UUID hash does not match the pinned identity | checked arithmetic and balance checks |
6040 (0x1798) | MeterUnitsExceedSigned | Settlement units exceed the meter's signed count | checked arithmetic and balance checks |
6041 (0x1799) | MeterMinuteNotIncreasing | The meter's minute must increase | checked arithmetic and balance checks |
6042 (0x179a) | MeterRequired | This rental must have a signed meter proof | settle |
6043 (0x179b) | MeterAccountMissing | A metered line is missing its RentalMeter account | settle |
6044 (0x179c) | InvalidMeterAccount | The RentalMeter account must be the writable PDA for the job | checked arithmetic and balance checks |
6045 (0x179d) | MeterIdentityRequired | A new RentalMeter needs its meter key and GPU UUID hash | checked arithmetic and balance checks |
6046 (0x179e) | MeterRentalOnly | Only rental lines can carry meter proofs | settle |
6047 (0x179f) | MeterAlreadyClosed | A last line must be the final metered line for its job | settle |
6048 (0x17a0) | ConfigLayoutNotMigratable | Config is not a legacy account eligible for migration | migrate_config |