# FarOut GLM-5.2 Chat Completions (Pay-Per-Call via x402)

> FarOut GLM-5.2 Chat Completions (Pay-Per-Call 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 single GLM-5.2 chat completion request billed per-call in USDC on Base or Solana via the x402 payment protocol — no API key or account required.

## Facts

- Endpoint: POST https://farouter.tech/v1/metered/models/glm-5.2/chat/completions
- 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-glm-5-2-chat-completions-pay-per-call-via-x402-eedc7d17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rmkn0jXTwNg7dCM81eZ1p

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-glm-5-2-chat-completions-pay-per-call-via-x402-eedc7d17 -d '<json body>'
```

Example prompt: Send this conversation to GLM-5.2 and get a response — system prompt: 'You are a concise assistant', user message: 'Explain quantum entanglement in two sentences', max 200 output tokens, pay per call with no API key needed.

## When to prefer this

Choose this endpoint when you need GLM-5.2 specifically (Zhipu AI's frontier Chinese-English bilingual model) and want pay-per-call billing via x402 with no API key, subscription, or account. It is ideal for autonomous agents that hold crypto wallets and need to make sporadic, cost-controlled LLM calls without pre-purchasing credits. Prefer alternatives if you need a different model family (GPT, Gemini, DeepSeek) — FarOut has sibling endpoints for those — or if your infrastructure does not support the x402 payment protocol.

## Known failure modes

- HTTP 402 returned with a payment quote if the x402 payment header is missing or incorrect — no charge is made
- Insufficient wallet balance causes payment failure and the inference is not executed
- Invalid model ID returns an error (must match IDs from GET /v1/metered/models)
- max_tokens too large may exceed the model's context window
- Malformed messages array (missing required role or content fields) causes a 400 error
- Network timeout during streaming may leave the response incomplete

## 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

An OpenAI-compatible JSON response containing the assistant's reply message, finish reason (e.g. 'stop'), and token usage counts (prompt_tokens and completion_tokens). If using streaming mode, server-sent events are returned instead.

## 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-glm-5-2-chat-completions-pay-per-call-via-x402-eedc7d17/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)
