Agent Spend Errors

Error codes, retry behavior, and operator actions for Dino's public agent-spend API.

All public agent-spend errors use this shape:

{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded",
    "details": {}
  }
}

#Error catalog

CodeHTTPMeaningRetry?What to do
invalid_api_key401Missing, malformed, or unknown Dino spending keyNoCheck the Authorization header and key value
revoked_api_key403Spending key was revokedNoIssue a new key and rotate the runtime
invalid_request400 or 409Bad request body or idempotency misuseSometimesFix the payload, or retry with the same idempotency key if the original request may have succeeded
funding_source_budget_exceeded402Parent funding-source limit would be exceededNoTop up or increase the funding-source limit
plan_spend_volume_exceeded402Workspace plan cap for monthly agent-spend volume was exceededNoReduce spend volume or upgrade plan limits
rate_limited429Too many requests in a short periodYesBack off and retry
internal_error500Unexpected server errorYesRetry with backoff while preserving the idempotency key
not_found404Spend request or account not found in the current scopeNoCheck the identifier and owning account/team

#Retry guidance

  • Retry 429 and 500 with exponential backoff.
  • Preserve the same idempotency key when retrying POST /v1/spend.
  • Do not blindly retry 401, 403, 404, or 402 responses.

#Idempotency guidance

For POST /v1/spend, always send an Idempotency-Key header or idempotency_key field.

  • Same key + same logical request: safe replay, returns the original spend request
  • Reused key for a conflicting request: returns invalid_request

#Funding limit details

When Dino returns funding_source_budget_exceeded, the details object can include:

  • limit
  • spent
  • remaining
  • period
  • windowStart
  • windowEnd

Use those fields to explain the failure to operators or automation logs.