Baltor Get started

Models

gpt-oss-20b

By OpenAI. 20.9 billion parameters, a context window of 131,072 tokens and the licence apache-2.0.

Facts

Released
2025-08-04 the day the repository was first published on Hugging Face Hugging Face, read
Licence
apache-2.0 the licence the model card declares Hugging Face, read
Open weights
Yes the weights are published in this Hugging Face repository Hugging Face, read
Parameters
20.9 billion counted from the safetensors weight files Hugging Face, read
Active parameters
4.2 billion estimate estimated from the expert counts and sizes in the configuration model configuration, read
Knowledge cutoff
2024-06-30 the knowledge cutoff OpenRouter lists OpenRouter, read
Context window
  • 131,072 tokens the maximum position embeddings in the model configuration model configuration, read
  • 131,072 tokens the context length OpenRouter lists OpenRouter, read
Longest output
  • 32,768 tokens the largest output OpenRouter's first provider allows OpenRouter, read
Tool calling
  • Yes OpenRouter lists tools among the supported parameters OpenRouter, read
Structured output
  • Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
Reasoning controls
  • Yes OpenRouter lists reasoning controls, with the efforts high, medium, low OpenRouter, read
Inputs and outputs
text in, text out Hugging Face, read
Good for
  • Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read

Prices

Prices in US dollars per million tokens, as each source lists them
ProviderInputOutputContextAs ofSource
LMStudio direct0 USD0 USD131,072 older than 30 days; check the providermodels.dev, read
Nvidia direct0 USD0 USD131,072 older than 30 days; check the providermodels.dev, read
Darkbloom through OpenRouter0.018 USD0.090 USD131,072OpenRouter endpoints, read
Darkbloom through OpenRouter0.018 USD0.090 USD131,072OpenRouter endpoints, read
Kilo Gateway direct0.018 USD0.090 USD131,072 older than 30 days; check the providermodels.dev, read
OpenRouter direct0.018 USD0.090 USD131,072 older than 30 days; check the providermodels.dev, read
AkashML through OpenRouter0.020 USD0.100 USD131,072OpenRouter endpoints, read
AkashML through OpenRouter0.020 USD0.100 USD131,072OpenRouter endpoints, read
DekaLLM through OpenRouter0.029 USD0.140 USD131,072OpenRouter endpoints, read
DekaLLM through OpenRouter0.029 USD0.140 USD131,072OpenRouter endpoints, read
CoreWeave direct0.030 USD0.130 USD131,072 older than 30 days; check the providermodels.dev, read
CoreWeave through OpenRouter0.030 USD0.130 USD131,072OpenRouter endpoints, read
CoreWeave through OpenRouter0.030 USD0.130 USD131,072OpenRouter endpoints, read
Deep Infra direct0.030 USD0.140 USD131,072 older than 30 days; check the providermodels.dev, read
DeepInfra through OpenRouter0.030 USD0.140 USD131,072OpenRouter endpoints, read
DeepInfra through OpenRouter0.030 USD0.140 USD131,072OpenRouter endpoints, read
IO.NET direct0.030 USD0.140 USD64,000 older than 30 days; check the providermodels.dev, read
Vercel AI Gateway direct0.030 USD0.140 USD131,072 older than 30 days; check the providermodels.dev, read
Parasail through OpenRouter0.030 USD0.150 USD131,072OpenRouter endpoints, read
Parasail through OpenRouter0.030 USD0.150 USD131,072OpenRouter endpoints, read
Novita through OpenRouter0.040 USD0.150 USD131,072OpenRouter endpoints, read
Novita through OpenRouter0.040 USD0.150 USD131,072OpenRouter endpoints, read
NovitaAI direct0.040 USD0.150 USD131,072 older than 30 days; check the providermodels.dev, read
SiliconFlow direct0.040 USD0.180 USD131,000 older than 30 days; check the providermodels.dev, read
SiliconFlow through OpenRouter0.040 USD0.180 USD131,072OpenRouter endpoints, read
SiliconFlow through OpenRouter0.040 USD0.180 USD131,072OpenRouter endpoints, read
Merge Gateway direct0.040 USD0.200 USD131,072 older than 30 days; check the providermodels.dev, read
FastRouter direct0.050 USD0.200 USD131,072 older than 30 days; check the providermodels.dev, read
Together AI direct0.050 USD0.200 USD131,072 older than 30 days; check the providermodels.dev, read
Amazon Bedrock through OpenRouter0.070 USD0.150 USD131,072OpenRouter endpoints, read
Amazon Bedrock through OpenRouter0.070 USD0.150 USD131,072OpenRouter endpoints, read
Amazon Bedrock through OpenRouter0.070 USD0.150 USD131,072OpenRouter endpoints, read
Amazon Bedrock through OpenRouter0.070 USD0.150 USD131,072OpenRouter endpoints, read
Google through OpenRouter0.070 USD0.250 USD131,072OpenRouter endpoints, read
Google through OpenRouter0.070 USD0.250 USD131,072OpenRouter endpoints, read
Pioneer direct0.070 USD0.300 USD131,072 older than 30 days; check the providermodels.dev, read
Groq direct0.075 USD0.300 USD131,072 older than 30 days; check the providermodels.dev, read
Groq through OpenRouter0.075 USD0.300 USD131,072OpenRouter endpoints, read
Groq through OpenRouter0.075 USD0.300 USD131,072OpenRouter endpoints, read
Hugging Face direct0.100 USD0.500 USD131,072 older than 30 days; check the providermodels.dev, read
STACKIT direct0.180 USD0.290 USD131,072 older than 30 days; check the providermodels.dev, read
NanoGPT direct0.200 USD0.300 USD128,000 older than 30 days; check the providermodels.dev, read

Run it on your own hardware

Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
Q3_K_S10.7 GiB12.1 GiB13.2 GiB
Q4_010.7 GiB12.1 GiB13.2 GiB
Q3_K_M10.7 GiB12.1 GiB13.3 GiB
Q4_110.8 GiB12.2 GiB13.3 GiB
Q4_K_S10.8 GiB12.2 GiB13.4 GiB
Q4_K_M10.8 GiB12.2 GiB13.4 GiB
UD-Q4_K_XL11.1 GiB12.5 GiB13.6 GiB

Start it with a local runtime

  • Ollama
    ollama run hf.co/unsloth/gpt-oss-20b-GGUF:Q4_0
  • LM Studio
    lms get unsloth/gpt-oss-20b-GGUF
    lms server start
  • llama.cpp server
    llama-server -hf unsloth/gpt-oss-20b-GGUF:Q4_0 --jinja
  • vLLM
    vllm serve openai/gpt-oss-20b
  • SGLang
    sglang serve --model-path openai/gpt-oss-20b --port 30000

Use it from your harness

Set up for DeepInfra with the model openai/gpt-oss-20b. Each endpoint page has the same setup for its own address.

OpenCode

Put this in opencode.json in your project folder:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "deepinfra": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "DeepInfra",
      "options": {
        "baseURL": "https://api.deepinfra.com/v1/openai",
        "apiKey": "{env:DEEPINFRA_TOKEN}"
      },
      "models": {
        "openai/gpt-oss-20b": {
          "name": "gpt-oss-20b",
          "limit": {
            "context": 131072,
            "output": 32768
          }
        }
      }
    }
  }
}
  • OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.

From OpenCode documentation, read .

Pi

Put this in ~/.pi/agent/models.json:

{
  "providers": {
    "deepinfra": {
      "baseUrl": "https://api.deepinfra.com/v1/openai",
      "api": "openai-completions",
      "apiKey": "$DEEPINFRA_TOKEN",
      "models": [
        {
          "id": "openai/gpt-oss-20b"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Codex speaks only the Responses API, and DeepInfra documents no Responses address. A gateway that offers one can sit in between.

  • Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.

From Codex documentation, read .

Claude Code

Put this in ~/.claude/settings.json, or variables in your shell:

export ANTHROPIC_BASE_URL="https://api.deepinfra.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="$DEEPINFRA_TOKEN"
export ANTHROPIC_MODEL="openai/gpt-oss-20b"
claude
  • Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.

From Claude Code documentation, read .

Other ways to reach it

Published results

These are results other people published. Baltor did not run them and does not rank models by them.