{"uid":"cap_kQSlDFVpTLFSKa-Ti6tVx","slug":"chit402-task-request-paid-ai-inference-via-x402-7dd97701","name":"Chit402 Task Request — Paid AI Inference via x402","description":"Who paid which call — export, policy, evidence. Possession book for agent spend.","url":"https://api.chit402.com/task-request","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_IFJDxImc7_ThIDeUWFnrG","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":"Submit an AI inference task (chat completion) with USDC micro-payment on Base, receiving a receipted task ID and payment proof.","exampleAgentPrompt":"Submit an inference_request to Chit402 using model xfuel/auto, with my wallet 0xAbc123... as sender, paying 50000 USDC base units on Base chain — the message is: 'Summarize the quarterly earnings report in 3 bullet points', with a max of 500 output tokens.","exampleUseCases":[{"title":"Autonomous agent per-call spend tracking","prompt":"My agent just finished a task — submit the inference request to Chit402 with sender wallet 0xDe4f56..., 50000 USDC base units on Base, using xfuel/auto model, asking 'What is the capital of France?', and give me back the task ID and verify URL so I can audit this call later."},{"title":"Cost-accountable multi-agent pipeline","prompt":"I'm running a pipeline where three agents each call an LLM — submit each as an inference_request on Chit402 from sender 0x9aB12c..., 250 USDC base units on Base, using model xfuel/auto with messages: system 'You are a summarizer', user 'Summarize this contract', so I get separate receipts and payment refs per call."},{"title":"Compliance receipt for AI spend audit","prompt":"Submit this AI call to Chit402 so I have a verifiable receipt: sender is 0xFf0011..., gross amount 100000 USDC base units, chain Base, model xfuel/auto, messages: user 'Draft a privacy policy for my SaaS app', max 800 tokens — I need the verify_url and payment_ref to include in my compliance log."}],"resultDescription":"Returns a JSON object confirming the task was accepted, including a unique task_id, the fee deducted, net and gross USDC amounts, the payment rail used, a Base chain transaction reference (payment_ref), and a verify_url pointing to a hosted receipt on xfuel.app for audit or proof-of-payment purposes.","failureModes":["Insufficient USDC balance or payment failure — task rejected with payment error","Invalid or missing sender address — 400 bad request","Unsupported model_id — model not found error","Malformed messages array (missing role or content) — validation error","Unsupported chain_id or payment rail — configuration error","input_hash mismatch if provided — proof binding failure","Rate limiting or overload — 429 or 503 response"],"whenToPreferThis":"Choose this endpoint when your AI agent needs to pay per inference call using USDC on Base via the x402 protocol and requires a verifiable receipt or payment reference for spend auditing, compliance, or cost attribution across multiple agents. It is especially well-suited for autonomous agent fleets where tracking which wallet paid for which LLM call is critical, or when you need a cost-plus pricing model with receipted, on-chain settlement rather than a subscription-based API.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:43:09.575Z","isFirstParty":false}