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.
Referencing a stream
Themessages[].content[] array accepts standard OpenAI content parts plus two Overshoot-specific URL shapes:
image_url— points at a single frame of a stream.video_url— points at a window of frames.
ovs:// reference of the form:
ovs:// scheme is a reference identifier — the server parses it to pull out stream_id and the query, then resolves frames internally. It is not a fetchable URL. The <query> is what selects the moment you want. Different keys for single frames vs. windows.
Image URL — query params
Fortype: "image_url". Exactly one anchor is required.
Video URL — query params
Fortype: "video_url". Requires one start anchor, accepts one optional end anchor (defaults to the live edge), plus an optional max_fps.
start_offset_ms=-30000&end_frame_index=523 is valid.
Resolution rules
- Negative
frame_index/offset_msare evaluated againstlast_frame_index/ now at request time. The same URL can resolve to different frames on consecutive calls. - Old frames clamp. A
frame_index(orstart_frame_index) older thanfirst_available_frame_indexclamps up to the oldest available frame. Request succeeds, possibly on a different frame than asked. - Future frames fail. A
frame_indexnewer thanlast_frame_indexreturns422. There is no “wait until that frame arrives”. - Duplicate query keys (
?frame_index=1&frame_index=2) →422. - Setting more than one anchor of the same kind (e.g. two
start_*, orframe_index+timestamp_ms) →422.
Example — single-frame question
Example — last-N-seconds question
Authorizations
Every public HTTP request requires Authorization: Bearer <api_key>, except
GET /models and the public /billing/pricing endpoints.
401means the key is missing, unknown, or revoked.403means the key is valid but cannot access the requested resource.- The publish token returned by
POST /streamsis only for publishing media to LiveKit. It does not replace the API key for HTTP calls.
Headers
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.
us-west1, us-central1 Body
OpenAI-compatible. Permissive — unknown fields are accepted for SDK compatibility.
To reference a stream's frames, include video_url or image_url content parts
whose URL uses the ovs://streams/{stream_id}?... reference scheme.
Model identifier from GET /models. Must be ready at request time.
"google/gemma-4-26B-A4B-it"
Optional output-token cap. OpenAI's preferred name.
Legacy alias for max_completion_tokens.
Used when supported by the selected model/provider.
When true, the response is a server-sent event stream.
Only meaningful when stream: true.
OpenAI-style tool definitions.
OpenAI-style tool choice.
OpenAI-style parallel tool-call setting.
Optional key for prompt-cache reuse across related requests in the same user conversation and model. See the Prompt cache guide.
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].