{"uid":"cap_x2kO5Ei0LAE_uqmOA1yJm","slug":"chit402-responses-x402-paid-ai-inference-with-receipt-94e6eb9e","name":"Chit402 Responses — x402 Paid AI Inference with Receipt","description":"Chit402: the x402 receipt that doesn't leave you. Hub, model, amount — you hold the book.","url":"https://api.xfuel.app/v1/responses","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"amount":{"type":"string","description":"Gross task value in USDC base units (6 decimals)"},"sender":{"type":"string","description":"0x address that owns/pays for the task"},"payment":{"type":"object","properties":{"rail":{"enum":["usdc"],"type":"string","description":"Payment rail; use \"usdc\""}}},"chain_id":{"type":"string","description":"Settlement chain; \"base\" for USDC settlement"},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant"],"type":"string"},"content":{"type":"string"}}},"description":"OpenAI-style chat messages array"},"model_id":{"type":"string","description":"Model id from GET /v1/models; xfuel/auto routes automatically"},"input_hash":{"type":"string","description":"keccak256 of your input (optional; for proof binding)"},"max_tokens":{"type":"integer","description":"Output token budget (default 500)"},"message_type":{"enum":["inference_request"],"type":"string","description":"Task type; only inference_request is supported via x402"}}},"responseSchema":{"type":"json","example":{"status":"accepted","task_id":"ai-task-12345","fee_amount":"250","net_amount":"49750","verify_url":"https://api.xfuel.app/receipt/ai-task-12345","payment_ref":"base:0x...","gross_amount":"50000","payment_rail":"usdc"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IA42OTn6fy2TVxMHMc-6e","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Submits a paid AI inference task via x402 USDC micropayment on Base, returning a verifiable receipt with task ID and payment reference","exampleAgentPrompt":"Use my wallet 0xAbC123... to send a paid inference request to xFuel's auto-routing model — budget 50000 USDC base units on Base chain — with the message 'Summarize the benefits of zero-knowledge proofs in three sentences', up to 300 tokens, and give me back the task receipt URL so I can verify the payment.","exampleUseCases":[{"title":"Agent pipeline with auditable AI spend","prompt":"My agent at 0xDe4f... needs to run inference on xFuel using the xfuel/auto model — charge 50000 USDC base units on Base, send the message 'Draft a one-paragraph product description for a noise-cancelling headphone', cap output at 400 tokens, and return the receipt URL so our accounting system can log the payment reference."},{"title":"Crypto-native app paying per LLM call","prompt":"Submit a paid AI task for sender 0x9Fa2... on Base chain — 25000 USDC base units, model xfuel/auto, message type inference_request — asking 'What are three key risks in DeFi lending protocols?' with a 200-token budget, and give me the task ID and verify URL when it's accepted."},{"title":"Proof-bound inference for dispute resolution","prompt":"Run a paid inference request from wallet 0xB77c... using the xfuel/auto model, gross amount 75000 USDC base units on Base, include the keccak256 input hash 0xabc...def for proof binding, ask 'Explain the legal concept of force majeure in two sentences', 150 max tokens — I need the verify URL and payment reference to settle a dispute."}],"resultDescription":"Returns a JSON object with status 'accepted', a unique task_id, fee_amount and net_amount in USDC base units, the gross_amount submitted, a verify_url for receipt auditing, a payment_ref (on-chain Base transaction reference), and the payment_rail used.","failureModes":["Insufficient or missing x402 payment header causes 402 Payment Required","Invalid or unrecognized model_id returns an error; use GET /v1/models to list valid IDs","Malformed sender address or chain_id mismatch results in rejection","Input hash mismatch between provided input_hash and actual payload triggers validation failure","USDC balance insufficient for declared amount causes payment failure","Unsupported message_type (anything other than inference_request) returns 400","Network or settlement delay on Base chain may delay task acceptance confirmation"],"whenToPreferThis":"Choose this endpoint when you need a verifiable, auditable receipt for each AI inference call — especially in agent pipelines where on-chain proof of payment and post-hoc auditability matter. It is preferable over generic LLM APIs when you require USDC micropayment settlement on Base via x402, cost-plus transparent pricing, and a task receipt URL you retain independently of the agent wallet state.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:44.172Z","isFirstParty":false}