# AgentRXI GLM-4.7-Flash Chat Completion

> AgentRXI GLM-4.7-Flash Chat Completion is a paid API for AI agents from agentrxi.com, paid per call via x402, $0.004462/call, status unknown (last checked 2026-10-15).

Pay-per-call LLM chat completion using GLM-4.7-Flash via an OpenAI-compatible interface, paid per call in USDC with no API key or signup required.

## Facts

- Endpoint: GET https://agentrxi.com/v1/glm/chat/completions?utm_source=zero.xyz
- Price: $0.004462/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentrxi-glm-4-7-flash-chat-completion-c261b3c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_P1gc_l--q_om25yXwu3cH

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 agentrxi-glm-4-7-flash-chat-completion-c261b3c3
```

Example prompt: Ask the GLM-4.7-Flash model on AgentRXI: 'What are three tips for writing clean Python code?' — keep the response under 200 tokens.

## When to prefer this

Choose this endpoint when you need a lightweight, low-cost LLM inference call without any API key or account setup, especially if you're already using x402 USDC micropayments. It's ideal for agents needing quick, OpenAI-compatible chat completions at a fixed per-call price, and particularly useful when GLM-4.7-Flash's multilingual strengths (especially Chinese) are an advantage over Western-centric models.

## Known failure modes

- Missing required 'prompt' query parameter returns a 400 error
- Insufficient USDC payment or failed x402 payment flow returns a 402 error
- Exceeded max_tokens limit may cause truncated output with finish_reason 'length'
- Invalid temperature value (outside 0–2 range) may cause a 422 validation error
- Network timeout if the model takes too long to respond

## How this service works

OpenAI-compatible chat completions on Zhipu GLM 4.7 Flash, reasoning and tool calling. Set your OpenAI SDK base URL to https://agentrxi.com/v1/glm and pay per token with x402 instead of an API key: $0.18 per million input and $1.2 per million output tokens, minimum $0.002 a call, at most $0.0082. The 402 quotes your request's maximum; "upto" payers are charged only the tokens used. Same request/response shape as OpenAI (tool calling, reasoning, streaming supported), up to 409

## Output

Returns an OpenAI-compatible JSON chat completion object including the assistant's reply text, finish reason, token usage breakdown (prompt, completion, total), model name (glm-4.7-flash), and a unique completion ID.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "User message"
      },
      "system": {
       "type": "string",
       "description": "Optional system message"
      },
      "max_tokens": {
       "type": "integer"
      },
      "temperature": {
       "type": "number"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": "chatcmpl-...",
  "model": "glm-4.7-flash",
  "usage": {
   "total_tokens": 18,
   "prompt_tokens": 14,
   "completion_tokens": 4
  },
  "object": "chat.completion",
  "choices": [
   {
    "index": 0,
    "message": {
     "role": "assistant",
     "content": "Bonjour !"
    },
    "finish_reason": "stop"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentrxi-glm-4-7-flash-chat-completion-c261b3c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentrxi.com](https://www.zero.xyz/host/agentrxi.com/llms.txt)
