Request Debugging
When debugging API requests, collect as much context as possible.
Minimum information
Section titled “Minimum information”- Request time
- Request URL
- HTTP status code
- Model ID
- Token or user
- Error message and code
Console troubleshooting
Section titled “Console troubleshooting”- Check usage logs to confirm whether the request entered RouteAPI.
- Check the status code, duration, and error information in log details.
- Check user balance and Token quota.
- Check model permissions and availability status.
Reproduce the request
Section titled “Reproduce the request”Use curl to reproduce a minimal request:
curl https://www.routeapi.ai/v1/chat/completions \ -H "Authorization: Bearer $ROUTEAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [{ "role": "user", "content": "ping" }] }'