# 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.002/call, status unknown (last checked 2026-09-15).

Runs a chat completion request against the GLM-5.2 model via a keyless, pay-per-call API using USDC on Base through the x402 protocol

## Facts

- Endpoint: POST https://farouter.tech/v1/models/glm-5.2/chat/completions
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/farout-glm-5-2-chat-completions-pay-per-call-via-x402-d8dbdf31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vF-5nYKx_c3IUEbCNUe74

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-d8dbdf31 -d '<json body>'
```

Example prompt: Ask GLM-5.2 on FarOut to explain the difference between memoization and tabulation in dynamic programming — pay per call with USDC, no API key needed, cap the response at 300 tokens.

## When to prefer this

Choose this endpoint when you need keyless, accountless LLM inference paid per-call in USDC via x402, especially for autonomous agents or workflows that cannot pre-register API keys or maintain prepaid balances. Prefer it over traditional LLM APIs (OpenAI, Anthropic direct) when you want crypto-native micropayments, zero onboarding friction, and OpenAI-compatible message formatting. Prefer GLM-5.2 specifically for Chinese-language tasks or when routing away from GPT/Gemini family models for cost or diversity reasons.

## Known failure modes

- Payment rejected or insufficient USDC balance — x402 payment handshake fails before inference runs
- Invalid model ID — returns an error if the specified model is not available on the gateway
- Message array is empty (minItems:1 violated) — request rejected with a validation error
- max_tokens or temperature out of allowed range — schema validation error
- Streaming connection drops mid-response — partial SSE stream with no final message
- Model temporarily unavailable on the upstream provider — gateway returns a 503 or similar error

## How this service works

Fixed-price chat completions for glm-5.2 on FarOut: flat $0.002 per call (includes up to 4,000 input + 1,000 output tokens). Rate: $0.011/1M input tokens, $0.035/1M output tokens. Pay with USDC on Base using x402. No API key, no account, no prepaid balance.

## Output

Returns an OpenAI-compatible JSON response containing an array of choices, each with an assistant message (role + content), a finish_reason (e.g. 'stop'), and a usage object with prompt_tokens and completion_tokens counts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Model id from GET /v1/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",
       "developer",
       "user",
       "assistant",
       "tool"
      ],
      "type": "string"
     },
     "content": {}
    },
    "additionalProperties": true
   },
   "minItems": 1,
   "description": "Chat messages, [OI]-compatible {role, content}."
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1,
   "description": "Output token budget. Sets your spending cap; actual usage is what gets settled (true-up)."
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0,
   "description": "Sampling temperature."
  },
  "max_completion_tokens": {
   "type": "integer",
   "minimum": 1,
   "description": "Alias of max_tokens (gpt-5.x models)."
  }
 }
}
```

## 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-d8dbdf31/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)
