inference-providers

GPT-5.1

by openai · family gpt

Facts

Release date2025-11-13
Retired date
Knowledge cutoff
Context (max)400,000
Max output128,000
Modalitiestext, image → text
Aliases
Open weightsno
DescriptionDefaults to effort 'none'; supports none/low/medium/high.

Unknown values are shown as —.

Intelligence Index v4.1.1: 37 · high effort · Source: Artificial Analysis (accessed 2026-08-20)

Offerings

ProviderWire IDVariantEndpointProtocolStatusPrice (USD / Mtok)Reasoning
NEAR AI Cloudopenai/gpt-5.1chatopenai-chatga1.25 / 10.00effort · default on · returns reasoning_content
OpenAIgpt-5.1v1-chat-completionsopenai-chatga1.25 / 10.00effort · default off · returns hidden
OpenAIgpt-5.1v1-responsesopenai-responsesga1.25 / 10.00effort · default off · returns reasoning_summary · round-trips encrypted_content
OpenCode Zengpt-5.1responsesopenai-responsesga1.07 / 8.50effort · default off · returns reasoning_summary · round-trips encrypted_content
OpenRouteropenai/gpt-5.1chat-completionsopenai-chatga1.25 / 10.00effort · default on · returns reasoning_content · round-trips reasoning_content

Reasoning controls

NEAR AI Cloud· openai/gpt-5.1· chat effort

reasoning_effort nonelowmedium●highxhighmax

effort · default on · returns reasoning_content

OpenAI· gpt-5.1· v1-chat-completions effort

reasoning_effort none●lowmediumhigh

effort · default off · returns hidden

OpenAI· gpt-5.1· v1-responses effort

reasoning.effort none●lowmediumhigh

effort · default off · returns reasoning_summary · round-trips encrypted_content

Incompatible with: temperature, top_p

OpenCode Zen· gpt-5.1· responses effort

reasoning.effort none●lowmediumhigh

effort · default off · returns reasoning_summary · round-trips encrypted_content

Incompatible with: temperature, top_p

OpenRouter· openai/gpt-5.1· chat-completions effort

reasoning.effort nonelowmedium●highxhighmax

effort · default on · returns reasoning_content · round-trips reasoning_content

Example requests

NEAR AI Cloud · openai-chat · openai/gpt-5.1

curl 'https://cloud-api.near.ai/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5.1",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning_effort": "medium"
}'
Python (requests)
import requests

resp = requests.post(
    "https://cloud-api.near.ai/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "openai/gpt-5.1",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning_effort": "medium"
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://cloud-api.near.ai/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "openai/gpt-5.1",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning_effort": "medium"
  }),
})
console.log(await resp.json())

OpenAI · openai-chat · gpt-5.1

curl 'https://api.openai.com/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-5.1",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning_effort": "none"
}'
Python (requests)
import requests

resp = requests.post(
    "https://api.openai.com/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "gpt-5.1",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning_effort": "none"
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://api.openai.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.1",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning_effort": "none"
  }),
})
console.log(await resp.json())

OpenAI · openai-responses · gpt-5.1

curl 'https://api.openai.com/v1/responses' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-5.1",
  "input": "Tell me about the weather.",
  "reasoning": {
    "effort": "none"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://api.openai.com/v1/responses",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "gpt-5.1",
      "input": "Tell me about the weather.",
      "reasoning": {
        "effort": "none"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://api.openai.com/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.1",
    "input": "Tell me about the weather.",
    "reasoning": {
      "effort": "none"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include encrypted_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
  • Reported incompatible with thinking controls: temperature, top_p.

OpenCode Zen · openai-responses · gpt-5.1

curl 'https://opencode.ai/zen/v1/responses' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "gpt-5.1",
  "input": "Tell me about the weather.",
  "reasoning": {
    "effort": "none"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://opencode.ai/zen/v1/responses",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "gpt-5.1",
      "input": "Tell me about the weather.",
      "reasoning": {
        "effort": "none"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "gpt-5.1",
    "input": "Tell me about the weather.",
    "reasoning": {
      "effort": "none"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include encrypted_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
  • Reported incompatible with thinking controls: temperature, top_p.

OpenRouter · openai-chat · openai/gpt-5.1

curl 'https://openrouter.ai/api/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5.1",
  "messages": [
    {
      "role": "user",
      "content": "Tell me about the weather."
    }
  ],
  "reasoning": {
    "effort": "medium"
  }
}'
Python (requests)
import requests

resp = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    headers={
      "Authorization": "Bearer <YOUR_API_KEY>",
      "Content-Type": "application/json"
    },
    json={
      "model": "openai/gpt-5.1",
      "messages": [
        {
          "role": "user",
          "content": "Tell me about the weather."
        }
      ],
      "reasoning": {
        "effort": "medium"
      }
    },
)
print(resp.json())
TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "model": "openai/gpt-5.1",
    "messages": [
      {
        "role": "user",
        "content": "Tell me about the weather."
      }
    ],
    "reasoning": {
      "effort": "medium"
    }
  }),
})
console.log(await resp.json())
  • ⚠ Responses include reasoning_content artifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).