Common Error Codes and Causes:
- 400: The parameters are incorrect. Please refer to the error message (
message) to correct the invalid request parameters; - 401: API Key is not set correctly;
- 403: Insufficient account balance or insufficient permissions. The most common reason for insufficient permissions is that the model requires identity verification. In other cases, refer to the error message (
message); - 429:
- Rate limits are triggered; refer to the error message (
message) to determine which specific limit was triggered among RPM / RPD / TPM / TPD / IPM / IPD. Please refer to Rate Limits to learn the specific rate limiting strategy; - It is also possible that wrong parameters were passed, causing repeated error retries and finally triggering the rate limit.
- Rate limits are triggered; refer to the error message (
- 504 / 503: Generally, the service system load is relatively high. You can try again later;
- For conversation and text-to-speech requests, you can try using streaming output (
"stream": true), see Streaming Output;
- For conversation and text-to-speech requests, you can try using streaming output (
- 500: An unknown error occurred in the service. You can contact relevant personnel for troubleshooting.
message). Using this information, you can locate most problems.