Skip to main content
POST /api/v1/chat/completions Content-Type: application/json
Parameter support can differ depending on the model used to generate the response. Check the Model Library for model-specific compatibility. Open Model Library.

Authentication

Send your API key in the Authorization header as a Bearer token.

Parameters

Common

Conditional

The following parameters are not supported by every model. Check the Model Library for model-specific compatibility.

Generation Controls

Common tuning knobs for output length and randomness (availability varies by model).

Streaming

Receive partial outputs incrementally.

Vision Input

Some models accept mixed text + image inputs by using an array for content on a message.

Examples

Basic request

Send a list of messages and receive a single response.

Vision input (text + image)

Send multi-part message content with text and image URLs.