GPT-OSS 20B
openai/gpt-oss-20b
Open-weight 20B model (Apache 2.0), similar performance to o3-mini. 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-20b", "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-20b', '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-20b",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 1024
}'Pricing
Flat rate per request. No token counting.
Payment
Pay per request with testnet USDC on Base Sepolia. Get testnet USDC from Circle faucet.
Try It
Send a message to try GPT-OSS 20B
Connect your wallet to enable payments
About OpenAI GPT-OSS 20B
GPT-OSS 20B 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.
What it costs
GPT-OSS 20B is billed at a flat $0.0020 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-20b 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 78 chat models to compare alternatives.