Skip to main content

Endpoint

Compatible with the OpenAI chat completions format. Supports streaming, multimodal input (images and video), tool calling, and structured output.

Request Parameters

Message Format

Each message has a role and content:

Vision (multimodal)

Use a content array to include images or video:
Video input:
Image and video URLs must be publicly accessible.

Examples

Basic text generation

Response

Streaming

Returns server-sent events. Each chunk has a delta instead of a full message:

Tool calling

When the model uses a tool, finish_reason is "tool_calls":

Structured output (JSON mode)

Errors