Skip to main content
The responses endpoint is OpenAI’s newer API format with built-in support for structured output and tool calling.

Endpoint

Example

Request Parameters

Required

Sampling

Structured Output

Tools

The responses endpoint uses a flat tool formatname, description, and parameters are top-level fields, not nested under function.
The tool format differs from /v1/chat/completions. See the tool calling example below for the correct format.

Reasoning

Models with reasoning (like Kimi K2.6 and GLM 5.2) include chain-of-thought by default. The response includes a reasoning output item containing the model’s thinking. Reasoning tokens count toward your usage.
Disabling reasoning is not currently supported on the /v1/responses endpoint. To control reasoning, use Chat Completions with chat_template_kwargs: {"thinking": false} instead.

Structured Output

Force the model to return JSON matching a schema:

Tool Calling

The responses endpoint uses a flat tool format where name, description, and parameters are at the top level:

With Instructions

Use instructions to set system-level context:

Differences from Chat Completions