# Chit402 Responses — x402 Paid AI Inference with Receipt

> Chit402 Responses — x402 Paid AI Inference with Receipt is a paid API for AI agents from api.xfuel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Submits a paid AI inference task via x402 USDC micropayment on Base, returning a verifiable receipt with task ID and payment reference

## Facts

- Endpoint: POST https://api.xfuel.app/v1/responses
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chit402-responses-x402-paid-ai-inference-with-receipt-94e6eb9e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_x2kO5Ei0LAE_uqmOA1yJm

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 chit402-responses-x402-paid-ai-inference-with-receipt-94e6eb9e -d '<json body>'
```

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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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

## Output

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.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chit402-responses-x402-paid-ai-inference-with-receipt-94e6eb9e/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)
