Error Codes
The table below lists the error codes you may run into when calling the Watt Cloud API, each paired with the message you will see, the cause, and the recommended fix.
Errors by HTTP Status Code
| Status Code | Error Message | Cause | Solution |
|---|---|---|---|
| 400 | Invalid model name | The request body is missing the model field, or its value is incorrect | Review your API parameters |
| 403 | Invalid Authorization | The credentials sent with the request could not be authenticated | Double-check your API Key |
| 413 | 'max_tokens' or 'max_completion_tokens' is too large: 32000. This model's maximum context length is 202752 tokens and your request has 170791 input tokens (32000 > 202752 - 170791) | The max_tokens or max_completion_tokens you asked for does not fit in the remaining context. Of the model's 202752-token context window, the input already occupies 170791 tokens, leaving 31961 available — yet the limit was set to 32000 | Either lower max_tokens or max_completion_tokens to at most (model max context - input tokens) — 31961 here — or trim the prompt to reduce input tokens. General formula: max_tokens ≤ max_context_length - input_tokens |
| 429 | endpoint TPM exceeded | The endpoint's tokens-per-minute (TPM) limit was exceeded | Reduce your request rate, or contact support if you need a higher limit |
| 500 | Internal Server Error | A failure occurred on the server while handling the request | Try again later, or contact support |
| 503 | Service Unavailable | No instances are currently available to serve the request | Check whether the endpoint is up and running |