Errors
Error codes, HTTP statuses, and how to handle them.
Envelope
Every error follows this shape:
{
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "You have 0 credits remaining. Please upgrade your plan.",
"doc_url": "https://docs.createa.meme/errors/insufficient-credits"
}
}Codes
| Code | HTTP | Meaning |
|---|---|---|
INVALID_API_KEY | 401 | Key doesn't exist or is revoked |
EXPIRED_API_KEY | 401 | Key has passed its expiration date |
SUSPENDED_API_KEY | 403 | Key suspended for abuse or non-payment |
RATE_LIMITED | 429 | Too many requests per minute |
INSUFFICIENT_CREDITS | 402 | Not enough credits for this operation |
VALIDATION_ERROR | 400 | Request body failed schema validation |
TEMPLATE_NOT_FOUND | 404 | Template ID doesn't exist |
JOB_NOT_FOUND | 404 | Async job ID doesn't exist |
GENERATION_FAILED | 500 | AI model returned an error |
MODEL_UNAVAILABLE | 503 | Requested AI model is temporarily down |
NSFW_REJECTED | 422 | Content flagged by moderation filter |