{"uid":"cap_C7AZ01HPzrpMSmhRIxwFz","slug":"qwen-3-8-max-chat-completions-via-x402-cb05c7f9","name":"Qwen 3.8 Max Chat Completions via x402","description":"Pay-per-call Qwen 3.8 Max LLM inference via x402 — an OpenAI-compatible chat completion API for AI agents. Flagship large language model for chat, conversation, reasoning, chain-of-thought, tool-calling / function-calling, code generation, summarization, extraction and classification, with 200k long context. No API key, signup or subscription — agents pay $0.005 USDC per request on Base.","url":"https://cursor.tail45da3a.ts.net/x402/v2/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional; the model is served as z-ai/glm-5.3."},"tools":{"type":"array","description":"OpenAI-compatible tool definitions for function-calling."},"stream":{"type":"boolean","description":"If true, respond with Server-Sent Events."},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}},"description":"OpenAI-compatible chat messages."},"max_tokens":{"type":"integer"},"temperature":{"type":"number"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-abc123","model":"qwen/qwen3.8-max-free","usage":{"total_tokens":21,"prompt_tokens":12,"completion_tokens":9},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello! How can I help you today?"},"finish_reason":"stop"}],"created":1767225600}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__xFonkKsJY4FEpyqDjB92","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Pay-per-call OpenAI-compatible chat completion API powered by Qwen 3.8 Max, supporting chat, reasoning, tool-calling, code generation, and summarization with 200k context — no API key required, billed at $0.005 USDC per request via x402.","exampleAgentPrompt":"Use the Qwen 3.8 Max chat completion endpoint (paying $0.005 USDC per call) to answer the following: given a list of customer support tickets, classify each one as 'billing', 'technical', or 'general' — here are the messages: ['My invoice is wrong', 'App keeps crashing', 'How do I reset my password?']","exampleUseCases":[{"title":"Chain-of-thought math reasoning","prompt":"I need you to reason step-by-step through this problem and show your work: if a train leaves Chicago at 60 mph and another leaves New York at 80 mph, and they are 800 miles apart, when do they meet? Use the Qwen reasoning model that charges per call."},{"title":"Autonomous agent tool-calling loop","prompt":"Set up an agent loop that calls the Qwen 3.8 Max chat completions API with these tool definitions — 'search_web' and 'read_url' — and have the model decide which tools to call to answer: 'What were the top 3 AI research papers published in April 2025?'"},{"title":"Long-document summarization","prompt":"Summarize this 50,000-word legal contract into a 3-paragraph executive summary highlighting key obligations, payment terms, and termination clauses — use the long-context LLM that pays per call so I don't need a subscription."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's message content, the finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total), the model name, a completion ID, and a created timestamp. When streaming is enabled, returns Server-Sent Events with incremental completion chunks.","failureModes":["Payment failure: x402 payment not provided or insufficient USDC balance — request is rejected before inference","Model unavailable: upstream model (z-ai/glm-5.3-flash) is down or overloaded — 5xx error returned","Invalid messages array: missing required 'role' or 'content' fields — 400 validation error","Context length exceeded: input exceeds 200k token limit — error or truncation","Streaming errors: SSE connection dropped mid-stream — partial response received","Timeout: long reasoning chains may exceed connection timeouts on slow networks"],"whenToPreferThis":"Choose this endpoint when you need OpenAI-compatible LLM inference without managing API keys, subscriptions, or rate-limit quotas — ideal for AI agents that can pay micropayments via x402/USDC on Base. Prefer it for sporadic or bursty inference workloads where pay-per-call is cheaper than a subscription, or when building autonomous agents that need tool-calling and long-context (200k) support. Not ideal if you need a guaranteed specific model version or if your runtime cannot handle x402 payment flows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:35:37.880Z","isFirstParty":false}