API ModelsAPI Models
Models/GPT-5.1 (2025-11-13)
OpenAI

GPT-5.1 (2025-11-13)

gpt-5.1-2025-11-13

Snapshot version of GPT-5.1 for reproducible outputs.

StableReproducibleProduction
Input¥1.80
Output¥15.00
per 1M tokens

Stable

Pinned model version

Reproducible

Consistent results

Production

Ready for deployment

Reliable

Predictable behavior

API Documentation

View complete API reference with all parameters and examples.

View Docs

Advanced Features

Streaming

Enable real-time streaming responses with Server-Sent Events.

{
  "model": "gpt-5.1-2025-11-13",
  "stream": true,
  "messages": [...]
}

Function Calling (Tools)

Enable the model to use tools and call functions.

{
  "model": "gpt-5.1-2025-11-13",
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Get current weather for a location",
      "parameters": {
        "type": "object",
        "properties": {
          "location": {"type": "string", "description": "City name"}
        },
        "required": ["location"]
      }
    }
  }],
  "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}]
}

JSON Mode

Get structured JSON responses from the model.

{
  "model": "gpt-5.1-2025-11-13",
  "response_format": {"type": "json_object"},
  "messages": [{"role": "user", "content": "Extract info as JSON: John is 30 years old"}]
}

API Parameters Reference

ParameterTypeRequiredDescription
modelstringYesModel identifier (e.g., gpt-5.1-2025-11-13)
messagesarrayYesArray of message objects with role and content
max_tokensintegerNoMaximum tokens in the response
streambooleanNoEnable streaming responses (SSE)
temperaturenumberNoSampling temperature (0.0 - 2.0)
top_pnumberNoNucleus sampling threshold (0.0 - 1.0)
toolsarrayNoFunction calling tools definition
response_formatobjectNoOutput format (e.g., json_object)

Full API Documentation

View complete API reference with streaming, thinking, and more.

View Documentation

Pricing

Input
¥1.80
per 1M tokens
Output
¥15.00
per 1M tokens

Billing: Cost = (input_tokens * input_price + output_tokens * output_price) / 1,000,000