Endpoint quick reference
| Protocol | Base URL | Auth header | Best for |
|---|---|---|---|
| OpenAI-compatible | https://openp.ai/v1 | Authorization: Bearer sk-... | Existing OpenAI SDK code / most models |
| Claude Messages | https://openp.ai/v1/messages | x-api-key: sk-... + anthropic-version | Claude thinking / cache_control advanced features |
| Gemini native | https://openp.ai/v1beta/models/{model}:... | x-goog-api-key: sk-... | Gemini multimodal, function_declarations |
The same sk- key works across all three endpoints, sharing the account quota.
API categories
OpenAI-compatible
/v1/chat/completions, /v1/embeddings, /v1/images/*, /v1/audio/*, /v1/responses, /v1/realtimeClaude Messages
/v1/messages, /v1/messages/count_tokensGemini native
:generateContent, :streamGenerateContent, :embedContentRerank
/v1/rerank — Cohere / Jina compatibleMidjourney
/mj/submit/*, /mj/task/{id}/fetchSuno
/suno/submit/music, /suno/fetch/{id}Common conventions
- Protocol: HTTPS, HTTP/2 recommended (
curl --http2). - Encoding:
Content-Type: application/json; charset=utf-8. - Timeout: server default 600 seconds. Streaming responses keep a long connection, with an idle heartbeat every 15 seconds.
- Request body size: default limit 32 MB (after compression).
- Response headers:
X-OpenPAI-Request-Id: the request ID — include it in support tickets to speed up diagnosis.X-OpenPAI-Group: the user group this request used.X-OpenPAI-Quota-Consumed: the amount charged for this request.X-OpenPAI-Remaining-Quota: the account balance after the charge.
Next steps
Authentication
Auth header formats and examples for the three protocols.
Error codes
HTTP statuses, error structure and troubleshooting tips.
Rate limits
RPM / TPM limits and handling 429.