inference-providers

GPT-OSS 20B

by openai · family gpt-oss

Facts

Release date2025-08-05
Retired date
Knowledge cutoff
Context (max)131,072
Max output
Modalitiestext → text
Aliasesgpt-oss-20b
Open weightsyes (openai/gpt-oss-20b)
Description21B MoE open-weight reasoning model; thinking cannot be disabled.

Unknown values are shown as —.

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

Offerings

ProviderWire IDVariantEndpointProtocolStatusPrice (USD / Mtok)Reasoning
IO Intelligence (io.net)openai/gpt-oss-20bchatopenai-chatga0.07 / 0.24effort · default on · mandatory · returns reasoning_content
NVIDIA NIM APIopenai/gpt-oss-20bv1-chat-completionsopenai-chatgatoggle · default on · returns reasoning_content
Ollama Cloudgpt-oss:20bv1-chat-completionsopenai-chatgaeffort · default on · mandatory · returns hidden
OpenRouteropenai/gpt-oss-20bchat-completionsopenai-chatga0.03 / 0.13effort · default on · returns reasoning_content · round-trips reasoning_content

Reasoning controls

IO Intelligence (io.net)· openai/gpt-oss-20b· chat effort

reasoning.effort lowmediumhigh● Default not documented — verify.

effort · default on · mandatory · returns reasoning_content

NVIDIA NIM API· openai/gpt-oss-20b· v1-chat-completions toggle

chat_template_kwargs.enable_thinking on true · off false

toggle · default on · returns reasoning_content

Ollama Cloud· gpt-oss:20b· v1-chat-completions effort

reasoning_effort lowmediumhigh● Default level not documented; verify.

effort · default on · mandatory · returns hidden

OpenRouter· openai/gpt-oss-20b· chat-completions effort

reasoning.effort nonelowmedium●highxhighmax

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

Example requests

IO Intelligence (io.net) · openai-chat · openai/gpt-oss-20b

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

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

NVIDIA NIM API · openai-chat · openai/gpt-oss-20b

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

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

Ollama Cloud · openai-chat · gpt-oss:20b

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

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

OpenRouter · openai-chat · openai/gpt-oss-20b

curl 'https://openrouter.ai/api/v1/chat/completions' \
  -H 'Authorization: Bearer <YOUR_API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-oss-20b",
  "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-oss-20b",
      "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-oss-20b",
    "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).