OpenAI-compatible protocol
Claude Messages protocol
SDKs usually add
anthropic-version automatically, so you don’t need to set it manually when using an SDK.Gemini native protocol
?key=sk-...), but this is not recommended — the URL gets logged by proxies.
Failure examples
How to troubleshoot:
- Copy the
X-OpenPAI-Request-Idheader. - Console → Logs → search for that Request ID to see the detailed failure reason.
Key safekeeping
- Do not commit keys to Git or paste them into chats / issues.
- Inject them via environment variables / a secret manager.
- If you suspect a leak, disable and regenerate immediately in the console.
- Create separate tokens per app / environment for fine-grained tracking.