{"uid":"cap_MIkriQU2mLxiqg9Bl2DRR","slug":"model-access-gateway-claude-sonnet-5-chat-completions-4f07cfc5","name":"Model Access Gateway – Claude Sonnet 5 Chat Completions","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://agent402-arb.rosariovitale0096.workers.dev/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_zshEeMLLEKwnxZ6qRIDtg","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":"Provides OpenAI-compatible chat completions via Anthropic Claude Sonnet 5, paid per request in USDC using the x402 protocol — no API key or account required.","exampleAgentPrompt":"Ask Claude Sonnet 5 to summarize the following text for me: 'Quantum computing leverages superposition and entanglement to perform computations exponentially faster than classical computers for certain problem types.' Pay per request using my USDC wallet.","exampleUseCases":[{"title":"On-demand Claude inference for autonomous agents","prompt":"I need you to use Claude Sonnet 5 to draft a professional reply to this customer complaint email — pay for the call using USDC so I don't need to set up an API account: 'Your product broke after one week and I want a refund.'"},{"title":"Crypto-native AI chatbot backend","prompt":"My app needs to call an LLM for each user message without storing API keys — use the pay-per-request Claude Sonnet endpoint and bill in USDC for each completion. Send this message: 'Explain the difference between proof-of-work and proof-of-stake in two sentences.'"},{"title":"Ad-hoc text generation in agent pipeline","prompt":"In my automated research pipeline, generate a concise three-bullet summary of this paragraph using Claude Sonnet 5, paying per call: 'Renewable energy adoption has accelerated globally due to falling costs of solar panels, supportive government policies, and growing corporate sustainability commitments.'"}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's message content, the model name (anthropic/claude-sonnet-5), token usage (prompt, completion, total), finish reason, and a unique completion ID and timestamp.","failureModes":["Insufficient USDC balance or failed x402 payment results in 402 Payment Required","Malformed request body or missing required fields returns 400 Bad Request","Model overload or upstream Anthropic errors may return 503 or 500","Rate limiting on the gateway worker may return 429 Too Many Requests","Invalid or unsupported model path returns 404 Not Found"],"whenToPreferThis":"Choose this endpoint when you need Claude Sonnet 5 completions without setting up an Anthropic account or API key, especially in agent pipelines that support x402 micropayments in USDC. It is ideal for pay-as-you-go inference at $0.0014/call, crypto-native applications, or scenarios where centralized API key management is undesirable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T01:44:39.509Z","isFirstParty":false,"canonicalSlug":"model-access-gateway-claude-sonnet-5-chat-completions-4f07cfc5"}