{"uid":"cap_tqXqr-SQRiICtAxfLRekW","slug":"agent402-auto-messages-pay-per-call-llm-inference-via-x402-6e4849b2","name":"Agent402 Auto Messages - Pay-Per-Call LLM Inference via x402","description":"Anthropic Messages API over x402 - point the Anthropic SDK (or Claude Code / the Agent SDK) at base_url https://agent402.tools/v1/auto and pay $0.01 per call in USDC, no API key, no signup. Same models, caps and price as this tier's /chat/completions route; any model here is served through the Messages wire (Claude natively, others translated). Up to 16,000 input chars and 1024 output tokens; streaming supported.","url":"https://agent402.tools/v1/auto/messages","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"zdr":{"type":"boolean","description":"Optional - zero-data-retention providers only"},"model":{"type":"string","description":"Model id (OpenRouter naming, e.g. anthropic/claude-sonnet-5) - allowlisted per tier; omit (or \"auto\") on the auto tier"},"tools":{"type":"array","description":"Optional client tools {name, description, input_schema}; server/built-in tools are not served"},"stream":{"type":"boolean","description":"Anthropic SSE (message_start … message_stop)"},"system":{"type":"string","description":"Optional system prompt (string or text blocks)"},"messages":{"type":"array","description":"Anthropic messages: {role: user|assistant, content: string | [text|image|tool_use|tool_result blocks]}"},"thinking":{"type":"object","description":"Optional {type:\"enabled\", budget_tokens} | {type:\"adaptive\"} | {type:\"disabled\"} - thinking tokens are output tokens"},"max_tokens":{"type":"integer","description":"Required by the Messages API; clamped to the tier's output cap"}}},"responseSchema":{"type":"json","example":{"id":"msg_…","role":"assistant","type":"message","model":"anthropic/claude-sonnet-5","usage":{"input_tokens":14,"output_tokens":18},"content":[{"text":"x402 is an HTTP-native way for agents to pay per request with USDC.","type":"text"}],"stop_reason":"end_turn"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_K41hzI8-YSif4VCz2kiK3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs an Anthropic-compatible chat completion (Messages API) against 500+ pay-per-call AI tools, billed at $0.01 USDC per call via the x402 payment protocol — no signup or API key required.","exampleAgentPrompt":"Send this message to Claude Sonnet 5 through Agent402 — 'Explain what the x402 payment protocol is in two sentences' — with a max of 200 output tokens, paying per call with my USDC wallet.","exampleUseCases":[{"title":"Anonymous LLM call via crypto wallet","prompt":"I don't want to create any accounts — just send the message 'Summarize the pros and cons of proof-of-stake consensus' to Claude Sonnet 5 through Agent402, cap the response at 300 tokens, and pay the $0.01 USDC fee from my wallet."},{"title":"AI agent calling built-in tools","prompt":"Use Agent402's auto tier to ask an AI 'What is the current US CPI inflation rate and what does it mean for bond prices?' — let it use whatever built-in financial tools it needs, and stream the response back to me."},{"title":"Extended thinking on a hard reasoning problem","prompt":"Run this through Agent402 with Claude's extended thinking enabled and a 5000-token thinking budget: 'Given a 60/40 portfolio of $500k, how should I rebalance after a 20% equity drawdown?' — max output 1000 tokens."}],"resultDescription":"Returns an Anthropic Messages API-compatible JSON object containing the assistant role, one or more content blocks (text or tool_use), the model used, stop reason (end_turn, tool_use, max_tokens, etc.), and a usage object with input and output token counts. When streaming is enabled, returns Anthropic SSE events (message_start through message_stop).","failureModes":["402 Payment Required if the x402 payment header is missing or the USDC balance is insufficient","400 Bad Request if messages array is missing or malformed","400 if max_tokens is missing (required by Anthropic Messages API)","Model not allowlisted for tier if a disallowed model ID is specified","Context length exceeded if messages exceed the model's context window","Rate limiting or capacity errors from the upstream model provider","Stream connection drop for long SSE responses"],"whenToPreferThis":"Choose this endpoint when you need Anthropic-compatible LLM inference without creating an account or managing API keys — authentication is handled entirely by a crypto wallet paying $0.01 USDC per call via x402. It is especially suited for AI agents that need to pay programmatically, require zero-data-retention providers, or want to access 500+ built-in pay-per-call tools bundled with the inference layer. Prefer alternatives (direct Anthropic or OpenAI APIs) when you already have API keys, need guaranteed SLAs, or require models outside the Agent402 allowlist.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:12:59.883Z","isFirstParty":false}