LLM Reference
OpenAI API

gpt-oss-120b on OpenAI API

GPT-OSS · OpenAI

ServerlessOpen Source

Last refreshed 2026-04-19. Next refresh: weekly.

Why use gpt-oss-120b on OpenAI API?

OpenAI API offers gpt-oss-120b with competitive pricing. OpenAI is a leading AI research and deployment company dedicated to developing safe and beneficial artificial general intelligence (AGI) for humanity.

Compare gpt-oss-120b across 12 providers to find the best fit for your use case
Input / 1M
-
Output / 1M
-
Cache
Not sourced
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export OPENAI_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI()  # reads OPENAI_API_KEY from env
response = client.chat.completions.create(
Model ID
gpt-oss-120b

Request example

import os
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY from env
response = client.chat.completions.create(
    model="gpt-oss-120b",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use the model slug directly, e.g. "gpt-4o" or "gpt-4.1-mini".
  • The examples expect OPENAI_API_KEY; rename it only if your application config maps the new variable.

Compare gpt-oss-120b Across Providers

ProviderInput (per 1M)Output (per 1M)
Cloudflare Workers AI$0.35$0.75
OpenRouter$0.04$0.18
Together AI$0.15$0.60
Fireworks AI$0.15$0.60
GCP Vertex AI$0.09$0.36
View all 12 providers →

Capabilities

JSON / Tool useStructured Outputs

About gpt-oss-120b

OpenAI open-weight model with 120 billion parameters. Text-only model supporting reasoning, function calling, and structured outputs. Free for self-hosting. Released August 5, 2025.

Get Started

Model Specs

Released2025-08-05
Parameters120B
Context131k
ArchitectureDecoder Only
Knowledge cutoff2025-08

Related Models on OpenAI API