{"uid":"cap_qJh2N51wmceGmfUrqn5hh","slug":"model-access-gateway-claude-sonnet-5-chat-completions-x402-usdc-ae23d149","name":"Model Access Gateway – Claude Sonnet 5 Chat Completions (x402/USDC)","description":"LLM inference API: OpenAI-compatible chat completions for 136 AI models (Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Kimi, GLM), paid per call in USDC on Base with x402. No account, no API key, automatic refund if the model fails.","url":"https://modelaccessgateway.com/llm/claude-sonnet-5?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional: fixed by the route (anthropic/claude-sonnet-5)"},"tools":{"type":"array"},"stream":{"type":"boolean","description":"true: server-sent events after payment"},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"role":{"enum":["system","user","assistant","tool","developer"],"type":"string"},"content":{"type":["string","array","null"]}}},"minItems":1},"max_tokens":{"type":"integer","maximum":16384,"minimum":1,"description":"Optional, default 4096"},"temperature":{"type":"number","maximum":2,"minimum":0},"response_format":{"type":"object"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-7f3c2a91","model":"anthropic/claude-sonnet-5","usage":{"total_tokens":10,"prompt_tokens":9,"completion_tokens":1},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"OK"},"finish_reason":"stop"}],"created":1791979200}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0014","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.0014/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0014","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0014","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XtFD_faliZwmX5oJatiNq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0014","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs an OpenAI-compatible chat completion against Anthropic's Claude Sonnet 5, billed per-call in USDC on Base via x402 — no account or API key required.","exampleAgentPrompt":"Ask Claude Sonnet 5 to summarize the following text for me — pay per call in USDC so I don't need to set up an API key: 'Quantum computing leverages superposition and entanglement to perform calculations exponentially faster than classical computers for certain problem classes.'","exampleUseCases":[{"title":"Anonymous one-off Claude reasoning task","prompt":"I need Claude Sonnet 5 to analyze the pros and cons of this business plan paragraph without me creating any account — just charge my wallet per call: 'We plan to launch a B2B SaaS targeting mid-market HR teams with an AI-driven onboarding tool priced at $15/seat/month.'"},{"title":"Autonomous agent sub-task via crypto micropayment","prompt":"My AI agent needs to call Claude Sonnet 5 to classify customer support tickets as billing, technical, or general — pay per inference in USDC automatically, and stream the response back as server-sent events."},{"title":"Tool-augmented Claude call for code generation","prompt":"Send a chat completion to Claude Sonnet 5 with a system prompt saying 'You are an expert Python developer' and ask it to write a function that parses ISO 8601 dates, with up to 2048 output tokens and temperature 0.2, paying per call in USDC."}],"resultDescription":"Returns an OpenAI-format chat.completion JSON object containing the assistant's message content, finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total tokens), model name, a unique completion ID, and a created timestamp. Streaming mode delivers the same content as server-sent events after payment is confirmed.","failureModes":["Model inference failure triggers automatic USDC refund to caller","Malformed messages array (missing required 'role') returns 400 validation error","max_tokens exceeding 16384 returns schema validation error","Insufficient USDC balance on Base causes x402 payment rejection before inference","Network timeout on Base blockchain payment confirmation delays or fails the call","Unsupported content type in messages array may cause 422 error"],"whenToPreferThis":"Choose this endpoint when you need Claude Sonnet 5 specifically, want to avoid creating an Anthropic account or managing API keys, prefer paying per-call in USDC on Base (ideal for autonomous agents with crypto wallets), or need the automatic refund guarantee on model failure. It is the best fit for agentic workflows using the x402 payment protocol and for one-off or low-volume Claude calls where a subscription is wasteful.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T06:35:21.030Z","isFirstParty":false,"canonicalSlug":"model-access-gateway-claude-sonnet-5-chat-completions-x402-usdc-ae23d149"}