Overview
This document provides a comprehensive guide to all error codes you may encounter when using the Wisdom Gate API. Understanding these error codes will help you implement proper error handling and troubleshooting in your applications.Error Response FormatAll error responses follow a consistent format:
HTTP Status Codes
400 Bad Request
Code Explanation: Please check your request format, usually it’s a client-side error. Common Causes:- Invalid JSON format in request body
- Missing required parameters
- Invalid parameter values or types
- Malformed request structure
- Verify your request body is valid JSON
- Check that all required parameters are included
- Validate parameter types match the API specification
- Review the OpenAPI specification for correct request format
401 Invalid Token
Code Explanation: API key verification failed. Try changing models to test if your API key is correct; if changing models works normally, please contact the administrator for feedback and processing. Common Causes:- Missing or invalid API key
- API key expired or revoked
- Incorrect Authorization header format
- Verify your API key is correct and active
- Check the Authorization header format:
Bearer YOUR_API_KEY - Try using a different model to test if the API key works
- If changing models works, contact administrator for assistance
- Regenerate your API key if necessary
403 Token Group XXX Has Been Disabled
Code Explanation: Usually a token permission issue. If you still get an error after creating and using a new token, you need to contact the administrator to check. For example, O1 series models do not support thesystem parameter.
Common Causes:
- Token group has been disabled
- Insufficient permissions for the requested operation
- Model-specific parameter restrictions (e.g., O1 series doesn’t support
systemparameter)
- Create and use a new token
- Check if your token has the required permissions
- Verify model-specific parameter restrictions
- Contact administrator if the issue persists
404 Not Found
Code Explanation: Please check if the Base URL is filled in correctly, try adding/v1 or the last slash /.
Common Causes:
- Incorrect endpoint URL
- Missing
/v1prefix in the path - Missing trailing slash
- Invalid resource ID (e.g., video_id, model name)
- Verify the endpoint URL is correct
- Ensure the path includes
/v1prefix (e.g.,/v1/chat/completions) - Check if a trailing slash is required
- Validate resource IDs exist and are correct
- Review the API reference documentation for correct endpoints
413 Request Entity Too Large
Code Explanation: The prompt may be too long. Please shorten your prompt and try again, confirm if a shorter prompt can be called normally. Common Causes:- Request body exceeds size limits
- Prompt text is too long
- Too many messages in conversation history
- Large file attachments
- Shorten your prompt text
- Reduce the number of messages in conversation history
- Remove unnecessary context or messages
- Split large requests into smaller chunks
- Compress or reduce file sizes if using file attachments
429 Current Group Upstream Load Is Saturated
Code Explanation: OpenAI has rate limits for individual accounts, 429 indicates that a backend account’s concurrent usage is too high and has encountered rate limiting. Please continue to try calling. Common Causes:- Too many concurrent requests
- Rate limit exceeded for the account
- Backend account saturation
- Implement exponential backoff retry logic
- Reduce request frequency
- Add delays between requests
- Use request queuing for batch operations
- Continue retrying with appropriate backoff
500 Internal Server Error
Code Explanation: Server internal error. Could be an issue with the proxy server or OpenAI server, unrelated to the user. Please try again, if multiple errors occur please contact the administrator. Common Causes:- Proxy server issues
- Upstream service (OpenAI) server problems
- Temporary service disruption
- Retry the request after a short delay
- Check service status if available
- If errors persist, contact administrator
- Implement retry logic with exponential backoff
503 No Available Channel for Model XXXX Under Current Group NNN
Code Explanation: A management issue with the proxy platform backend. Please contact the administrator to add this model and try calling again. If multiple errors occur, please contact the administrator. Common Causes:- Model not available in your token group
- Model configuration issue on the backend
- Model temporarily unavailable
- Verify the model name is correct
- Check if the model is available in your plan
- Contact administrator to add the model to your group
- Try using an alternative model if available
504 Gateway Timeout
Code Explanation: Gateway timeout, failed to get a response from the upstream server within the specified time. Please try again, for multiple errors please contact the administrator. Common Causes:- Upstream server (OpenAI) taking too long to respond
- Network connectivity issues
- Request timeout exceeded
- Retry the request
- Check network connectivity
- Reduce request complexity or size
- Increase timeout settings if possible
- Contact administrator if errors persist
524 Connection Timeout
Code Explanation: The server did not complete the request within the specified time, possibly caused by congestion in the wisdom gate channel. Please try again, for multiple errors please contact the administrator. Common Causes:- Server congestion
- Network latency issues
- Request processing timeout
- Retry the request after a delay
- Check for service congestion
- Reduce request size or complexity
- Contact administrator if multiple errors occur
Best Practices for Error Handling
1. Implement Comprehensive Error Handling
Always handle errors gracefully in your application:2. Use Exponential Backoff for Retries
For transient errors (429, 500, 503, 504, 524), implement exponential backoff:3. Log Errors for Debugging
Always log error details for troubleshooting:4. Provide User-Friendly Error Messages
Translate technical error codes into user-friendly messages:Error Code Summary Table
| Status Code | Error Type | Retry Recommended | User Action Required |
|---|---|---|---|
| 400 | Bad Request | No | Fix request format |
| 401 | Invalid Token | No | Verify API key |
| 403 | Permission Denied | No | Check permissions or contact admin |
| 404 | Not Found | No | Verify endpoint URL |
| 413 | Request Too Large | No | Reduce request size |
| 429 | Rate Limit | Yes | Retry with backoff |
| 500 | Server Error | Yes | Retry or contact admin |
| 503 | Service Unavailable | Yes | Contact admin |
| 504 | Gateway Timeout | Yes | Retry |
| 524 | Connection Timeout | Yes | Retry |
Getting Help
If you continue to encounter errors after following the troubleshooting steps:- Check the Model Catalog for model availability and requirements
- Review the API Reference for correct endpoint usage
- Contact Support with:
- Error code and message
- Request details (without sensitive data)
- Steps to reproduce
- Your API key group information (if applicable)