{"uid":"cap_CzkV2mMNdReYnlR9mh4KG","slug":"claude-sonnet-api-pay-per-call-32c59215","name":"Claude Sonnet API (Pay-Per-Call)","description":"Claude Sonnet API - pay per call, no API key. OpenAI-format chat completions on anthropic/claude-sonnet-5.5, pinned to Anthropic's own OpenRouter endpoint for reliability. You sign a fixed price computed from your max_tokens; unused tokens are not refunded. 20s server-side timeout - never charged if it fires; set your client timeout to 30s. Try GET /llm/claude-sonnet/sample.","url":"https://x402.agentindex.world/llm/claude-sonnet?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object"},"minItems":1,"description":"OpenAI-format chat messages: [{role, content}, ...]."},"max_tokens":{"type":"integer","description":"Max completion tokens, capped at 4096 - also bounds the price ceiling."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.011264","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.011264/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.011264","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.011264","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yYCiFo24CYHJ0uR1nYdnQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.011264","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides pay-per-call access to Anthropic's claude-sonnet-4-5 model via OpenAI-compatible chat completions, billed per request via x402 micropayments with no API key required.","exampleAgentPrompt":"Ask Claude Sonnet to explain the tradeoffs between REST and GraphQL APIs in plain English — keep the response under 300 tokens.","exampleUseCases":[{"title":"On-demand code explanation for agents","prompt":"I need Claude Sonnet to explain what this Python function does and suggest any improvements — limit the response to 500 tokens so I don't overpay."},{"title":"Customer support draft generation","prompt":"Use Claude Sonnet to write a polite, empathetic reply to this customer complaint about a delayed shipment — max 200 tokens."},{"title":"Ad-hoc reasoning in an agent pipeline","prompt":"Send this multi-turn conversation to Claude Sonnet and ask it to summarize the key decisions made so far — cap the output at 400 tokens."}],"resultDescription":"Returns an OpenAI-format chat completion object containing the assistant's generated message, finish reason, and token usage counts. The response mirrors the standard OpenAI /v1/chat/completions response shape so it can be parsed by any OpenAI-compatible client.","failureModes":["20-second server-side timeout fires if the model takes too long — request is not charged but no output is returned; client should set a 30s timeout","max_tokens exceeds 4096 cap — request may be rejected or capped silently","Malformed messages array (missing role or content fields) causes a 400-level error","x402 payment failure or insufficient balance prevents the request from being processed","Model unavailability on OpenRouter may cause 5xx errors"],"whenToPreferThis":"Choose this endpoint when you need to call Claude Sonnet on a per-request basis without managing an Anthropic or OpenRouter API key, especially in agent pipelines that use x402 micropayment flows. It's ideal for low-to-medium frequency invocations where a fixed per-call price is preferable to subscription billing, and when OpenAI-format compatibility is required for drop-in use with existing tooling.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:19:24.545Z","isFirstParty":false,"canonicalSlug":"claude-sonnet-api-pay-per-call-32c59215"}