{"uid":"cap_4F1DgJMmH1nKHB4o-eUFv","slug":"synap-gpt-oss-20b-chat-completions-bfa3f815","name":"Synap gpt-oss-20b Chat Completions","description":"Explore open models with Synap's OpenAI-compatible API. Start with a free API key or try a model in chat. Compare models, pricing and free-tier limits.","url":"https://synap.linkrra.com/api/billing/x402/models/gpt-oss-20b/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["gpt-oss-20b"],"type":"string","description":"Optional: this endpoint always runs gpt-oss-20b."},"stream":{"type":"boolean","default":false,"description":"true = stream OpenAI-format Server-Sent Events."},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant","tool"],"type":"string"},"content":{"description":"Text, or an array of OpenAI content parts."}}},"examples":[[{"role":"user","content":""}]],"minItems":1,"description":"OpenAI-format chat history, oldest first: [{role, content}]."},"max_tokens":{"type":"integer","default":4096,"maximum":4096,"minimum":1,"description":"Completion token cap. The price is quoted for the prompt plus this cap."}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-...","model":"gpt-oss-20b","usage":{"total_tokens":28,"prompt_tokens":16,"completion_tokens":12},"object":"chat.completion","choices":[{"message":{"role":"assistant","content":"def reverse(s):\n    return s[::-1]"}}],"payment":{"network":"eip155:8453","paidUsd":0.001,"transaction":"0x..."}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_djdPH-vaWW31b6R4aqGNK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs chat completions against the gpt-oss-20b open-weight model via an OpenAI-compatible API, billed per call with USDC via x402.","exampleAgentPrompt":"Ask the gpt-oss-20b model on Synap to write me a Python function that reverses a string, and cap the response at 512 tokens.","exampleUseCases":[{"title":"Automated code generation for CI pipeline","prompt":"Use the Synap gpt-oss-20b model to generate a Bash script that backs up a PostgreSQL database to S3 — keep the response under 1000 tokens."},{"title":"Open-model customer FAQ answering","prompt":"Send this customer question to the gpt-oss-20b model on Synap and have it answer as a helpful support assistant: 'How do I reset my password if I lost access to my email?'"},{"title":"Creative writing with a 20B open model","prompt":"Have Synap's gpt-oss-20b write a short, punchy product description for a noise-cancelling headphone aimed at remote workers — 150 tokens max."}],"resultDescription":"Returns an OpenAI-format chat.completion JSON object containing the assistant's reply text, token usage breakdown (prompt, completion, total), model name, a unique completion ID, and a payment field showing the USDC amount paid, the Base network transaction hash, and chain ID.","failureModes":["Payment failure or insufficient USDC balance returns a 402 Payment Required error","Exceeding max_tokens limit of 4096 returns a validation error","Invalid or missing messages array causes a 400 Bad Request","Model field mismatch (not gpt-oss-20b) may be ignored or cause an error","Network timeout during streaming if stream=true and connection drops"],"whenToPreferThis":"Choose this endpoint when you need a cheap, pay-per-call (~$0.001 USDC) OpenAI-compatible chat completion API backed by a 20B open-weight model, without committing to a subscription. It's ideal for agents that need crypto-native (x402/USDC) billing on Base, want to avoid proprietary model lock-in, or are comparing open-model outputs against GPT/Claude. Prefer it over OpenAI's API when cost per call is paramount and the gpt-oss-20b quality tier is sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:33:58.173Z","isFirstParty":false,"canonicalSlug":"synap-gpt-oss-20b-chat-completions-bfa3f815"}