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

# Error Handling

**1. Try obtaining the HTTP error code to initially locate the issue**

a. In your code, try to print the error code and error message (message). Using this information, most issues can be located.

```shell theme={null}
HTTP/1.1 400 Bad Request
Date: Thu, 19 Dec 2024 08:39:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 87
Connection: keep-alive

{"code":20012,"message":"Model does not exist. Please check it carefully.","data":null}

```

* Common error codes and their causes:
  * **400**: Incorrect parameters. Refer to the error message (message) to correct invalid request parameters.
  * **401**: API Key is not properly set.
  * **403**: Insufficient permissions. The most common reason is that the model requires real-name authentication. For other cases, refer to the error message (message).
  * **429**: Rate limits triggered. Refer to the error message (message) to determine whether the issue is related to `RPM / RPD / TPM / TPD / IPM / IPD`. You can consult [Rate Limits](https://docs.siliconflow.com/rate-limits/rate-limit-and-upgradation) to understand the specific rate-limiting policies.
  * **504 / 503**:
    * Generally caused by high system load. You can try again later.
    * For chat and text-to-speech requests, you can try using streaming output (`"stream": true`). Refer to [Streaming Output](https://docs.siliconflow.com/faqs/stream-mode) for more details.
  * **500**: An unknown server error occurred. You can send an email to [help@siliconflow.com](mailto:help@siliconflow.com) for troubleshooting.

b. If the client does not output corresponding information, you can try running the curl command in the command line (taking an LLM model as an example):

```shell theme={null}
curl --request POST \
   --url https://api.siliconflow.com/v1/chat/completions \
   --header 'accept: application/json' \
   --header 'authorization: Bearer Replace_with_your_apikey' \
   --header 'content-type: application/json' \
   --data '
{
  "model": "Remember_to_replace_with_model",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "max_tokens": 128
}' -i
```

**2. Try switching to another model to see if the issue persists**
