{"uid":"cap_kkxJN7Swzuj5MOpswQoYE","slug":"tokensale-claude-sonnet-5-chat-completions-x402-b181168e","name":"Tokensale Claude Sonnet 5 Chat Completions (x402)","description":"Один API-ключ для GPT и Claude-совместимых клиентов. Пакетные токены, прозрачное списание и контроль доступа.","url":"https://tokensale.maiapp.ru/x402/v1/models/claude-sonnet-5/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","const":"claude-sonnet-5"},"stream":{"type":"boolean","const":false},"messages":{"type":"array","items":{"type":"object"},"minItems":1},"max_tokens":{"type":"integer","minimum":1},"temperature":{"type":"number","maximum":2,"minimum":0},"max_completion_tokens":{"type":"integer","minimum":1}}},"responseSchema":{"type":"json","example":{"id":"x402-request","model":"claude-sonnet-5","usage":{"total_tokens":2,"prompt_tokens":1,"completion_tokens":1},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello back"},"finish_reason":"stop"}],"modelCatalog":[{"id":"claude-sonnet-5","payment":{"scheme":"upto","network":"eip155:8453","currency":"USDC"},"protocols":["messages"],"contextTokens":200000,"maxInputTokens":195904,"maxOutputTokens":4096,"priceUsdPerMillionTokens":{"input":"0.100000","output":"0.500000","cacheRead":"0.010000","cacheWrite":"0.114975"}}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002051","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.002051/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002051","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002051","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-CDDABTVk30JgTLAlT9v2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002051","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates AI chat completions using Claude Sonnet 5 via a pay-per-call x402 USDC endpoint with OpenAI-compatible request/response format.","exampleAgentPrompt":"Ask Claude Sonnet 5 through the Tokensale x402 endpoint: send the message 'Explain the theory of relativity in simple terms' with a max of 512 tokens and temperature 0.7, paying per call in USDC.","exampleUseCases":[{"title":"On-demand Claude inference for agents","prompt":"I need to call Claude Sonnet 5 to answer a user question without setting up an Anthropic account — send the message 'What are three ways to reduce API latency?' with up to 300 tokens and temperature 0.5, paying via USDC per call."},{"title":"GPT-compatible Claude integration test","prompt":"Test this OpenAI-compatible Claude endpoint by sending a simple message array with the user saying 'Hello, who are you?' to claude-sonnet-5 with max 100 tokens, so I can verify the response format matches what I expect."},{"title":"Cost-transparent LLM pipeline step","prompt":"Run a Claude Sonnet 5 completion for my pipeline — the messages are a system prompt saying 'You are a concise summarizer' and a user message with a 500-word article text, using temperature 0.3 and max 256 tokens, billed transparently per token in USDC."}],"resultDescription":"Returns an OpenAI-compatible chat.completion JSON object containing the assistant's reply message, finish reason, token usage breakdown (prompt, completion, total), the model ID, and a modelCatalog array with pricing details including per-million-token rates for input, output, cache read, and cache write on Base network in USDC.","failureModes":["Insufficient USDC balance or x402 payment failure — returns 402 Payment Required","Invalid or missing messages array — returns 400 Bad Request","Temperature out of range [0,2] — schema validation error","max_tokens or max_completion_tokens below minimum of 1 — rejected","Model field mismatch (not exactly 'claude-sonnet-5') — const violation error","Stream set to true — not supported, returns error","Upstream Anthropic API unavailability — 502 or 503 error","Context window exceeded (max 195904 input tokens)"],"whenToPreferThis":"Choose this endpoint when you need Claude Sonnet 5 inference without an Anthropic subscription, want pay-per-call USDC billing via the x402 protocol, require an OpenAI-compatible API format for drop-in Claude access, or are building an agent that self-funds LLM calls via crypto micropayments on Base network. Prefer over direct Anthropic API when you need transparent on-chain billing or lack API key management infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T12:36:35.666Z","isFirstParty":false,"canonicalSlug":"tokensale-claude-sonnet-5-chat-completions-x402-b181168e"}