{"uid":"cap_Rmkn0jXTwNg7dCM81eZ1p","slug":"farout-glm-5-2-chat-completions-pay-per-call-via-x402-eedc7d17","name":"FarOut GLM-5.2 Chat Completions (Pay-Per-Call via x402)","description":"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.","url":"https://farouter.tech/v1/metered/models/glm-5.2/chat/completions","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"type":"json","example":{"usage":{"prompt_tokens":6,"completion_tokens":8},"choices":[{"message":{"role":"assistant","content":"Hello! How can I help?"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MAL_Z_5dsCWn8wh7COLr6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Autonomous agent one-off inference","prompt":"I need you to call GLM-5.2 with this single user message — 'Summarize the following article in three bullet points: [article text]' — cap the output at 300 tokens and pay per call from my crypto wallet, no account setup."},{"title":"Serverless chatbot backend","prompt":"For each incoming user message in my chatbot, forward it along with the conversation history to GLM-5.2 with a system prompt of 'You are a helpful customer support agent', limit replies to 500 tokens, and bill each call individually in USDC."},{"title":"Rapid one-shot content drafting","prompt":"Draft a product description for my new espresso machine using GLM-5.2 — give it the system context 'You are a marketing copywriter' and the user prompt 'Write a 150-word product description for a compact home espresso machine', max 250 tokens, charged per request."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:44:08.624Z","isFirstParty":false}