OpenAI: GPT OSS 20B
gpt-oss-20b
An open-weight 21B parameter model released under the Apache 2.0 license. It uses a Mixture-of-Experts (MoE) architecture with 3.6B active parameters per forward pass, optimized for lower-latency inference and deployability on consumer or single-GPU hardware. The model is trained in OpenAI's Harmony response format and supports reasoning level configuration, fine-tuning, and agentic capabilities including function calling, tool use, and structured outputs.
Modalities
Text → Text
Input / output price
$0.0234 / $0.117 per 1M
Context
131K · max output 16K
Capabilities
Pricing
Billed per token actually used and deducted from your credits.
| Item | USD per 1M tokens |
|---|---|
| Input | $0.0234 |
| Output | $0.117 |
| Cached input | $0.0117 |
Calculator
Drag the sliders to estimate what this model will cost.
- Per request
- $0.00016
- Per day
- $0.0819
- Per month (30 days)
- $2.46
GPT OSS 20B: input $0.0234/M · output $0.117/M · cached input $0.0117/M
curl https://api.geniusrelaygpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-oss-20b", "max_tokens": 800,
"messages": [{"role": "user", "content": "…"}]}'Code samples
OpenAI-compatible. Set the base URL to https://api.geniusrelaygpt.com/v1 and the model to gpt-oss-20b.
curl https://api.geniusrelaygpt.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-oss-20b",
"stream": true,
"messages": [{"role": "user", "content": "Hello"}]
}'Use it in a client: Cursor · Cline · SillyTavern · Codex
Parameters
Common OpenAI parameters can be passed as-is.
temperaturetop_pmax_tokensstreamstoppresence_penaltyfrequency_penaltyseedFAQ
- How is GPT OSS 20B billed?
- Input is $0.0234 and output is $0.117 per million tokens; cached input is $0.0117. The charge for every request is listed in Usage Logs in the console.
- How long is the context window?
- 131K tokens. In a long conversation every turn is billed for the full input, so keep the history under control.
- Does it support streaming?
- Yes. Add
"stream": trueto the request to receive server-sent events in the OpenAI format.