# Tokensale GLM-5-2 Chat Completions

> Tokensale GLM-5-2 Chat Completions is a paid API for AI agents from tokensale.maiapp.ru, paid per call via x402, $0.008288/call, status unknown (last checked 2026-11-20).

Provides OpenAI-compatible chat completions using the GLM-5-2 model via a pay-per-token x402 micropayment gateway

## Facts

- Endpoint: POST https://tokensale.maiapp.ru/x402/v1/models/glm-5-2/chat/completions?utm_source=zero.xyz
- Price: $0.008288/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokensale-glm-5-2-chat-completions-e450b2c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ee-84arN1riDCbYxPK6PW

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 tokensale-glm-5-2-chat-completions-e450b2c6 -d '<json body>'
```

Example prompt: Send a chat message to GLM-5-2 asking it to summarize the following paragraph: 'Artificial intelligence is transforming industries worldwide, enabling automation of complex tasks and generating new insights from large datasets.' Pay per token via USDC.

## When to prefer this

Choose this endpoint when you need OpenAI/Claude-compatible chat completions from the GLM-5-2 model specifically, want pay-per-use token billing without a subscription, require a large 200k token context window, or need to pay programmatically via USDC micropayments on Base network through the x402 protocol.

## Known failure modes

- Insufficient USDC payment via x402 protocol returns payment required error
- Invalid or malformed messages array causes 400 bad request
- Exceeding maxInputTokens (195,904) truncates or rejects the request
- Model unavailable or upstream GLM-5-2 service outage returns 503
- Incorrect x402 payment header format causes authentication failure

## How this service works

Один API-ключ для GPT и Claude-совместимых клиентов. Пакетные токены, прозрачное списание и контроль доступа.

## Output

Returns an OpenAI-compatible JSON object with the assistant's reply message, finish reason (e.g. 'stop'), prompt and completion token counts, and a model catalog entry showing pricing, context window size (200k tokens), and payment scheme details on the Base network in USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string",
   "const": "glm-5-2"
  },
  "stream": {
   "type": "boolean",
   "const": false
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "minItems": 1
  },
  "max_tokens": {
   "type": "integer",
   "minimum": 1
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0
  },
  "max_completion_tokens": {
   "type": "integer",
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "x402-request",
  "model": "glm-5-2",
  "usage": {
   "total_tokens": 2,
   "prompt_tokens": 1,
   "completion_tokens": 1
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Hello back"
    },
    "finish_reason": "stop"
   }
  ],
  "modelCatalog": [
   {
    "id": "glm-5-2",
    "payment": {
     "scheme": "upto",
     "network": "eip155:8453",
     "currency": "USDC"
    },
    "protocols": [
     "messages"
    ],
    "contextTokens": 200000,
    "maxInputTokens": 195904,
    "maxOutputTokens": 4096,
    "priceUsdPerMillionTokens": {
     "input": "0.645000",
     "output": "2.020000",
     "cacheRead": "0.117000",
     "cacheWrite": "0.645000"
    }
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokensale-glm-5-2-chat-completions-e450b2c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tokensale.maiapp.ru](https://www.zero.xyz/host/tokensale.maiapp.ru/llms.txt)
