{"slug":"agent402-tools-v1-metered-messages-7ef9c9","title":"The Anthropic Messages wire priced from the request itself","host":"agent402.tools","method":"POST","resource":"https://agent402.tools/v1/metered/messages","category":"code","description":"The Anthropic Messages wire priced from the request itself: the 402 quotes this exact body, from $0.001, with upto buyers settling actual usage under the quote. Use it when an agent built on the Anthropic SDK, or Claude Code, needs any supported model paid per call with no account.","price_listed":0.001885,"price_asked":0.001885,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":951,"reported_calls_30d":58,"reported_payers_30d":1,"networks":["algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=","eip155:10","eip155:1329","eip155:137","eip155:143","eip155:42161","eip155:42220","eip155:43114","eip155:4663","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","stellar:pubnet"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"max_tokens":256,"messages":[{"content":"Summarize x402 in one sentence.","role":"user"}],"model":"anthropic/claude-haiku-4.5"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"effort":{"description":"Optional depth control for Claude 4.7+ (Opus 5, Sonnet 5, Fable 5.1): low | medium | high | xhigh | max, validated against the model's own list (GET /v1/models). Not accepted on Haiku 4.5 and older, which take thinking.budget_tokens instead","type":"string"},"max_tokens":{"description":"Required by the Messages API; clamped to the tier's output cap","type":"integer"},"messages":{"description":"Anthropic messages: {role: user|assistant, content: string | [text|image|tool_use|tool_result blocks]}","type":"array"},"model":{"description":"Model id (OpenRouter naming, e.g. anthropic/claude-sonnet-5) - allowlisted per tier; omit (or \"auto\") on the auto tier","type":"string"},"stream":{"description":"Anthropic SSE (message_start … message_stop)","type":"boolean"},"system":{"description":"Optional system prompt (string or text blocks)","type":"string"},"thinking":{"description":"Optional {type:\"enabled\", budget_tokens} | {type:\"adaptive\"} | {type:\"disabled\"} - thinking tokens are output tokens. On Claude 4.7+ (Opus 5, Sonnet 5, Fable 5.1) thinking is adaptive and `effort` is the depth control; a budget_tokens value is advisory there","type":"object"},"tools":{"description":"Optional client tools {name, description, input_schema}; server/built-in tools are not served","type":"array"},"zdr":{"description":"Optional - zero-data-retention providers only","type":"boolean"}},"required":["max_tokens","messages"]},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"content":{"items":{"properties":{"text":{"type":"string"},"type":{"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"string"},"model":{"type":"string"},"role":{"type":"string"},"stop_reason":{"type":"string"},"type":{"type":"string"},"usage":{"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"type":"object"}},"required":["id","type","role","model","content","stop_reason","usage"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.001885,"price_match":true,"latency_ms":951,"error":null}],"description_full":"The Anthropic Messages wire priced from the request itself: the 402 quotes this exact body, from $0.001, with upto buyers settling actual usage under the quote. Use it when an agent built on the Anthropic SDK, or Claude Code, needs any supported model paid per call with no account.","last_updated":"2026-09-24T16:02:06.543Z","schemes":["exact","upto"]}