Overview
The Concentrate AI API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON body with details about what went wrong.Error Response Format
All errors follow this structure:Status Codes
Error Types
400 Bad Request
Invalid or malformed request parameters.Invalid Model Name
Invalid Model Name
- Model doesn’t exist
- Typo in model name
- Unsupported model
- Check supported models list
- Verify spelling and format
- Use provider prefix format:
provider/model
Missing Required Fields
Missing Required Fields
- Required parameter not provided
- Empty or null value
- Include all required fields:
modelandinput - Ensure values are not null or empty
Invalid Parameter Type
Invalid Parameter Type
- Wrong data type for parameter
- Invalid enum value
- Check parameter types in API reference
- Use correct data types (string, number, boolean, etc.)
Invalid Parameter Value
Invalid Parameter Value
- Value outside allowed range
- Negative value for positive-only fields
- Review parameter constraints
temperature: 0.0 - 2.0top_p: 0.0 - 1.0max_output_tokens: > 0
401 Unauthorized
Authentication failed or API key is invalid.- API key is missing
- API key is invalid or revoked
- Wrong header format
402 Payment Required
Insufficient credits to complete the request.- Account credit balance too low
- Request would exceed credit limit
- Free tier exhausted
-
Check your balance:
- Visit dashboard
- View credit usage and remaining balance
-
Add credits:
- Purchase additional credits
- Upgrade your plan
-
Optimize requests:
- Reduce
max_output_tokens - Use cost-optimized models
- Enable auto routing with
routing: { strategy: "min", metric: "cost" }
- Reduce
424 Failed Dependency
The requested provider is unavailable.- Provider experiencing outage
- Model temporarily unavailable
- Regional restrictions
- Retry with exponential backoff
- Specify alternative provider
429 Too Many Requests
Rate limit exceeded.- Exceeded requests per minute limit
- Too many tokens per minute
- Burst limit exceeded
- Implement rate limiting in your code
- Use exponential backoff
- Batch requests when possible
- Upgrade plan for higher limits
500 Internal Server Error
Server-side error. These are rare and usually temporary.- Temporary server issue
- Unexpected error condition
- Any provider internal error (e.g., an outage at an upstream provider)
- Retry the request after a short delay
- If persists, contact support
503 Service Unavailable
The service is temporarily unable to handle the request. Unlike a500, this signals a capacity or availability condition rather than an unexpected failure, so the same request is likely to succeed shortly.
- The API is shedding load during a traffic burst
- A dependency required to serve the request is temporarily unavailable
- Retry with exponential backoff and jitter
- If a
Retry-Afterheader is present, wait at least that long before retrying - If it persists across several minutes, check status.concentrate.ai
504 Gateway Timeout
The upstream provider did not respond within the allowed time window. The request reached the provider, so it may have been partially processed.- The upstream provider is slow or degraded
- A very large prompt or
max_output_tokensvalue pushed the request past the timeout
- Retry the request, optionally with a smaller prompt or lower
max_output_tokens - Add model fallbacks so routing can move to another provider
- Use streaming for long generations, which begins delivering output before the full response is complete
503 and 504 are both safe to retry. Because a 504 may leave a partially processed request upstream, avoid blindly retrying non-idempotent work without checking whether the first attempt was billed.Best Practices
Implement comprehensive error handling
Implement comprehensive error handling
Log errors for debugging
Log errors for debugging
Use circuit breaker pattern
Use circuit breaker pattern
Validate before sending
Validate before sending
Error Monitoring
Track and analyze errors in production:Debugging Checklist
When encountering errors, check:- API key is valid and properly formatted
- Request payload matches schema requirements
- Parameter values are within allowed ranges
- Account has sufficient credits
- Model name is correct and supported
- Network connectivity is stable
- Timeout values are appropriate
- Error handling is implemented
- Retry logic is in place
Related Documentation
Create Response
Main endpoint documentation
Auto Routing
Automatic provider/model routing
Rate Limits
Understanding rate limits
Support
Contact support for help

