API Protocols
OpenAI Compatible
Codex, the OpenAI SDK, and any Chat Completions client use this protocol. Base URL includes `/v1`.
Last updated: 2026-08-03
Primary endpoints
| Endpoint | Purpose |
|---|---|
| GET /v1/models | List models available to the current Key |
| POST /v1/chat/completions | OpenAI Chat Completions |
| POST /v1/responses | OpenAI Responses for Codex and compatible clients |
| POST /v1/embeddings | Text embeddings |
| POST /v1/images/generations | Image generation when supported by the model |
| POST /v1/audio/transcriptions | Audio transcription when supported by the model |
| GET /v1/realtime | Realtime WebSocket when supported by the model |
1
Base URL
All OpenAI Compatible requests go to this address.
Base URL
https://www.apihub.ink/v12
Authentication
Include a Bearer token in every request header.
Authorization
Authorization: Bearer your-apihub-key3
Example request
Minimal Chat Completions request.
curl
curl https://www.apihub.ink/v1/chat/completions \
-H "Authorization: Bearer your-apihub-key" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hello"}]}'4
Responses API example
Codex and Responses clients call /v1/responses. The selected model must support this protocol.
curl
curl https://www.apihub.ink/v1/responses \
-H "Authorization: Bearer your-apihub-key" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","input":"hello"}'5
Streaming
Set stream: true on Chat Completions or Responses requests to receive an SSE stream. Process events incrementally and use bounded backoff when a connection is interrupted.