API endpoints
Chat
POST /api/v1/chat/completions — OpenAI-compatible chat completions, with streaming support.
https://orux.top/api/v1/chat/completionsHow do the four protocols differ?
These are different interfaces with different request and response formats. Orux currently exposes Chat Completions. The other three client endpoints are not yet available here; provider support does not imply an Orux endpoint is available.
- Chat Completions — POST /api/v1/chat/completions · Available on Orux. Send messages; read choices[0].message.content. Streaming uses choices[].delta.
- Responses — Not yet available on Orux. Send input and instructions; output[] contains messages or tool calls. Streaming uses events such as response.output_text.delta. It is not an alias for Chat Completions.
- Anthropic Messages — Not yet available on Orux. Send messages, a separate system field and required max_tokens. Read content[] blocks; streaming uses message_start/content_block_delta/message_stop.
- Gemini GenerateContent — Not yet available on Orux. Send contents[].parts and generationConfig. Read candidates[].content.parts; streaming uses streamGenerateContent.
Format comparison (not callable Orux examples)
These JSON examples explain the formats of unavailable endpoints. Do not send them to Orux. Use the Chat Completions request example on this page.
Request
Send a model name and a list of messages. This endpoint mirrors the OpenAI Chat Completions API, so any parameter your OpenAI client supports is passed through.
Streaming (SSE)
Set "stream": true to receive incremental output as Server-Sent Events. Each event is a JSON chunk with a choices[0].delta field; the stream ends with a literal data: [DONE] line. If the client disconnects mid-stream, the gateway stops forwarding immediately.
Pass "stream_options": { "include_usage": true } to receive one extra chunk at the end of the stream containing token usage for the whole response.
Supported request fields
- model (required) — the model alias, see the Models page for how to list available values.
- messages (required) — array of { role, content }; content can be a string or a content-part array for multimodal models.
- stream — set true for SSE streaming.
- stream_options.include_usage — append a final usage-only chunk when streaming.
- temperature, max_tokens, and other OpenAI-compatible parameters are passed through to the upstream model where supported.
Billing
Chat requests are billed in Credits based on prompt and completion token usage, only on success. Failed requests are not charged.