← ClaudeAtlas

glmlisted

Call the GLM API (GLM 5.3 and earlier GLM 5 and 4 series) through RunAPI using OpenAI-compatible Chat Completions. Use for GLM text chat, streaming, or an existing compatibility client that needs the conditional reference.
runapi-ai/glm · ★ 0 · AI & Automation · score 78
Install: claude install-skill runapi-ai/glm
# GLM on RunAPI Use OpenAI-compatible Chat Completions at `https://runapi.ai/v1` as the primary protocol. ## Primary protocol recipe ### Authenticate Set `OPENAI_API_KEY` to a RunAPI API key and `OPENAI_BASE_URL` to `https://runapi.ai/v1`. ### Send request ```python from openai import OpenAI client = OpenAI(api_key="YOUR_RUNAPI_TOKEN", base_url="https://runapi.ai/v1") response = client.chat.completions.create( model="glm-5.3", messages=[{"role": "user", "content": "Summarize this review."}], ) print(response.choices[0].message.content) print(response.usage) ``` For long output, call the same method with `stream=True` and `stream_options={"include_usage": True}`; consume every chunk through `[DONE]`. ### Verify result Require final assistant content, a terminal `finish_reason`, and authoritative `usage`. A stream is complete only after its terminal usage chunk and `[DONE]`. ### Stop boundaries Correct a rejected shape once using the structured error. Retry transport once only before any response or Usage and when replay is safe. Record a terminal error and stop without changing model or protocol. For `glm-5.3`, keep requests to text history on Chat Completions. Add tools, reasoning, structured output, or multimodal input only when the current RunAPI contract explicitly verifies that capability. ## Compatibility protocols Do not use compatibility protocols with `glm-5.3`; use the primary recipe. Load [compatibility protocols](references/compatibility-protoc