Chat completions
The standard OpenAI Chat Completions schema, on the /oss lane.
posthttps://api.opengateway.one/oss/v1/chat/completions
Set model to any curated /oss id — a friendly alias
like claude-sonnet-4-7 or a raw id with a routing suffix
(:fastest, :cheapest, :preferred).
Request
curl
curl https://api.opengateway.one/oss/v1/chat/completions \ -H "Authorization: Bearer $OPENGATEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-ai/DeepSeek-V4-Pro:fastest", "messages": [{ "role": "user", "content": "Hello" }], "stream": false }'
Response
json
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "deepseek-ai/DeepSeek-V4-Pro",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help?" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 9, "completion_tokens": 7, "total_tokens": 16 }
}
Common parameters
| Field | Type | Notes |
|---|---|---|
model | string | Required. Alias or org/model[:policy]. |
messages | array | Required. Standard role/content turns. |
stream | boolean | Server-sent events when true. |
tools | array | Function/tool calling on capable models. |
reasoning_effort | string | Normalized effort — see Effort levels. |
max_tokens | integer | Clamped to the resolved model's window. |
Streaming
curl · stream
curl https://api.opengateway.one/oss/v1/chat/completions \ -H "Authorization: Bearer $OPENGATEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-7", "stream": true, "messages": [{ "role": "user", "content": "Stream a haiku." }] }'
Responses arrive as standard OpenAI chat.completion.chunk SSE events terminated by data: [DONE].
See Models for discovery and Quickstart for SDK setup.