Choose Auto, TokenLab Verified, or Official for each request, with prices shown up front. See what's new

OpenAI: gpt-oss-20b

GPT-OSS 20B is the smaller open-weight sibling in OpenAI's GPT-OSS family. Its compact mixture-of-experts design makes it relevant to specialized assistants and applications exploring a lighter model for structured, tool-assisted work.
Compare models
gpt-oss-20b
AvailableOpenAIChat
Input / Output
$0.075 / $0.30
Context
128K
Max output
32K
Modalities
Chat
Capabilities
Tool use

About gpt-oss-20b

gpt-oss-20b is the smaller open-weight model in OpenAI's gpt-oss family, licensed under Apache 2.0. It has about 21 billion parameters with 3.6 billion active per token, which OpenAI positions for low-latency, local, or specialized use. It handles text only, supports function calling and structured output, and is the lighter choice next to gpt-oss-120b.

Where it works well

  • A small active-parameter count keeps responses quick, which suits interactive assistants and latency-sensitive pipelines.
  • Apache 2.0 weights can be fine-tuned and run locally, so a narrow task can live on your own hardware.
  • Function calling, web browsing, code execution, and structured outputs are supported natively for light agent work.
  • Configurable reasoning effort and visible chain of thought make its behavior easy to inspect.

When to choose another model

  • It reasons less deeply than gpt-oss-120b, so long multi-step problems are better sent to the larger model.
  • Input and output are text only; audio and video need other models.
  • Knowledge stops in mid-2024, so current facts require retrieval or a search tool.

Getting started

  1. Create API key

    Create a key in Console, then use it with every model on the platform.

  2. Send your first request

    Copy the example for your language and run it against the endpoint.

    Text to textResponses API
    POST/v1/responses
    API format:
    curl https://api.tokenlab.sh/v1/responses \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer sk-xxx" \
      -d '{
        "model": "gpt-oss-20b",
        "input": "Hello!"
      }'

Pricing

The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.

Pricing

per 1M tokens
Verified price
—
Official price
Input$0.075per 1M tokensOutput$0.30per 1M tokens

Usage & activity

Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.

Usage & availability

Last 24 hours
Requests
Success rate
P95 latency
Total tokens
Model performance
Metrics appear once privacy and data volume thresholds are met.

Data is based on aggregate user requests, excluding status checks.

Open in Console

Open gpt-oss-20b in Console with a prompt ready to edit or send.

Help me try gpt-oss-20b with a short message at /v1/responses. Show the reply, latency, and cost.

Use cases

  • Low-latency assistants

    Power a chat or command interface where a quick reply matters more than the deepest possible reasoning.

  • Structured extraction

    Pull fields out of tickets, emails, or logs into a JSON schema with structured outputs.

  • Local or edge deployment

    Run the open weights on modest hardware for offline tools or privacy-sensitive prototypes.

  • Narrow fine-tunes

    Adapt a compact reasoning model to one domain, such as routing support requests or labeling internal documents.

Prompt examples

Extract the sender, order number, and complaint type from this email and return them as JSON matching the schema below.

Classify these twenty support tickets into billing, bug, or feature request, and give a one-line reason for each.

Call the lookup tool to check stock for item 5521, then reply to the customer in two sentences.

Cost calculator

1M tokens
0.5M tokens
Estimated monthly cost$0.225

FAQ

What kind of model is gpt-oss-20b?

It is the compact open-weight model in OpenAI's gpt-oss family. It has about 21 billion total and 3.6 billion active parameters, is licensed under Apache 2.0, reads and writes text, and is aimed at low-latency, local, and specialized work.

When should I pick gpt-oss-20b over gpt-oss-120b?

Pick the 20b model when speed, footprint, or on-device deployment matters more than peak reasoning depth. Use gpt-oss-120b for harder multi-step problems where extra quality justifies a heavier model.

Does gpt-oss-20b support tools?

Yes. OpenAI lists function calling, structured outputs, streaming, and tool integrations such as web search, code execution, and MCP. Reasoning effort is configurable and the chain of thought is exposed.

Can I fine-tune gpt-oss-20b?

Yes. The weights are open under Apache 2.0, which removes copyleft and patent concerns, so you can fine-tune them for a domain and deploy where you like.

Which inputs does gpt-oss-20b accept?

It takes text in and gives text out. Keep it for text-only reasoning, extraction, and tool calls, and choose a multimodal model when the input is visual.

How much does gpt-oss-20b cost?

On TokenLab, gpt-oss-20b costs Input $0.075 / Output $0.30 per 1M tokens. The pricing table above shows the full breakdown.

What are the context window and output limit of gpt-oss-20b?

gpt-oss-20b accepts up to 131,072 tokens of context and returns up to 32,768 tokens in one response.

Which endpoint should gpt-oss-20b use?

Use https://api.tokenlab.sh/v1/responses for gpt-oss-20b. The request example below shows the matching code shape.

Which operations does gpt-oss-20b support?

gpt-oss-20b supports Text to text. Select an operation above to see its endpoint and request example.

Compare gpt-oss-20b

Sources

Reviewed Oct 2, 2026

More from gpt-oss

Related models