Error response format
Error codes
400 — Bad Request
Your request is malformed or missing required fields. Common causes:- Missing or empty
messagesarray - Invalid
modelID - Malformed JSON body
- Invalid parameter values (e.g.,
temperature: 5)
401 — Unauthorized
Your API key is missing, invalid, or malformed. Common causes:- No
Authorizationheader - API key doesn’t start with
shuttle- - Typo in the API key
Authorization: Bearer shuttle-xxx.
402 — Payment Required
You don’t have an active plan. Common causes:- No subscription on your account
- Subscription has expired
- Payment failed
403 — Forbidden
Your plan doesn’t include access to the requested model. Common causes:- Trying to use a Premium model on a Basic plan
- Trying to use a Basic model on a Free plan
423 — Locked
Your account has been suspended. Common causes:- Terms of service violation
- Abuse detected
429 — Too Many Requests
You’ve exceeded your rate limit. Common causes:- Sending more requests per minute than your plan allows
- Not accounting for request multipliers
500 — Internal Server Error
Something went wrong on our end. Fix: Wait a moment and retry. If the error persists, check status.shuttleai.com or report it on Discord.503 — Service Unavailable
The requested model or service is temporarily unavailable. Common causes:- Model is undergoing maintenance
- Upstream provider is down
- High demand causing temporary capacity issues
Best practices
Always handle errors
Always handle errors
Never assume API calls will succeed. Wrap calls in try/catch and handle each error code appropriately.
Implement retries with backoff
Implement retries with backoff
For 429 and 5xx errors, retry with exponential backoff instead of immediately re-sending.
Log error responses
Log error responses
Log the full error response (message + type + code) to make debugging easier.
Monitor your usage
Monitor your usage
Use the Dashboard to understand your usage patterns and avoid hitting rate limits.