Skip to main content
GPT-5.1 is a reasoning and coding model from OpenAI. Call gpt-5.1 through both the OpenAI-compatible Chat Completions API and the Responses API.

Key capabilities

  • OpenAI-compatible - Works with the OpenAI SDK by changing base_url
  • Streaming - Real-time token output through SSE
  • Multi-turn conversations - Uses role-based messages
  • Responses API - Uses input for text and structured content
  • Reasoning control - Configure reasoning effort on supported models
  • Tool use - Supports function and hosted tool definitions

Quick example

Responses API

Chat Completions

Parameters

Responses API

Chat Completions