Create a chat completion
API key as a bearer token: Authorization: Bearer sk-ollm-<public_id>-<secret>. Required on the dev gateway; the prod gateway is open and ignores this header.
In: header
Model or function selector. A plain name routes to that model. ollm::function_name::<name> routes to a configured function; ollm::model_name::<name> forces an explicit model.
The conversation so far.
1 <= itemsSampling temperature.
floatNucleus sampling probability mass.
floatMaximum tokens to generate. If both this and max_completion_tokens are set, the smaller is used.
int320 <= valueMaximum completion tokens. If both this and max_tokens are set, the smaller is used.
int320 <= valueNumber of completions. Must be 1 (or omitted); other values are rejected with 400.
1int32Up to N stop sequences. Array only — a bare string is not accepted.
floatfloatDeterministic sampling seed.
int32Reasoning effort hint (free-form; provider-dependent).
Verbosity hint (free-form; provider-dependent).
"auto""auto" | "default" | "priority" | "flex"Stream partial deltas as SSE.
falseTools the model may call.
Controls tool selection.
Allow multiple tool calls in one turn.
Output format constraint.
Tags written to spend logs. source=playground normalizes to the playground tag; otherwise passed through verbatim. Falls back to the User-Agent header when empty.
Inference cache control.
Skip billing and persistence.
Pin a specific provider variant.
Group related inferences into an episode.
uuidWhen true, any unknown top-level field returns 400.
falseEcho raw provider usage in the response. When streaming, requires stream_options.include_usage.
falseEcho the raw upstream provider response.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.gateway.orgn.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "near_qwen3_30b", "messages": [ { "role": "user", "content": "Hello" } ] }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"episode_id": "string",
"system_fingerprint": "string",
"service_tier": "string",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"code": "string",
"param": "string"
}
}