Error Codes
API error response format and all possible error codes.
Error Response Format
All errors follow the same format:
{
"error": {
"code": "rate_limit_exceeded",
"message": "You've used all 500 generations for this month. Upgrade to Starter for 10,000/month at $15/mo.",
"retry_after": 1711929600
}
}| Field | Description |
|---|---|
code | Machine-readable error code |
message | Human-readable explanation |
retry_after | Unix timestamp (only for rate limit errors) |
Error Codes
| HTTP Status | Code | Cause |
|---|---|---|
| 400 | invalid_parameter | Bad parameter value or combination |
| 400 | invalid_template | Unknown template name |
| 401 | missing_api_key | AI generation requested without a key |
| 401 | invalid_api_key | Key is malformed or revoked |
| 429 | rate_limit_exceeded | Monthly or daily limit hit |
| 429 | ip_rate_limit | Free tier IP-based limit exceeded |
| 500 | generation_failed | AI model returned an error |
| 503 | service_unavailable | Temporary outage, retry with backoff |
Common Scenarios
Missing API key for AI generation
# This returns 401 because topic requires a key
curl "https://api.yaddayadda.io/v1/generate?topic=fintech"{
"error": {
"code": "missing_api_key",
"message": "AI generation requires a free API key. Get one at yaddayadda.io/dashboard/api"
}
}The Hobby tier is free and includes 500 AI generations per month. Get a key to start using AI generation.
Invalid template name
curl "https://api.yaddayadda.io/v1/generate?template=fake_template"{
"error": {
"code": "invalid_template",
"message": "Unknown template: fake_template. See docs for available templates."
}
}IP rate limit exceeded
{
"error": {
"code": "ip_rate_limit",
"message": "Free tier limit exceeded. 1,000 requests per day per IP."
}
}