Troubleshooting
Usually an invalid key or missing permissions.
Checklist:
- Ensure you send
Authorization: Bearer <YOUR_API_KEY> - Ensure the URL is
https://www.su8.codes/codex/v1/... - Regenerate a key in your dashboard and retry
404 / model not found
Section titled “404 / model not found”Usually:
- wrong path (missing
/codex/v1) - wrong model id
Copy a model name from:
Rate limit.
Try:
- reduce concurrency
- retry with backoff (1s/2s/4s)
- add jitter if you have loops
502 / 504 (Gateway Timeout)
Section titled “502 / 504 (Gateway Timeout)”Usually caused by non-streaming requests waiting too long for a response, hitting the mandatory Cloudflare/CDN 100-second idle timeout.
Try:
- Recommended: Always enable streaming by setting
"stream": truein your code! Streaming bypasses the CDN’s idle timeout by chunks returning to your user immediately. - If you absolutely must use non-streaming, try to shorten your prompts or use a faster model.
Temporary server-side issues.
Try:
- retry with backoff
- add timeouts