BlockRun
Back to Models

GPT-OSS 120B API

openai/gpt-oss-120b

openai

Open-weight 120B model (Apache 2.0), flagship open model. Available on testnet for developer testing.

Code Examples

from blockrun_llm import LLMClient

# Testnet: Use testnet API endpoint
client = LLMClient(api_url="https://testnet.blockrun.ai/api")
response = client.chat("openai/gpt-oss-120b", "Hello!")
import { LLMClient } from '@blockrun/llm';

// Testnet: Use testnet API endpoint
const client = new LLMClient({ apiUrl: 'https://testnet.blockrun.ai/api' });
const response = await client.chat('openai/gpt-oss-120b', 'Hello!');
curl -X POST https://testnet.blockrun.ai/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "PAYMENT-SIGNATURE: <payment_header>" \
  -d '{
    "model": "openai/gpt-oss-120b",
    "messages": [{"role": "user", "content": "Hello!"}],
    "max_tokens": 1024
  }'

On BlockRun since 2026-02-21. Measured on BlockRun: fewer than 100 calls to GPT-OSS 120B this week — price only.

Pricing

Per Request$0.0030
Context128K tokens
Max Output16K tokens

Flat rate per request. No token counting.

Payment

Network
Base Sepolia
Currency
Testnet USDC
Protocol
x402

Pay per request with testnet USDC on Base Sepolia. Get testnet USDC from Circle faucet.

Try It

Send a message to try GPT-OSS 120B

Connect your wallet to enable payments

About OpenAI GPT-OSS 120B

GPT-OSS 120B is a reasoning and coding model from OpenAI with a 128K-token context window and up to 16K tokens of output per call. It is billed at a flat rate per request rather than per token. It is served on the Base Sepolia testnet and paid in testnet USDC. It is served through BlockRun's OpenAI-compatible API, so it can be called without an account, an API key, or a subscription.

Use GPT-OSS 120B for

  • Multi-step reasoning: planning, analysis and math that need thinking before an answer
  • Coding agents: writing, reviewing and refactoring code across a repository
  • Chat assistants and agents that answer, summarise and draft

What it costs

GPT-OSS 120B is billed at a flat $0.0030 per request, settlement fee included, regardless of how long the prompt or the completion runs. Flat pricing makes cost per call predictable for high-volume agent loops where token counts vary widely from request to request.

Specifications

Context window
128,000 tokens
Maximum output
16,384 tokens
API compatibility
OpenAI-compatible
Payment
USDC via x402
Categories
chat, reasoning, coding

Calling it from your code

Pass openai/gpt-oss-120b as the model field. Because the endpoint mirrors the OpenAI chat completions schema, any existing OpenAI client works by changing the base URL — streaming, tool use, and multi-turn messages all behave the same way.

The first request returns a 402 carrying the exact price; a signed retry runs it, and client libraries fold the two into one call — how the payment works. See the documentation for request and response shapes, the LLM API page for every model on this endpoint, or browse the full catalog of 91 chat models to compare alternatives.

GPT-OSS 120B or another model

The closest alternatives by price that do the same kind of work. Each is called on the same endpoint with the same request, so comparing two is a one-line change.

ModelPriceContext
OpenAI GPT-OSS 120B (this page)$0.0030 per request128K context
xAI Grok Build 0.1$1.00 in / $2.00 out per 1M256K context
Google Gemini 2.5 Flash$0.30 in / $2.50 out per 1M1.05M context
Google Gemini 3.5 Flash Lite$0.30 in / $2.50 out per 1M1.05M context

GPT-OSS 120B API questions

How much does the GPT-OSS 120B API cost?

GPT-OSS 120B costs a flat $0.0030 per request, settlement fee included.

What is GPT-OSS 120B's context window?

128,000 tokens of context, with up to 16,384 tokens of output per call.

Is the GPT-OSS 120B API OpenAI-compatible?

Yes. Send an OpenAI chat-completions request with "model": "openai/gpt-oss-120b" to the BlockRun endpoint. An existing OpenAI client works by changing the base URL; streaming and multi-turn messages behave the same way.

Do I need an API key to use GPT-OSS 120B?

No. Each request carries its own payment, so an agent or script can call GPT-OSS 120B with no account and no key. Teams that prefer one can use an API key with card or invoice billing instead.

What happens if GPT-OSS 120B is unavailable?

A request that fails is not charged. If you set "allow_fallback": true, a failed call can be retried on NVIDIA Nemotron 3.5 Super 120B (Free) instead, never at a higher price than you were quoted.

Two ways to run this

Get an API key

Sign in, get a key, and call the same endpoints with usage billed to your account. For teams that want one invoice instead of one wallet.

Get an API key 

Or let your agent pay per call, in USDC

No account, no API key. Three steps, and the last one is the request this page is about.

  1. 01
    Point your agent at BlockRun

    Install ClawRouter, or add the BlockRun MCP server to Claude Code, Cursor, Codex or OpenClaw. Any OpenAI-compatible client works too — change the base URL, nothing else.

    curl -fsSL https://blockrun.ai/ClawRouter-update | bash
  2. 02
    Fund a wallet with USDC

    Send USDC to a wallet on Base, Solana or Arc. There is no account to create and no API key to issue: the wallet is the account, and it pays per call.

  3. 03
    Call GPT-OSS 120B

    The first call returns HTTP 402 with the exact price, your agent signs it, and the answer comes back. Payment settles on-chain; nothing is charged if the call fails.

    curl -X POST https://blockrun.ai/api/v1/chat/completions \
      -H "Content-Type: application/json" \
      -d '{"model": "openai/gpt-oss-120b", "messages": [{"role": "user", "content": "Hello!"}]}'