Skip to main content

Errors

Every non-2xx response uses the same JSON shape:

{
  "error": "Key authenticated but is missing the required scope.",
  "code": "scope_missing",
  "requiredScope": "workbench:flows:run"
}
  • error — a human-readable message. Don't branch on it; it's allowed to change for clarity.
  • code — a stable, machine-readable identifier. Switch on this. The set is closed and additive: new codes get added, existing ones are never renamed.
  • Some codes carry extra fields alongside error/coderequiredScope on a scope error, retryAfterSeconds on a rate limit, details (e.g. validation issues) on others.

The codes

StatuscodeWhen
400validationThe request is malformed — a bad param, body, or query. details may list the offending fields.
400workspace_requiredA personal token call didn't resolve a workspace (no default set, none passed).
401auth_missingNo Authorization: Bearer … header.
401auth_invalidUnknown key, wrong secret, or revoked. All three funnel into the same response.
402plan_limitA spend or count limit was reached — a key's cost cap, the workspace's inference balance, or a per-plan count cap.
402plan_gateThe feature isn't included on the workspace's plan. Upgrade to use it.
403scope_missingAuthenticated, but the credential lacks the route's scope. requiredScope names it.
403forbiddenAuthenticated, but the credential isn't allowed here — e.g. a personal key on a route that only accepts a workspace key.
403workspace_suspendedThe workspace this credential belongs to is temporarily unavailable. Contact support.
404not_foundThe resource doesn't exist, or isn't visible to this credential. The response is the same either way.
404flow_not_publishedA pinned revision or published version doesn't exist for the flow.
409conflictThe request conflicts with current state — e.g. an idempotency key reused with a different body, or an archived eval.
429rate_limitedA request rate limit tripped. Honor Retry-After.
504timeoutA run exceeded its timeoutMs ceiling. A partial timeline may be in details.
503service_unavailableA required upstream dependency is temporarily unavailable. Retry with backoff.
500internal_errorSomething went wrong on our side. Safe to retry with exponential backoff.

Endpoints add a few of their own codes within this set — those are listed on each endpoint's reference page.

3 min read