> ## Documentation Index
> Fetch the complete documentation index at: https://docs.together.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Error codes

> An overview on error status codes, causes, and quick fix solutions.

| Code | Cause | Solution |
| - | - | - |
| 400 - Invalid Request | Misconfigured request, or an unknown field on a [dedicated endpoints](/docs/dedicated-endpoints/overview) management API request. | Ensure your request is a [Valid JSON](/reference/chat-completions) and your [API Key](https://api.together.ai/settings/projects/~current/api-keys) is correct. Also ensure you're using the right prompt format - which is different for Mistral and LLaMA models. For dedicated endpoints management requests, remove any field named in an `unknown field "..."` error (see [Troubleshooting](/docs/dedicated-endpoints/manage#troubleshooting)). |
| 401 - Authentication Error | Missing or Invalid API Key | Ensure you are using the correct [API Key](https://api.together.ai/settings/projects/~current/api-keys) and [supplying it correctly](/reference/chat-completions) |
| 402 - Payment Required | The account associated with the API key has reached its maximum allowed monthly spending limit. | Adjust your [billing settings](https://api.together.ai/settings/organization/~current/billing) or make a payment to resume service. |
| 403 - Bad Request | Input token count + `max_tokens` parameter must be less than the [context](/docs/inference-models) length of the model being queried. | Set `max_tokens` to a lower number. If querying a chat model, you may set `max_tokens` to `null` and let the model decide when to stop generation. |
| 404 - Not Found | Invalid Endpoint URL or model name | Check your request is being made to the correct endpoint (see the [API reference](/reference/chat-completions) page for details) and that the [model being queried is available](/docs/inference-models) |
| 429 - Too Many Requests | Serverless requests are being limited during high demand, or a [dedicated endpoint](/docs/dedicated-endpoints/manage) deployment would exceed your project or organization GPU quota for a GPU type. | For serverless inference, reduce your request rate, spread out bursts, and retry with exponential backoff (see [rate limits](/docs/serverless/rate-limits)). For GPU quota, lower the requested replica count, stop unused deployments on that GPU type, or [contact support](https://www.together.ai/contact). Platform-wide capacity messages ask you to retry later. |
| 500 - Server Error | Unknown server error | This error is caused by a server-side issue. Try again after a brief wait. If the issue persists, [contact support](https://www.together.ai/contact) |
| 503 - Service Unavailable | The service is temporarily unavailable, for example during high demand. | Wait briefly, then retry with exponential backoff. If the issue persists, [contact support](https://www.together.ai/contact). |
| 504 - Timeout | The request did not complete in time | Try again after a brief wait. If the issue persists, [contact support](https://www.together.ai/contact) |
| 524 - Cloudflare Timeout | The connection timed out at the network edge | Try again after a brief wait. If the issue persists, [contact support](https://www.together.ai/contact) |
| 529 - Server Error | Unknown server error | Try again after a brief wait. If the issue persists, [contact support](https://www.together.ai/contact) |

If you are seeing other error codes or the solutions do not work, [contact support](https://www.together.ai/contact) for help.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.