---
title: "gpt-oss-20b vs Llama 3.1 8B Instruct API pricing compared"
description: "gpt-oss-20b vs Llama 3.1 8B Instruct API price per 1M tokens: USD 0.018 / USD 0.09 vs USD 0.02 / USD 0.04 input/output, from providers' own pricing pages."
url: https://broadrouter.com/llm-api-pricing/compare/gpt-oss-20b-vs-llama-3.1-8b-instruct/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# gpt-oss-20b vs Llama 3.1 8B Instruct API pricing

Updated 2026-11-15

gpt-oss-20b: USD 0.018 input, USD 0.09 output per 1M tokens (AkashML, promotional). Llama 3.1 8B Instruct: USD 0.02 input, USD 0.04 output per 1M tokens (DeepInfra). At 3 input tokens per output token, gpt-oss-20b costs 44% more than Llama 3.1 8B Instruct (USD 0.036 vs USD 0.025 per 1M).

Picked by the same-tier rule: both are in the first quarter of the indexed models by price (below USD 0.1556 per 1M tokens at 3:1) and in the same size class, small (a tier word such as Flash, Mini or Haiku, or 40B parameters or fewer). Llama 3.1 8B Instruct is the 4th-closest-priced model from another maker to gpt-oss-20b in that bucket. **Price only**: every number is computed from prices read from each provider's own pricing page (linked per cell, newest check 2026-11-15), with no claim about quality, speed or accuracy.

## How do gpt-oss-20b and Llama 3.1 8B Instruct differ on price?

-   Cheapest input price: gpt-oss-20b USD 0.018 against USD 0.02 per 1M tokens, so Llama 3.1 8B Instruct costs 1.11× as much (11% more).
-   Cheapest output price: Llama 3.1 8B Instruct USD 0.04 against USD 0.09 per 1M tokens, so gpt-oss-20b costs 2.3× as much.
-   Among the 201 indexed models, gpt-oss-20b ranks 3rd cheapest and Llama 3.1 8B Instruct 1st on the 3:1 blend.
-   The cheaper model changes at 25 input tokens per output token.
-   Both list cached-input discounts: gpt-oss-20b at 4 standard prices of 10, from USD 0.007 (Google Vertex AI, 90% below that provider's input price); Llama 3.1 8B Instruct at 1 standard price of 6, from USD 0.028 (Featherless, 86% below that provider's input price).
-   Both state a context window of up to 131,072 tokens.
-   gpt-oss-20b has 10 providers with a standard price, 4 more than Llama 3.1 8B Instruct; 5 providers sell both (DeepInfra, CoreWeave Forge, Featherless, Amazon Bedrock and 1 more).
-   On one account, DeepInfra charges USD 0.0575 for gpt-oss-20b (1.6× its cheapest price) and USD 0.025 for Llama 3.1 8B Instruct (its cheapest price) at 3:1, the lowest combined price among the providers that sell both.
-   Shopping around matters more for Llama 3.1 8B Instruct: its dearest standard price is 17× its cheapest, against 6.3× for gpt-oss-20b.
-   gpt-oss-20b has a batch price at 2 providers, from USD 0.0575 at 3:1 (Google Vertex AI); Llama 3.1 8B Instruct has a batch price at 1 provider, from USD 0.11 at 3:1 (Amazon Bedrock).
-   For the one-developer coding agent preset, the gap is USD 154.44 a year in gpt-oss-20b's favour (gpt-oss-20b USD 26.73 a month, Llama 3.1 8B Instruct USD 39.60).
-   Per character of input, the gap depends on the language: gpt-oss-20b costs 1.5× as much as Llama 3.1 8B Instruct on Code text but 7% less than Llama 3.1 8B Instruct on Hindi, because the two tokenizers split those languages differently.

## gpt-oss-20b and Llama 3.1 8B Instruct prices side by side

USD per 1M tokens, standard tier. "Cheapest" is the lowest price at 3 input tokens to 1 output token; each line can come from a different provider.

gpt-oss-20b and Llama 3.1 8B Instruct API prices compared
| Price | gpt-oss-20b | Llama 3.1 8B Instruct |
| --- | --- | --- |
| Model page | [GPT OSS 20B](https://broadrouter.com/llm-api-pricing/gpt-oss-20b/) · OpenAI · 10 providers | [Llama 3.1 8B Instruct](https://broadrouter.com/llm-api-pricing/llama-3.1-8b-instruct/) · Meta · 6 providers |
| Cheapest standard price, blended 3:1 | USD 0.036 promo · USD 0.018 in / USD 0.09 out at AkashML · [AkashML page](https://akashml.com/models/gpt-oss-20b) checked 2026-11-15 | USD 0.025 lower · USD 0.02 in / USD 0.04 out at DeepInfra · [DeepInfra page](https://deepinfra.com/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo) checked 2026-11-14 |
| Cheapest input | USD 0.018 lower promo · AkashML [source](https://akashml.com/models/gpt-oss-20b) | USD 0.02 · DeepInfra [source](https://deepinfra.com/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo) |
| Cheapest cached input | USD 0.007 lower · Google Vertex AI [source](https://cloud.google.com/model-garden/partner-models/pricing) | USD 0.028 · Featherless [source](https://featherless.ai/models/meta-llama/Llama-3.1-8B-Instruct) |
| Cheapest output | USD 0.09 promo · AkashML [source](https://akashml.com/models/gpt-oss-20b) | USD 0.04 lower · DeepInfra [source](https://deepinfra.com/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo) |
| Cheapest non-promotional price | USD 0.03 / USD 0.13 · CoreWeave Forge, USD 0.055 blended [source](https://coreweave.com/forge-pricing/inference-agents) | The cheapest price is not promotional. |
| Maker's own API | OpenAI publishes no paid standard price on its own API that we found. | Meta publishes no paid standard price on its own API that we found. |
| Median standard price | USD 0.04 / USD 0.19 · input / output, 10 prices | USD 0.21 / USD 0.22 · input / output, 6 prices |
| Context window | 131,072 tokens, largest stated | 131,072 tokens, largest stated; from 16,384 at some providers |
| Providers with a standard price | 10 | 6 |

-   **Lower** marks the lower price on a line; **tie**, equal prices. Other tiers and free rows are on the model pages.
-   **Promo:** the provider calls the price promotional or discounted, so it is current now and can end without notice.

[Report a wrong price or number](mailto:info@broadnet.ai?subject=Wrong%20price%20or%20number%20on%20gpt-oss-20b%20vs%20Llama%203.1%208B%20Instruct%20API%20pricing&body=Page%3A%20https%3A%2F%2Fbroadrouter.com%2Fllm-api-pricing%2Fcompare%2Fgpt-oss-20b-vs-llama-3.1-8b-instruct%2F%0A%0AWhat%20looks%20wrong%20(model%2C%20figure%20shown%2C%20correct%20figure%20and%20a%20source%20link%20if%20you%20have%20one)%3A%0A) (email to info@broadnet.ai, with this page's link filled in).

## What do gpt-oss-20b and Llama 3.1 8B Instruct cost for a real workload?

30 days at each model's cheapest standard price for the workload (presets of the [cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/?model=gpt-oss-20b,llama-3.1-8b-instruct); cached input at the cached price where listed).

Monthly cost of three workloads on gpt-oss-20b and Llama 3.1 8B Instruct
| Workload | gpt-oss-20b | Llama 3.1 8B Instruct | Difference |
| --- | --- | --- | --- |
| **Support chatbot** · 2,000 requests a day, 1,500 input tokens (60% cached), 300 output | USD 2.75 · AkashML | USD 2.52 · DeepInfra | USD 0.23 · Llama 3.1 8B Instruct lower |
| **RAG over documents** · 1,000 requests a day, 8,000 input tokens (30% cached), 500 output | USD 5.02 · AkashML | USD 5.40 · DeepInfra | USD 0.38 · gpt-oss-20b lower |
| **Coding agent (one developer)** · 1,500 requests a day, 40,000 input tokens (85% cached), 2,000 output incl. reasoning | USD 26.73 · AkashML | USD 39.60 · DeepInfra | USD 12.87 · gpt-oss-20b lower |

The cheaper model depends on the workload: Llama 3.1 8B Instruct for Support chatbot, gpt-oss-20b for RAG over documents, gpt-oss-20b for Coding agent (one developer). Cache-heavy work rewards a low cached-input price. The widest gap is on Coding agent (one developer): the dearer model costs 48% more than the cheaper one.

## Does the cheaper model change with your input:output ratio?

The cheaper model changes with the mix: below 25 input tokens per output token, Llama 3.1 8B Instruct is cheaper; above 25, gpt-oss-20b is cheaper. At the site's 3:1 blend, Llama 3.1 8B Instruct is cheaper. More input per output token, as with retrieval or agents that resend long contexts, favours the lower input price; long answers favour the lower output price.

Price per 1M tokens of gpt-oss-20b and Llama 3.1 8B Instruct at different input:output mixes
| Input : output tokens | gpt-oss-20b | Llama 3.1 8B Instruct |
| --- | --- | --- |
| **1 : 3** (long answers) | USD 0.072 · AkashML | USD 0.035 lower · DeepInfra |
| **1 : 1** | USD 0.054 · AkashML | USD 0.03 lower · DeepInfra |
| **3 : 1** (the site’s blend) | USD 0.036 · AkashML | USD 0.025 lower · DeepInfra |
| **10 : 1** (retrieval, long prompts) | USD 0.02455 · AkashML | USD 0.02182 lower · DeepInfra |
| **30 : 1** (agents, big contexts) | USD 0.02032 lower · AkashML | USD 0.02065 · DeepInfra |

USD per 1M tokens at the cheapest standard provider for each mix, before cache discounts. Thinking tokens bill as output.

## What do gpt-oss-20b and Llama 3.1 8B Instruct cost per character in other languages?

Cost to send 1M characters at each model's cheapest non-promotional standard input price, with the gpt-oss (o200k\_harmony) tokenizer for gpt-oss-20b and the Llama 3.3 70B tokenizer for Llama 3.1 8B Instruct:

Input cost per 1M characters by language, gpt-oss-20b and Llama 3.1 8B Instruct
| Content | gpt-oss-20b | Llama 3.1 8B Instruct |
| --- | --- | --- |
| **English** | USD 0.0064 · CoreWeave Forge | USD 0.0043 lower · DeepInfra |
| **Arabic MSA** | USD 0.0096 · CoreWeave Forge | USD 0.0077 lower · DeepInfra |
| **Egyptian Arabic** | USD 0.0100 · CoreWeave Forge | USD 0.0079 lower · DeepInfra |
| **Hindi** | USD 0.0097 lower · CoreWeave Forge | USD 0.010 · DeepInfra |
| **Chinese** | USD 0.023 · CoreWeave Forge | USD 0.016 lower · DeepInfra |
| **Spanish** | USD 0.0068 · CoreWeave Forge | USD 0.0053 lower · DeepInfra |
| **Code** | USD 0.0076 · CoreWeave Forge | USD 0.0051 lower · DeepInfra |

From the [real cost by language dataset](https://broadrouter.com/data/real-cost-by-language/) (measured tokens per character on FLORES-200 and other texts). Your own text will differ.

## Check it on your own traffic

-   [GPT OSS 20B API pricing](https://broadrouter.com/llm-api-pricing/gpt-oss-20b/): all 10 providers and other tiers.
-   [Llama 3.1 8B Instruct API pricing](https://broadrouter.com/llm-api-pricing/llama-3.1-8b-instruct/): all 6 providers and other tiers.
-   [Cost calculator with gpt-oss-20b and Llama 3.1 8B Instruct preloaded](https://broadrouter.com/tools/llm-api-cost-calculator/?model=gpt-oss-20b,llama-3.1-8b-instruct)
-   [gpt-oss token counter](https://broadrouter.com/tools/gpt-oss-token-counter/)
-   [Llama 3 token counter](https://broadrouter.com/tools/llama-token-counter/)
-   [Prompt caching calculator](https://broadrouter.com/tools/prompt-caching-calculator/)

More comparisons: [gpt-oss-120b vs gpt-oss-20b](https://broadrouter.com/llm-api-pricing/compare/gpt-oss-120b-vs-gpt-oss-20b/) · [Gemma 4 26B A4B vs gpt-oss-20b](https://broadrouter.com/llm-api-pricing/compare/gemma-4-26b-a4b-it-vs-gpt-oss-20b/) · [gpt-oss-20b vs Qwen3.6 35B A3B](https://broadrouter.com/llm-api-pricing/compare/gpt-oss-20b-vs-qwen3.6-35b-a3b/) · [Llama 3.1 8B Instruct vs Llama 3 8B](https://broadrouter.com/llm-api-pricing/compare/llama-3.1-8b-instruct-vs-llama-3-8b-instruct/) · [Llama 3.1 70B vs Llama 3.1 8B Instruct](https://broadrouter.com/llm-api-pricing/compare/llama-3.1-70b-instruct-vs-llama-3.1-8b-instruct/) · [every gpt-oss-20b comparison](https://broadrouter.com/llm-api-pricing/compare/#m-gpt-oss-20b) · [every Llama 3.1 8B Instruct comparison](https://broadrouter.com/llm-api-pricing/compare/#m-llama-3.1-8b-instruct) · [all 662 price comparisons](https://broadrouter.com/llm-api-pricing/compare/)

## Questions

### Is gpt-oss-20b cheaper than Llama 3.1 8B Instruct?

No. On a blend of 3 input tokens to 1 output token, Llama 3.1 8B Instruct costs USD 0.025 per 1M tokens and gpt-oss-20b USD 0.036, at each model's cheapest standard price. For input alone, gpt-oss-20b is cheaper (USD 0.018 against USD 0.02 per 1M); for output alone, Llama 3.1 8B Instruct is (USD 0.04 against USD 0.09). This compares price only, not quality.

### What do gpt-oss-20b and Llama 3.1 8B Instruct cost per 1M tokens?

gpt-oss-20b: from USD 0.018 input and USD 0.09 output at AkashML (promotional); median of 10 standard prices USD 0.04 / USD 0.19. Llama 3.1 8B Instruct: from USD 0.02 input and USD 0.04 output at DeepInfra; median of 6 standard prices USD 0.21 / USD 0.22. Each price is read from the provider's own pricing page; the source is linked in the table.

### Which providers sell both gpt-oss-20b and Llama 3.1 8B Instruct?

5 providers have a standard price for both: DeepInfra (USD 0.0575 and USD 0.025 at 3:1), CoreWeave Forge (USD 0.055 and USD 0.22 at 3:1), Featherless (USD 0.0675 and USD 0.23 at 3:1), Amazon Bedrock (USD 0.1275 and USD 0.22 at 3:1), Cloudflare Workers AI (USD 0.225 and USD 0.4182 at 3:1). The first is the lowest combined price. Buying each model from its own cheapest provider costs USD 0.036 and USD 0.025.

### Which is cheaper for a coding agent or a chatbot, gpt-oss-20b or Llama 3.1 8B Instruct?

For a coding agent (1,500 requests a day, 40,000 input tokens (85% cached), 2,000 output incl. reasoning): USD 26.73 a month on gpt-oss-20b (AkashML) against USD 39.60 on Llama 3.1 8B Instruct (DeepInfra), a difference of USD 12.87. For a support chatbot (2,000 requests a day, 1,500 input tokens (60% cached), 300 output): USD 2.75 a month on gpt-oss-20b (AkashML) against USD 2.52 on Llama 3.1 8B Instruct (DeepInfra), a difference of USD 0.23. Each uses the cheapest standard price for that workload, cached input included. [Try your own numbers](https://broadrouter.com/tools/llm-api-cost-calculator/?model=gpt-oss-20b,llama-3.1-8b-instruct).

### At what input:output ratio does the cheaper of gpt-oss-20b and Llama 3.1 8B Instruct change?

The cheaper model changes with the mix: below 25 input tokens per output token, Llama 3.1 8B Instruct is cheaper; above 25, gpt-oss-20b is cheaper. At the site's 3:1 blend, Llama 3.1 8B Instruct is cheaper. More input per output token, as with retrieval or agents that resend long contexts, favours the lower input price; long answers favour the lower output price.

### Do gpt-oss-20b and Llama 3.1 8B Instruct have cached input pricing?

gpt-oss-20b from USD 0.007 per 1M cached input tokens (Google Vertex AI; 4 of 10 standard prices list a discount). Llama 3.1 8B Instruct from USD 0.028 per 1M cached input tokens (Featherless; 1 of 6 standard prices list a discount). Cached tokens are billed at the input price where no cache price is published.

### Which has the larger context window, gpt-oss-20b or Llama 3.1 8B Instruct?

Both go up to 131,072 tokens on the providers that state it.

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=llm-api-pricing-compare-gpt-oss-20b-vs-llama-3.1-8b-instruct&utm_content=page-cta) ·

**Sources**

-   [AkashML: pricing (checked 2026-11-15)](https://akashml.com/models/gpt-oss-20b)
-   [Google Vertex AI: pricing (checked 2026-11-14)](https://cloud.google.com/model-garden/partner-models/pricing)
-   [CoreWeave Forge: pricing (checked 2026-11-15)](https://coreweave.com/forge-pricing/inference-agents)
-   [DeepInfra: pricing (checked 2026-11-14)](https://deepinfra.com/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo)
-   [Featherless: pricing (checked 2026-11-15)](https://featherless.ai/models/meta-llama/Llama-3.1-8B-Instruct)
-   [DeepInfra: pricing (checked 2026-11-14)](https://deepinfra.com/openai/gpt-oss-20b)
-   [Featherless: pricing (checked 2026-11-15)](https://featherless.ai/models/openai/gpt-oss-20b)
-   [Amazon Bedrock: pricing (checked 2026-11-14)](https://aws.amazon.com/bedrock/pricing/)
-   [Cloudflare Workers AI: pricing (checked 2026-11-14)](https://developers.cloudflare.com/workers-ai/platform/pricing/)
