{"uid":"cap_MXsURdcV6_FcnePl5PB2a","slug":"telnyx-x402-gateway-glm-5-1-fp8-chat-completions-0ee71bda","name":"Telnyx x402 Gateway – GLM-5.1-FP8 Chat Completions","description":"Pay USDC per request for Telnyx Inference and Audio (text-to-speech, speech-to-text) through x402.","url":"https://x402.telnyx.com/v1/chat/completions/_t/glm?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","const":1,"description":"Fixed to one completion per paid call."},"model":{"type":"string","const":"zai-org/GLM-5.1-FP8","description":"Model identifier; fixed to zai-org/GLM-5.1-FP8 on this route."},"tools":{"type":"array","items":{"type":"object"},"maxItems":16},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["system","user","assistant","tool"],"type":"string"},"content":{"type":"string","maxLength":12000}}},"maxItems":32,"description":"OpenAI-style chat messages."},"max_tokens":{"type":"integer","maximum":2048,"minimum":1},"temperature":{"type":"number","maximum":2,"minimum":0}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-xxx","usage":{"total_tokens":16,"prompt_tokens":12,"completion_tokens":4},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.023386","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.023386/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.023386","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.023386","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nYA29JjQRUF19TW5ufG2d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.023386","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates chat completions using the zai-org/GLM-5.1-FP8 model, paid per-request in USDC via the x402 protocol on Telnyx's inference gateway.","exampleAgentPrompt":"Using Telnyx's x402 GLM-5.1-FP8 model, send this conversation — system: 'You are a helpful assistant', user: 'What is the capital of France?' — with a max of 256 tokens and temperature 0.7, and give me the assistant's reply.","exampleUseCases":[{"title":"Crypto-paid AI assistant for agent pipelines","prompt":"I need to run a quick GLM-5.1 chat completion through Telnyx's x402 gateway — send the message 'Summarize the following text in one sentence: [text]' as a user message, limit it to 512 tokens, and pay per-request with USDC."},{"title":"Tool-calling workflow with GLM model","prompt":"Call the Telnyx GLM-5.1-FP8 model via x402 with my tool definitions and these messages: system 'You are a function-calling assistant', user 'What's the weather in Berlin?' — use temperature 0 and max 1024 tokens so it picks the right tool."},{"title":"Low-cost per-query LLM for a chatbot","prompt":"Send a multi-turn conversation to the Telnyx x402 GLM model — the assistant should have a 'You are a customer support bot' system prompt, then a user message 'How do I reset my password?', keeping temperature at 1 and max tokens at 200."}],"resultDescription":"Returns an OpenAI-compatible chat completion JSON object containing the assistant's reply message, finish reason (e.g. 'stop'), token usage breakdown (prompt, completion, total tokens), and a completion ID.","failureModes":["Insufficient USDC balance or failed x402 payment — request rejected with 402 Payment Required","Message array exceeds 32 items or content exceeds 12,000 characters — validation error","max_tokens exceeds 2048 or is below 1 — schema validation failure","Temperature out of range [0, 2] — rejected by input validation","Model identifier mismatch — only 'zai-org/GLM-5.1-FP8' is accepted on this route","Tool array exceeds 16 items — schema validation failure","Network timeout or inference backend unavailable — 5xx error"],"whenToPreferThis":"Choose this endpoint when you need pay-as-you-go LLM inference with no subscription, settling per-call in USDC via the x402 micropayment protocol. It is ideal for agents or pipelines that need the GLM-5.1-FP8 model specifically, or for use cases where traditional API key billing is impractical and crypto-native payment rails are preferred. It also suits sporadic or bursty workloads where committing to a monthly plan is undesirable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:36:05.896Z","isFirstParty":false,"canonicalSlug":"telnyx-x402-gateway-glm-5-1-fp8-chat-completions-0ee71bda"}