Skip to content

Request Debugging

When debugging API requests, collect as much context as possible.

  • Request time
  • Request URL
  • HTTP status code
  • Model ID
  • Token or user
  • Error message and code
  1. Check usage logs to confirm whether the request entered RouteAPI.
  2. Check the status code, duration, and error information in log details.
  3. Check user balance and Token quota.
  4. Check model permissions and availability status.

Use curl to reproduce a minimal request:

Terminal window
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" }]
}'