Clatter Labs
Console

Overview

Errors

Error format, status codes and error codes.

Every error is JSON with a code you can branch on and a message for people:

JSON
{ "error": { "code": "invalid_api_key", "message": "This API key is invalid or was revoked." } }
StatusCodes
400bad_request
401invalid_api_key, missing_account_id, account_mismatch
402out_of_credits
403insufficient_scope, early_access, no_cloud_account, account_suspended (with resets_at and Retry-After; see the Abuse policy)
404not_found
405method_not_allowed
410model_retired (Model API: a retired model id, see Line Code retirement)
413too_large
429rate_limited, too_many_runs, window_limit_reached, weekly_limit_reached, monthly_limit_reached (app usage; with resets_at and Retry-After)
502upstream
503unavailable

The Errors guide explains each code and what to do about it.