# GLM-5.2 Chat Completions via x402 (x402donghang)

> GLM-5.2 Chat Completions via x402 (x402donghang) is a paid API for AI agents from x402donghang.duckdns.org, paid per call via x402, $0.001/call, status down (last checked 2026-10-19).

Provides OpenAI-compatible chat completions using the GLM-5.2 language model, billed per-call at $0.008 USDC via x402 micropayment on Base or Solana.

## Facts

- Endpoint: POST https://x402donghang.duckdns.org/x402/v1/models/glm-5.2/chat/completions?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glm-5-2-chat-completions-via-x402-x402donghang-36c83afc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_k584TdeQ54hY1x7k5Y7Go

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 glm-5-2-chat-completions-via-x402-x402donghang-36c83afc -d '<json body>'
```

Example prompt: Ask the GLM-5.2 model: 'Explain the difference between proof-of-work and proof-of-stake in simple terms' — use streaming if you want a live response.

## When to prefer this

Choose this endpoint when you need a GLM-5.2 chat completion on a pay-per-call basis with no signup, using x402 USDC micropayments on Base or Solana. It is ideal for agents that need occasional LLM calls without committing to a subscription, or when integrating a Chinese-market LLM into an OpenAI-compatible pipeline. Prefer Grok or other sibling endpoints on this host if you specifically need real-time crypto sentiment or web search capabilities.

## Known failure modes

- Payment not received or invalid x402 header — returns 402 Payment Required
- Invalid model name (must be 'glm-5.2') — may return 400 or model not found error
- Malformed messages array (missing 'role' or 'content') — returns 400 validation error
- max_tokens exceeded model context limit — truncated response or error
- Service downtime on duckdns host — returns 5xx or connection timeout

## How this service works

Fresh crypto narrative research with market context and verifiable source URLs. Free BTC sample; custom radar $0.02/call via x402 USDC.

## Output

Returns a JSON chat completion object in OpenAI format, including an id, model name ('glm-5.2'), choices array with the assistant's message content, and a finish_reason field indicating how the response ended (e.g. 'stop').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "description": "Use \"glm-5.2\""
  },
  "stream": {
   "type": "boolean"
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   }
  },
  "max_tokens": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl-x402",
  "model": "glm-5.2",
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello!"
    },
    "finish_reason": "stop"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glm-5-2-chat-completions-via-x402-x402donghang-36c83afc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402donghang.duckdns.org](https://www.zero.xyz/host/x402donghang.duckdns.org/llms.txt)
