{"uid":"cap_EpjWpbaXVw8xSLFZWSt33","slug":"agent402-ai-responses-api-pay-per-call-llm-gateway-e8f35f96","name":"Agent402 AI Responses API (pay-per-call LLM gateway)","description":"OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https://agent402.tools/v1 and pay $0.02 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 Responses wire.","url":"https://agent402.tools/v1/responses","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"zdr":{"type":"boolean","description":"Optional - zero-data-retention providers only"},"text":{"type":"object","description":"Optional {format: {type: \"text\"|\"json_schema\"|\"json_object\", ...}}"},"input":{"description":"A string, or an array of input items ({role, content} messages with input_text / input_image parts, function_call, function_call_output)"},"model":{"type":"string","description":"Model id (OpenRouter naming) - allowlisted per tier; omit (or \"auto\") on the auto tier"},"tools":{"type":"array","description":"Optional function tools ({type:\"function\", name, parameters}); server-side tools are not served"},"stream":{"type":"boolean","description":"Responses SSE events (response.created … response.completed)"},"reasoning":{"type":"object","description":"Optional {effort: \"none\"|\"minimal\"|\"low\"|\"medium\"|\"high\"|\"xhigh\"|\"max\"} - reasoning tokens count against max_output_tokens"},"instructions":{"type":"string","description":"Optional system/developer instructions"},"max_output_tokens":{"type":"integer","description":"Optional output cap (clamped to the tier cap)"}}},"responseSchema":{"type":"json","example":{"id":"resp_…","model":"openai/gpt-4o-mini","usage":{"input_tokens":14,"total_tokens":32,"output_tokens":18},"object":"response","output":[{"id":"msg_…","role":"assistant","type":"message","status":"completed","content":[{"text":"x402 is an HTTP-native way for agents to pay per request with USDC.","type":"output_text","annotations":[]}]}],"status":"completed"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_utRh3cElxrwN3_JdaW9ga","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Routes a chat/completion request to an allowlisted LLM model and returns a structured response, billed at $0.02 USDC per call via x402 — no signup or API keys required.","exampleAgentPrompt":"Using Agent402, ask gpt-4o-mini to explain what the x402 payment protocol is — stream the response back and keep it under 200 tokens.","exampleUseCases":[{"title":"Crypto-native agent LLM call","prompt":"My autonomous agent needs to call an LLM to summarize a research document — use Agent402 with the auto model tier, stream the response, and pay from the agent's USDC wallet. Input is the document text, keep output under 500 tokens."},{"title":"Zero-data-retention inference pipeline","prompt":"I need to run a sensitive prompt through an LLM but I only want zero-data-retention providers. Use Agent402 with the zdr flag enabled, model auto, and return the result as plain text."},{"title":"Structured JSON output from LLM","prompt":"Have Agent402 call openai/gpt-4o-mini with my system instructions and return a JSON object matching my schema — I'll supply the JSON schema in the text format field. The input is a list of customer feedback items I want classified."}],"resultDescription":"A JSON response object containing a unique response ID, the model used, token usage breakdown (input, output, total), the assistant's output message(s) with text content, and a completion status. When streaming is enabled, Server-Sent Events are emitted in sequence from response.created through response.completed.","failureModes":["Insufficient USDC balance or failed x402 payment — request rejected before inference","Model ID not on the allowlist for the caller's tier — returns error indicating unavailable model","Input exceeds tier token cap — max_output_tokens clamped or request rejected","Malformed input array (invalid role/content structure) — 400-level schema validation error","Upstream model provider outage — error propagated from OpenRouter","Streaming connection dropped mid-response — partial SSE stream delivered"],"whenToPreferThis":"Choose this endpoint when your agent needs to call an LLM without managing API keys or subscriptions, particularly in crypto-native or agentic finance contexts where paying per call in USDC from a wallet is preferred. It is the right choice for autonomous agents that need inference billed directly at the call level, when zero-data-retention is required, or when you want OpenRouter's model selection breadth (558 tools/models) without separate account setup. Prefer alternatives if you need fine-tuned private models, need to exceed the tier token cap, or require non-USDC payment rails.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:50:26.210Z","isFirstParty":false}