# FarOut Pay-Per-Call LLM Inference via x402

> FarOut Pay-Per-Call LLM Inference via x402 is a paid API for AI agents from farouter.tech, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Runs a chat completion request against frontier LLMs (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) billed per-call in USDC via x402 micropayment — no API key or account required.

## Facts

- Endpoint: POST https://farouter.tech/v1/metered/messages
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/farout-pay-per-call-llm-inference-via-x402-23f97d23
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AaHzmyybBQymJoDpLz8a9

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 farout-pay-per-call-llm-inference-via-x402-23f97d23 -d '<json body>'
```

Example prompt: Using FarOut's pay-per-call router, send the message 'Summarize the history of the Roman Empire in 3 sentences' to the glm-5.3 model with a max_tokens budget of 200, and pay per call in USDC — no API key needed.

## When to prefer this

Prefer this endpoint when you need on-demand LLM inference without pre-registering an API key or account, when you want to pay strictly per successful call in USDC stablecoins via x402, or when your agent needs to switch between frontier models (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) without holding separate provider credentials. It is especially suited for crypto-native or agentic workflows where failed calls must never incur charges.

## Known failure modes

- 402 Payment Required if the x402 payment header is missing or insufficient — the server quotes the exact price and the call is not charged
- Invalid model ID returns an error — must use an ID from GET /v1/metered/models
- max_tokens too large may be rejected or result in truncation depending on model limits
- Streaming (SSE) connection drops may result in partial completions
- Network timeout on slow models; caller must implement retry logic

## How this service works

Pay-per-call LLM inference over x402. Frontier models (GLM, GPT, Gemini, Kimi, DeepSeek, MiniMax) billed per request in USDC on Base or Solana mainnet. No API key, no account. The 402 quotes your exact request; failed calls are never charged.

## Output

Returns an OpenAI-compatible JSON object with a choices array containing the assistant's reply message and finish_reason, plus a usage object reporting prompt_tokens and completion_tokens consumed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model id from GET /v1/metered/models, e.g. glm-5.3. No provider prefix."
  },
  "stream": {
   "type": "boolean",
   "description": "SSE streaming."
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   },
   "description": "Chat messages, [OI]-compatible {role, content}."
  },
  "max_tokens": {
   "type": "integer",
   "description": "Output token budget. Drives the quote directly."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "usage": {
   "prompt_tokens": 6,
   "completion_tokens": 8
  },
  "choices": [
   {
    "message": {
     "role": "assistant",
     "content": "Hello! How can I help?"
    },
    "finish_reason": "stop"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/farout-pay-per-call-llm-inference-via-x402-23f97d23/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from farouter.tech](https://www.zero.xyz/host/farouter.tech/llms.txt)
