Error Codes Reference

HTTP status codes, error response format, and troubleshooting guide. Handle 400, 401, 402, 429, 500 errors gracefully. TokenMix is an OpenAI-compatible AI API relay using Base URL https://api.tokenmix.ai/v1.

TokenMix API endpoint

  • Base URL: https://api.tokenmix.ai/v1
  • Use one TokenMix API key to call the current supported model catalog.
  • OpenAI SDK compatible; usually only base_url needs to change.
curl https://api.tokenmix.ai/v1/chat/completions \  -H "Authorization: Bearer $TOKENMIX_API_KEY" \  -H "Content-Type: application/json" \  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

Back to documentation