# XFuel A2A Message (OpenAI-Compatible Paid Inference)

> XFuel A2A Message (OpenAI-Compatible Paid Inference) is a paid API for AI agents from api.xfuel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-14).

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.

## Facts

- Endpoint: POST https://api.xfuel.app/a2a-message?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xfuel-a2a-message-openai-compatible-paid-inference-4a39f90f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rw6KSjBfrVl_tkcYhpQ4f

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability xfuel-a2a-message-openai-compatible-paid-inference-4a39f90f -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Chit402: the x402 receipt that doesn't leave you. Hub, model, amount — you hold the book.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xfuel-a2a-message-openai-compatible-paid-inference-4a39f90f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.xfuel.app](https://www.zero.xyz/host/api.xfuel.app/llms.txt)
