{"uid":"cap_cwAnzxuwTtwLfuv2QeJY2","slug":"synap-qwen3-coder-30b-chat-completions-55dd9f24","name":"Synap Qwen3-Coder-30B 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/qwen3-coder-30b/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["qwen3-coder-30b"],"type":"string","description":"Optional: this endpoint always runs qwen3-coder-30b."},"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":"qwen3-coder-30b","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_5KZS5PZgYIzvtJZfAJJW3","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 the Qwen3-Coder-30B open model for chat completions via an OpenAI-compatible API, billed per call via x402/USDC","exampleAgentPrompt":"Using the Qwen3-Coder-30B model, write me a Python function that parses a JSON file and extracts all keys with null values — keep the response under 4096 tokens.","exampleUseCases":[{"title":"Automated code review assistant","prompt":"Use the Qwen3-Coder model to review this JavaScript snippet and suggest improvements for readability and performance: `function add(a,b){return a+b}` — give me a detailed explanation."},{"title":"Generate boilerplate from spec","prompt":"I need a FastAPI boilerplate with a /health endpoint and a /users CRUD router — can you have the Qwen3-Coder-30B model generate that for me, up to 4096 tokens?"},{"title":"Debugging help for a coding agent","prompt":"Ask Qwen3-Coder to explain why this SQL query returns duplicate rows and suggest a fix: `SELECT * FROM orders JOIN customers ON orders.id = customers.order_id`."}],"resultDescription":"An OpenAI-format chat completion JSON object containing the assistant's generated message (typically code or explanation), token usage breakdown (prompt, completion, total), model identifier, and a payment field confirming the USDC transaction hash and amount paid on Base (EIP-155:8453).","failureModes":["Exceeds max_tokens limit of 4096 — reduce requested length","Invalid message role — must be system, user, assistant, or tool","Payment failure — insufficient USDC balance or x402 payment not accepted","Empty messages array — at least one message is required","Model enum mismatch — only qwen3-coder-30b is accepted at this endpoint","Rate limiting or quota exceeded on the free tier"],"whenToPreferThis":"Choose this endpoint when you need a coding-specialized open model (Qwen3-Coder-30B) with OpenAI-compatible chat completions, want pay-per-call billing in USDC via x402 with no subscription, and want to avoid proprietary model lock-in. Ideal for agents that need to dynamically call a capable 30B-parameter code model without maintaining API keys or monthly commitments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:34:45.357Z","isFirstParty":false,"canonicalSlug":"synap-qwen3-coder-30b-chat-completions-55dd9f24"}