Skip to main content

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 CodeError MessageCauseSolution
400Invalid model nameThe request body is missing the model field, or its value is incorrectReview your API parameters
403Invalid AuthorizationThe credentials sent with the request could not be authenticatedDouble-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 32000Either 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
429endpoint TPM exceededThe endpoint's tokens-per-minute (TPM) limit was exceededReduce your request rate, or contact support if you need a higher limit
500Internal Server ErrorA failure occurred on the server while handling the requestTry again later, or contact support
503Service UnavailableNo instances are currently available to serve the requestCheck whether the endpoint is up and running