v1

latestOpenAPI 3.0.32026-07-22112930.0 KB
Chat

Chat completions

OpenAI-compatible chat completions.

Text-only requests are allowed. To reference live stream media, put ovs://streams/<id>?... inside an image_url or video_url content part. Unknown fields are accepted for SDK compatibility.

Set stream: true to receive text/event-stream. When stream_options.include_usage is also true, the stream may include a final usage chunk.

post/chat/completions

Headers

X-Overshoot-Region'us-west1' | 'us-central1'

Optional hint to route the request to the region that owns the stream. If the request reaches the wrong region the API returns 409 with a region_error body.

Request body

modelstring required

Model identifier from GET /models. Must be ready at request time.

max_completion_tokensinteger nullable

Optional output-token cap. OpenAI's preferred name.

max_tokensinteger nullable

Legacy alias for max_completion_tokens.

response_formatobject

Used when supported by the selected model/provider.

streamboolean

When true, the response is a server-sent event stream.

toolsobject[]

OpenAI-style tool definitions.

parallel_tool_callsboolean

OpenAI-style parallel tool-call setting.

thread_idstring nullable

Optional key for prompt-cache reuse across related requests in the same user conversation and model. See the Prompt cache guide.

Example request

{
  "model": "google/gemma-4-26B-A4B-it"
}

Response

Completion response. JSON by default; if the request sets stream: true, the response is an OpenAI-style SSE stream (text/event-stream) terminated by data: [DONE].

idstring required
objectstring required
createdinteger required
modelstring required

Example response

{
  "choices": [
    {
      "message": {
        "role": "assistant"
      }
    }
  ]
}
All 11 operations