{"uid":"cap_vF-5nYKx_c3IUEbCNUe74","slug":"farout-glm-5-2-chat-completions-pay-per-call-via-x402-d8dbdf31","name":"FarOut GLM-5.2 Chat Completions (Pay-Per-Call via x402)","description":"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.","url":"https://farouter.tech/v1/models/glm-5.2/chat/completions","method":"POST","headers":{},"bodySchema":{"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)."}}},"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.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_kihjQOKxlT3raEma3A90e","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Autonomous agent self-funded LLM calls","prompt":"I'm building an autonomous agent that needs to call an LLM on the fly without any pre-registered API keys or subscription. Use FarOut to send this system prompt 'You are a helpful assistant' and user message 'Summarize the pros and cons of microservices' to GLM-5.2, paying per call with USDC, and give me back the answer with up to 500 tokens."},{"title":"Crypto-native coding assistant query","prompt":"Ask GLM-5.2 via FarOut to write a Python function that validates an Ethereum address — pay per use with USDC on Base, no account required, and stream the response back to me."},{"title":"On-demand reasoning without subscription","prompt":"I don't want to maintain API keys or prepaid balances. Use FarOut's pay-per-call gateway to send GLM-5.2 this question: 'What are the key trade-offs between proof-of-work and proof-of-stake consensus mechanisms?' — limit it to 400 output tokens and return the full reply."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:44:27.779Z","isFirstParty":false}