Speed
Output tokens / second
Custom pricing for production workloads
OpenAI’s GPT OSS 20B offers flexible reasoning levels, agentic features, and robust coding support in an open-source, memory-efficient transformer.
Lightweight yet powerful, GPT OSS 20B supports multi-step workflows, tool integration, and runs efficiently on hardware with 16GB memory.
openai/gpt-oss-20bhttps://api.aimlapi.com/v1GPT OSS 20B is an open-weight language model by OpenAI optimized for efficient, local, and specialized use cases with strong reasoning and coding capabilities. It offers a balance of high performance and low latency, making it suitable for edge devices and applications needing rapid iteration or lower compute requirements. Designed for agentic workflows, it supports chain-of-thought reasoning, function calling, and Python code execution, with customizable reasoning effort and structured output capabilities.
vs GPT OSS 120B: GPT OSS 20B operates efficiently on limited hardware with 16GB memory, making it well-suited for local and rapid deployment with solid reasoning and coding capabilities, whereas GPT OSS 120B offers significantly larger capacity (120B parameters), delivers higher accuracy, and is designed for large-scale, high-compute tasks.
vs OpenAI o3-mini: GPT OSS 20B demonstrates comparable performance to the o3-mini model, with the added advantage of open-weight access and flexible configuration, benefiting researchers and developers who require transparency and customization.
vs GLM-4.5: GLM-4.5 outperforms GPT OSS 20B in practical coding challenges and advanced tool integration, but GPT OSS 20B remains competitive in general reasoning tasks and is easier to deploy on hardware with limited resources.
See how GPT OSS 20B compares in generation speed and latency. Data retrieved Nov 4, 2026.
Output tokens / second
Compare 9 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $0.05 | 1M tokens |
| Output | $0.2 | 1M tokens |
| Cached input | $0.0397 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.05 | $0.2 | |
| $1 | $5 | |
| $2 | $10 | |
| $2 | $10 | |
| $2.12 | $10.58 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());GPT OSS 20B has a 131,000 tokens context window and can return up to 131,072 tokens.
GPT OSS 20B takes text as input and returns text.
Use openai/gpt-oss-20b as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GPT OSS 20B became available on September 9, 2025.
GPT OSS 20B costs $0.05 input and $0.2 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, GPT OSS 20B can stream responses as they are generated.
GPT OSS 20B was built by OpenAI.