Error codes
All API errors return a JSON body with an error field containing a machine-readable code and a human-readable message.
{ "error": "credit_insufficient", "message": "Your balance is too low for this generation. Top up at https://depicta.ai/dashboard/billing"}Error reference
Section titled “Error reference”| HTTP | Code | Meaning | What to do |
|---|---|---|---|
| 400 | bad_request | Invalid request body or parameters | Check the request against the API reference |
| 401 | auth_invalid | Missing or invalid API key | Verify your key starts with dpct_ and is active |
| 402 | credit_insufficient | Balance below EUR 0.01 | Top up credits in the dashboard |
| 403 | auth_email_not_verified | Email not verified | Check your inbox for the verification link |
| 403 | content_rejected | Prompt or image violated content policy | Revise your prompt and try again |
| 403 | account_suspended | Account suspended | Contact support via the dashboard |
| 404 | not_found | Endpoint or resource not found | Check the URL and method |
| 413 | payload_too_large | Upload exceeds 50 MB | Reduce file size before uploading |
| 429 | rate_limited | Too many concurrent requests (max 10) | Wait for the Retry-After header duration |
| 500 | internal_error | Server error | Retry with backoff; check the status page |
CLI exit codes
Section titled “CLI exit codes”The CLI maps API errors to exit codes:
| Exit code | Meaning | Corresponding HTTP |
|---|---|---|
| 0 | Success | 200, 201, 202 |
| 1 | General error | 400, 404, 500 |
| 2 | Authentication failure | 401, 403 (auth) |
| 3 | Insufficient credits | 402 |
| 4 | Content rejected | 403 (content) |
| 5 | Rate limited | 429 |