Errors return JSON with an error string.
Status codes
Retry guidance
Retry 429 after the current minute window resets. Retry 503 with backoff. Do not retry 400, 401, 403, or 415 without changing the request.
402 and monthly-cap 429 responses mean the workspace hit a plan quota with overage disabled or unavailable on that tier. Check response quota headers when present, then compare against Limits. Enable overage in Settings → Usage on Pro+ when your plan supports it, or upgrade via Pricing.
Error handling pattern
Read the API key from a server environment variable. Never hardcode keys in source files or commit them to git.
Last modified on June 27, 2026