Clatter Labs
Console

Cosmos Agent

Errors

Every error the Agent API returns, what it means, and what to do.

Errors are JSON with a stable code and a human-readable message:

JSON
{ "error": { "code": "out_of_credits", "message": "You're out of Clatter Labs credits. ..." } }
StatuscodeMeaningWhat to do
400bad_requestMissing input, or a bad tierFix the request
401invalid_api_keyThe key is wrong or revokedCheck the key, or create a new one
401missing_account_idNo X-Clatter-Account headerSend your Account ID
401account_mismatchThe Account ID doesn't own this keyUse the key owner's Account ID
402out_of_creditsYour credit balance is used upSee Credits
403insufficient_scopeThe key lacks the permissionCreate a key with that permission
403early_accessYour account isn't in the early-access program yetAsk for access
403no_cloud_accountYour account hasn't been set up for Cosmos AgentSign in once to a Cosmos Agent app with this account, then retry. If it persists, visit the Help Center
403account_suspendedYour account is paused for 24 hours under the Abuse policyWait until resets_at (Retry-After seconds), or appeal through the Help Center
404not_foundNo run with that id on your accountCheck the id
405method_not_allowedWrong HTTP methodSee the endpoint's reference
413too_largeinput, metadata or the body is too bigSee Limits
429rate_limitedOver the key's requests per minuteWait Retry-After seconds
429too_many_runs5 runs already in progressWait for one, or cancel one
502upstreamCosmos Cloud didn't answerRetry with backoff
503unavailableThe key couldn't be checked right nowRetry with backoff

Runs that fail

A run that starts but can't finish ends with status: "failed" and an error:

JSON
"error": { "code": "out_of_credits", "message": "You're out of Clatter Labs credits." }

code is out_of_credits when the balance ran out midway, otherwise run_failed.

Rate limit headers

Successful keyed responses carry X-RateLimit-Limit and X-RateLimit-Remaining. A 429 adds Retry-After (seconds).