{"uid":"cap_6cwW_piDrJTGlYdWN-Bmi","slug":"glim-sh-llm-chat-completions-bb5799d5","name":"glim.sh LLM Chat Completions","description":"LLM chat completion (OpenAI-compatible, streaming supported)","url":"https://glim.sh/api/v1/inference/v1/chat/completions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"description":"Model identifier. Available: moonshotai/kimi-k2.5, minimax/minimax-m2.5, qwen/qwen-2.5-7b-instruct, anthropic/claude-sonnet-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-opus-4.5, anthropic/claude-opus-4.6, minimax/minimax-m2.7, z-ai/glm-5, z-ai/glm-5-turbo, z-ai/glm-5.1, x-ai/grok-4.1-fast, x-ai/grok-4.20-beta, x-ai/grok-4.20-multi-agent-beta, x-ai/grok-4.1-fast:online, x-ai/grok-4.20-beta:online, x-ai/grok-4.20-multi-agent-beta:online, stepfun/step-3.5-flash, xiaomi/mimo-v2-pro, google/gemini-3.1-flash-lite-preview, google/gemini-3.1-pro-preview"},"tools":{"type":"array","items":{},"description":"Tool definitions"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Nucleus sampling"},"stream":{"type":"boolean","description":"Enable SSE streaming"},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","description":"Message role"},"content":{"anyOf":[{"type":"string"},{"type":"null"},{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"}},"additionalProperties":{}}}]}},"additionalProperties":{}},"minItems":1,"description":"Chat messages"},"max_tokens":{"anyOf":[{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},{"type":"null"}],"description":"Max tokens to generate"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sampling temperature (0-2)"},"max_completion_tokens":{"anyOf":[{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},{"type":"null"}],"description":"Max completion tokens (preferred over max_tokens)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.08","successRate":"0.00","reviews":1,"stars":"1.3","state":"rated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"0.3700","medianCents":"0.3700","p90Cents":"0.3700","minCents":"0.3700","maxCents":"0.3700","p95Cents":"0.3700","sampleCount":1,"varies":false,"failureChargeRate":1},"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_8Kr5FFWrZh0oeDZeP7scQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"OpenAI-compatible LLM chat completion endpoint supporting multiple frontier models with optional SSE streaming","exampleAgentPrompt":"Using the glim.sh inference endpoint with Claude Sonnet 4.5, send this conversation and stream back the response: system message is 'You are a helpful assistant', user message is 'Explain quantum entanglement in two sentences', with temperature 0.7 and max 200 tokens.","exampleUseCases":null,"resultDescription":"An OpenAI-compatible chat completion response containing the assistant's generated message, finish reason, and token usage statistics. When streaming is enabled, the response arrives as Server-Sent Events (SSE) with delta tokens.","failureModes":["Invalid or unsupported model identifier returns 400 error","Payment failure or insufficient USDC balance results in 402 Payment Required","Exceeding max_tokens limit may truncate output","Malformed messages array (missing role or content) returns validation error","Temperature out of 0-2 range may cause rejection","Model temporarily unavailable returns 503"],"whenToPreferThis":"Choose this endpoint when you need pay-per-call LLM inference without managing API keys or subscriptions across multiple providers. Ideal for AI agents that need access to frontier models (Claude, Grok, Gemini, Qwen) through a single OpenAI-compatible interface billed via USDC micropayments. Best when you want model flexibility without committing to a single provider contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":1,"lastUsedAt":"2026-07-17T22:38:08.452Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T06:32:32.849Z","isFirstParty":false,"canonicalSlug":"glim-sh-llm-chat-completions-bb5799d5"}