Errors
Error codes, responses, and troubleshooting guide
The Finetuning.ai API uses standard HTTP status codes and returns consistent error responses.
Error response format
All errors follow the format:
{
"error": {
"code": "...",
"message": "..."
}
}Error codes
| Code | Status | Description |
|---|---|---|
MISSING_API_KEY | 401 | X-API-Key header was not provided |
INVALID_API_KEY | 401 | API key is malformed, revoked, or does not exist |
PRO_PLAN_REQUIRED | 403 | Your subscription does not include API access |
RATE_LIMITED | 429 | Too many requests — wait and retry |
VALIDATION_ERROR | 400 | Request body is missing or has invalid fields |
MONTHLY_LIMIT_REACHED | 402 | No generations remaining this month |
QUEUE_FULL | 429 | Too many generations in progress |
GENERATION_FAILED | 500 | Generation queue submission failed |
NOT_FOUND | 404 | Resource not found |
INTERNAL_ERROR | 500 | Unexpected server error |
Common issues
"Invalid API key"
{
"error": {
"code": "INVALID_API_KEY",
"message": "API key is malformed, revoked, or does not exist"
}
}Fix: Ensure you're using the X-API-Key header (not Authorization: Bearer). Double-check for extra whitespace or newlines in your key.
"Monthly limit reached"
{
"error": {
"code": "MONTHLY_LIMIT_REACHED",
"message": "No generations remaining this month"
}
}Fix: Upgrade your plan or wait for your monthly limit to reset at finetuning.ai/dashboard.
"Invalid request body"
{
"error": {
"code": "VALIDATION_ERROR",
"message": "duration must be between 10 and 180 seconds"
}
}Fix: Check the message field for details on which fields are invalid.
Generation stuck in "processing"
If a generation stays in processing for more than 5 minutes, it may have failed silently. Contact support.
Need help?
If you're encountering errors not listed here, visit the Support page.