{"uid":"cap_q4jrNae7nwlkuLW8VsXcT","slug":"gpt-oss-120b-chat-completions-telnyx-inference-x402-bad0c8ff","name":"gpt-oss-120b Chat Completions (Telnyx Inference, x402)","description":"Open-weight reasoning-model chat completions via Telnyx Inference (OpenAI gpt-oss-120b, beta). Choose reasoning_effort low (default), medium or high. Reasoning tokens count toward max_tokens (2048-8192, default 4096); if reasoning uses the whole budget you get a 503 and are not charged. OpenAI-compatible. Up to $0.004928 USDC per call, quoted to your request (input + max_tokens at list rates, no markup), or pay per-token via the upto scheme.","url":"https://x402.telnyx.com/v1/chat/completions/_t/gpt-oss-120b?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","const":1,"description":"Fixed to one completion per paid call."},"model":{"type":"string","const":"openai/gpt-oss-120b","description":"Model identifier; fixed to openai/gpt-oss-120b on this route."},"tools":{"type":"array","items":{"type":"object"},"maxItems":16},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"role":{"enum":["system","user","assistant","tool"],"type":"string"},"content":{"type":["string","null"],"maxLength":32000,"description":"Required, except null/omitted on assistant messages that carry tool_calls."},"reasoning":{"type":"string","maxLength":32000,"description":"Assistant messages only: the reasoning returned with that turn, sent back on multi-turn and tool-call loops. Counts toward the message character limits."},"reasoning_content":{"type":"string","maxLength":32000,"description":"Assistant messages only: alternative name for reasoning (as returned by GLM and gpt-oss)."}}},"maxItems":32,"description":"OpenAI-style chat messages."},"max_tokens":{"type":"integer","maximum":8192,"minimum":2048},"temperature":{"type":"number","maximum":2,"minimum":0},"reasoning_effort":{"enum":["low","medium","high"],"type":"string","default":"low","description":"Thinking depth: low (default), medium or high. Every level fits the default max_tokens; high with a max_tokens near the minimum can use the whole budget (then 503, not charged)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004928","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.004928/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004928","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004928","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tD6i_3RwpxV4xwGP3t_lf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004928","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides OpenAI-compatible chat completions using the open-weight gpt-oss-120b reasoning model via Telnyx Inference, with configurable reasoning effort and per-call x402 micropayment pricing.","exampleAgentPrompt":"Using the gpt-oss-120b reasoning model, answer the following complex multi-step logic problem with medium reasoning effort and up to 4096 tokens: 'If a train leaves Chicago at 60 mph and another leaves New York at 80 mph, and the cities are 790 miles apart, when and where do they meet?'","exampleUseCases":[{"title":"Multi-step math problem solving","prompt":"I need you to solve a complex algebra problem using the gpt-oss-120b model with high reasoning effort — give me up to 6000 tokens: factor and find all roots of 3x^4 - 5x^3 + 2x^2 - 7x + 1, showing every step."},{"title":"Agentic tool-call loop with reasoning","prompt":"Use the gpt-oss-120b reasoning model at medium reasoning effort to analyze this customer support ticket and decide which of these three tools to call: escalate, refund, or close. Here's the ticket: 'My order arrived damaged and I want a full refund immediately.'"},{"title":"Code debugging with chain-of-thought","prompt":"Run gpt-oss-120b with high reasoning effort and 8192 max tokens to debug this Python function — it should return the longest palindrome substring but it's giving wrong results for edge cases: [paste code here]."}],"resultDescription":"Returns an OpenAI-compatible chat completion response containing the assistant's reply text, optional reasoning/thinking tokens (counted against max_tokens), and any tool calls the model decides to make. If reasoning tokens consume the entire max_tokens budget, a 503 is returned and no charge is applied. Pricing is quoted upfront per call based on input length plus max_tokens.","failureModes":["503 returned when reasoning effort exhausts the entire max_tokens budget (not charged)","Input message array exceeding 32 items or 32,000 chars per message rejected","max_tokens outside 2048–8192 range causes validation error","Invalid reasoning_effort value other than low/medium/high","Payment failure via x402 protocol if insufficient USDC balance","Model identifier mismatch — must be openai/gpt-oss-120b"],"whenToPreferThis":"Choose this endpoint when you need a large 120B open-weight reasoning model with controllable thinking depth (low/medium/high), OpenAI-compatible message format, tool-call support, and transparent per-call micropayment pricing via x402 — especially for complex multi-step reasoning, agentic loops, or when you want to avoid subscription commitments and only pay for what you use.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T18:46:21.626Z","isFirstParty":false,"canonicalSlug":"gpt-oss-120b-chat-completions-telnyx-inference-x402-bad0c8ff"}