openai, and anthropic.
The Responses API is the unified successor to Chat Completions: you send input (text, images, files, tool outputs, etc.) and receive a response object that can contain messages, tool calls, and (for reasoning models) reasoning items.
Note, anthropic does not yet support tool calls.
To specify a provider, prefix the model with the provider. For example, gpt-5.1 should be passed as openai/gpt-5.1.
Thinking (Reasoning) parameters
Some OpenAI reasoning models (e.g.openai/gpt-5.x, openai/o3, openai/o4-mini) support the reasoning object:
reasoning.effort:"none" | "low" | "medium" | "high" | ...(model-dependent)reasoning.summary:"none" | "auto" | "detailed"(optional)
max_output_tokens limits reasoning tokens + visible output tokens, so if you increase reasoning.effort, consider raising max_output_tokens.
Basic usage (Closed Source + Thinking)
Basic usage (Closed Source + Thinking)
Streaming (Closed Source + Thinking + Reasoning Summary Events)
Streaming (Closed Source + Thinking + Reasoning Summary Events)