We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
OpenAI: gpt-oss-20b
openai/gpt-oss-20bTry OpenAI: gpt-oss-20b now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
OpenAI: gpt-oss-20b at a glance
- Input price is 96% lower than the median of 434 Text models.
- Context window of 131,072 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- Supports reasoning effort control.
- A typical request (1,000 input / 500 output tokens) costs about $0.000221.
About OpenAI: gpt-oss-20b
OpenAI: gpt-oss-20b is an open-weight language model released by OpenAI under the Apache 2.0 license. It has 21 billion total parameters and uses a Mixture-of-Experts (MoE) architecture with 3.6 billion active parameters per forward pass. The model was published by the provider on 2025-08-05. Because it is open-weight and Apache 2.0 licensed, the weights are available for inspection and self-hosting, and it sits in the text category of OpenAI's model line.
The model is text in, text out. It accepts text prompts and returns text completions, with a context window of 131,072 tokens and a maximum output of 32,768 tokens. Its knowledge cutoff is 2024-06-30, so anything after that date is outside its training data. It supports reasoning output, which you can control through the reasoning, reasoning_effort, and include_reasoning parameters when you want the model to expose or suppress its intermediate thinking.
Those capabilities point to a few practical uses. The long context suits work over large documents, such as summarizing or extracting from long reports, code files, or transcripts that would otherwise need chunking. Reasoning support makes it a reasonable fit for tasks that benefit from step by step problem solving, including math, logic, and multi step code generation or debugging. Function calling through the tools and tool_choice parameters lets you build agents that call external APIs, and structured_outputs and response_format help when downstream code needs JSON or a fixed schema rather than free text. Sampling controls such as temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, and repetition_penalty let you tune determinism and repetition for both creative and analytical workloads, while seed supports reproducible sampling.
You call the model through api14's OpenAI-compatible API using the model id "openai/gpt-oss-20b". Because the endpoint follows the OpenAI schema, existing OpenAI client libraries and request shapes work without changes. Alongside the usual fields, the model supports frequency_penalty, include_reasoning, logit_bias, logprobs, max_tokens, min_p, presence_penalty, reasoning, reasoning_effort, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_k, top_logprobs, and top_p, so you can control sampling, logging, reasoning, and tool use from the request itself.
The main constraint to keep in mind is modality: gpt-oss-20b only handles text, so image, audio, and other non-text inputs need a different model. The 131,072 token context and 32,768 token output ceiling are large but finite, so very long inputs must be trimmed or split. If your task depends on knowledge after 2024-06-30, the model will not know about it. For workloads where a smaller, faster, or non-text capable model fits better, api14 lists other models you can switch between without changing your integration.
How to call the OpenAI: gpt-oss-20b API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-oss-20b".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningreasoning_effortrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_pSpecifications
- Context length
- 131,072
- Max output
- 32,768
- Input
- text
- Output
- text
- Knowledge cutoff
- 2024-06-30
Requests on api14 · last 7 days
OpenAI: gpt-oss-20b: frequently asked questions
- How much does the OpenAI: gpt-oss-20b API cost?
- OpenAI: gpt-oss-20b costs Input $0.06 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of OpenAI: gpt-oss-20b?
- OpenAI: gpt-oss-20b reads up to 131,072 tokens per request: prompt, history and documents together. It writes up to 32,768 output tokens per response.
- What can OpenAI: gpt-oss-20b do?
- OpenAI: gpt-oss-20b accepts text and returns text. It supports tool calling, structured JSON output, reasoning effort control.
- How do I call OpenAI: gpt-oss-20b from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-oss-20b". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to OpenAI: gpt-oss-20b?
- Comparable Text models at a similar price: Nex AGI: Nex-N2.5-Mini, Google: Gemma 3 4B, Sao10K: Llama 3 8B Lunaris. Each runs through the same API key, so switching is one string.
OpenAI: gpt-oss-20b community
New topicThis community has no topics yet. Open the first one about OpenAI: gpt-oss-20b.