{"uid":"cap_ExAYonuihY7QeeG_TE2Mc","slug":"xfuel-paid-inference-via-x402-e240cf7e","name":"XFuel Paid Inference via x402","description":"OpenAI-compatible paid inference via x402 USDC on Base and Solana ($0.01). POST /v1/chat/completions is the recommended surface. Returns signed receipt + public verify_url. Paying this host is real mainnet USDC.","url":"https://api.xfuel.app/task-request?utm_source=zero.xyz","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_URASxamb1zqutW6qT1nlZ","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":"Runs a paid AI inference task on Base mainnet USDC via the x402 payment protocol, returning a signed receipt and verification URL","exampleAgentPrompt":"Send a paid inference request to XFuel using xfuel/auto model with my wallet 0xAbC...123 on Base mainnet, paying $0.01 USDC, with these messages: system says 'you are a helpful assistant' and user asks 'What is the capital of France?' — limit the response to 200 tokens.","exampleUseCases":[{"title":"On-chain AI assistant with payment proof","prompt":"Using my wallet 0xDe4...789, send a $0.01 USDC inference request on Base to XFuel with the xfuel/auto model — user message is 'Summarize the key benefits of proof-of-stake blockchains in 3 bullet points' — max 300 tokens, and give me back the signed receipt so I can verify the payment."},{"title":"Agent pipeline with verifiable LLM call","prompt":"I need my autonomous agent to call XFuel with USDC on Base from address 0xF12...456, route to the xfuel/auto model, send the system prompt 'You are a code reviewer' and user message 'Review this Python function for bugs: def add(a,b): return a-b', budget 500 tokens, and store the verify_url from the receipt for auditing."},{"title":"Paid content generation for crypto app","prompt":"Have XFuel generate marketing copy for me — use wallet 0xA99...321, pay 0.01 USDC on Base, use the xfuel/auto model, system message is 'You are a crypto copywriter', user message is 'Write a two-sentence tagline for a DeFi yield aggregator called YieldWave', and keep it under 150 tokens."}],"resultDescription":"Returns a signed receipt confirming the USDC payment on Base mainnet, a verify_url for on-chain payment verification, and the AI-generated inference output from the selected model.","failureModes":["Insufficient USDC balance or allowance causes payment rejection","Invalid or non-checksummed sender address returns 400 error","Unsupported model_id returns model-not-found error","Amount below minimum (10000 base units / $0.01) is rejected","Wrong chain_id value causes settlement failure","Malformed messages array (missing role or content) causes validation error","Network congestion on Base may delay payment settlement","Rate limiting if too many requests are sent in quick succession"],"whenToPreferThis":"Choose this endpoint when you need verifiable, pay-per-call AI inference with on-chain USDC payment receipts on Base mainnet via the x402 protocol — especially in autonomous agent pipelines where auditability, micropayment receipts, and crypto-native payment rails matter. Prefer this over free or subscription-based LLM APIs when you need signed proof of payment, when operating in a trustless or multi-agent environment, or when the calling agent holds USDC and needs to avoid API key management.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T00:34:45.419Z","isFirstParty":false,"canonicalSlug":"xfuel-paid-inference-via-x402-e240cf7e"}