Skip to main content
The chat completions endpoint powers text generation across Chat, Code, Reasoning, and Vision models. It supports streaming, system prompts, multi-turn conversations, and image inputs for vision-capable models.

Endpoint

Basic Usage

Streaming

Enable real-time token streaming with stream: true:

Vision Models

Vision-capable models accept images in the message content. Send images as URLs or base64:
Vision-capable models include Gemini 2.5, Llama 4 Maverick, Gemma 3, GPT-4o, and others marked with “Vision” in the Model Catalog.

Reasoning Models

Reasoning models (DeepSeek-R1, QwQ, etc.) produce chain-of-thought output. The reasoning steps appear in the reasoning_content field of the streamed response delta, separate from the final answer in content.

Parameters

Message Roles