Skip to main content
POST

Referencing a stream

The messages[].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.
Both wrap an ovs:// reference of the form:
The 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

For type: "image_url". Exactly one anchor is required.

Video URL — query params

For type: "video_url". Requires one start anchor, accepts one optional end anchor (defaults to the live edge), plus an optional max_fps. Start and end anchor types may differ — start_offset_ms=-30000&end_frame_index=523 is valid.

Resolution rules

  • Negative frame_index / offset_ms are evaluated against last_frame_index / now at request time. The same URL can resolve to different frames on consecutive calls.
  • Old frames clamp. A frame_index (or start_frame_index) older than first_available_frame_index clamps up to the oldest available frame. Request succeeds, possibly on a different frame than asked.
  • Future frames fail. A frame_index newer than last_frame_index returns 422. 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_*, or frame_index + timestamp_ms) → 422.

Example — single-frame question

Example — last-N-seconds question

For more usage patterns, see the Chat Completion guide.

Authorizations

Authorization
string
header
required

Every public HTTP request requires Authorization: Bearer <api_key>, except GET /models and the public /billing/pricing endpoints.

  • 401 means the key is missing, unknown, or revoked.
  • 403 means the key is valid but cannot access the requested resource.
  • The publish token returned by POST /streams is only for publishing media to LiveKit. It does not replace the API key for HTTP calls.

Headers

X-Overshoot-Region
enum<string>

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.

Available options:
us-west1,
us-central1

Body

application/json

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
string
required

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

Example:

"google/gemma-4-26B-A4B-it"

messages
object[]
required
max_completion_tokens
integer | null

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

max_tokens
integer | null

Legacy alias for max_completion_tokens.

response_format
object

Used when supported by the selected model/provider.

stream
boolean
default:false

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

stream_options
object

Only meaningful when stream: true.

tools
object[]

OpenAI-style tool definitions.

tool_choice

OpenAI-style tool choice.

parallel_tool_calls
boolean

OpenAI-style parallel tool-call setting.

thread_id
string | null

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].

id
string
required
object
string
default:chat.completion
required
created
integer
required
model
string
required
choices
object[]
required
usage
object
overshoot
object

Overshoot-specific response metadata. Observability only.