{"uid":"cap_Rw6KSjBfrVl_tkcYhpQ4f","slug":"xfuel-a2a-message-openai-compatible-paid-inference-4a39f90f","name":"XFuel A2A Message (OpenAI-Compatible Paid Inference)","description":"Chit402: the x402 receipt that doesn't leave you. Hub, model, amount — you hold the book.","url":"https://api.xfuel.app/a2a-message?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Model id from GET /v1/models; xfuel/auto routes automatically"},"stream":{"type":"boolean"},"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"},"max_tokens":{"type":"integer","description":"Output token budget"},"temperature":{"type":"number","maximum":2,"minimum":0}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-abc123","model":"xfuel/auto","usage":{"total_tokens":15,"prompt_tokens":10,"completion_tokens":5},"xfuel":{"verify_url":"https://api.xfuel.app/receipt/xfuel-abc123"},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}],"created":1700000000}},"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_LKnzMHH4IJ2hO6MgPg4n-","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":"Accepts an OpenAI-style chat completion request over an agent-to-agent message endpoint, processing it via x402 USDC micropayment on Base or Solana mainnet and returning an AI-generated text response with a signed payment receipt.","exampleAgentPrompt":"Using XFuel's auto-routing model, send this message to the AI: 'Summarize the key risks of investing in small-cap stocks in 3 bullet points' — keep the response under 200 tokens.","exampleUseCases":[{"title":"Autonomous agent AI reasoning loop","prompt":"I need my agent to ask the AI model 'What is the best next action given this task list: [buy groceries, schedule dentist, reply to emails]?' — use the xfuel/auto model, limit to 150 tokens, and pay the USDC fee automatically."},{"title":"On-chain verifiable AI content generation","prompt":"Generate a product description for my new ergonomic chair using the xfuel/auto model — I need a signed receipt proving the AI call was paid for on Base so I can log it for compliance."},{"title":"Crypto-native chatbot backend","prompt":"Send this user message to the AI with a system prompt saying 'You are a helpful crypto trading assistant' and user message 'What does a bullish engulfing candle pattern indicate?' — use temperature 0.7 and max 300 tokens, paying per call in USDC."}],"resultDescription":"Returns an OpenAI-compatible chat completion response containing the assistant's generated text, along with a signed payment receipt and a public verify_url that can be used to confirm the USDC micropayment was made on-chain (Base or Solana mainnet).","failureModes":["Insufficient USDC balance or failed x402 payment — returns payment required or payment failure error","Invalid or unsupported model ID — returns model not found error","Malformed messages array missing required role or content fields — returns 400 validation error","Token budget exceeded or max_tokens too large for selected model — returns context length error","Network congestion on Base or Solana causing payment confirmation delay — may result in timeout"],"whenToPreferThis":"Choose this endpoint when your agent needs OpenAI-compatible LLM inference with automatic on-chain USDC micropayment at $0.01 per call, especially in crypto-native or agent-to-agent workflows where verifiable payment receipts matter. Prefer it over standard OpenAI API when you need blockchain-verified payment provenance, are operating in a Web3 context, or want to pay per call in stablecoins without a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T18:35:36.355Z","isFirstParty":false,"canonicalSlug":"xfuel-a2a-message-openai-compatible-paid-inference-4a39f90f"}