glm
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.
Documentation & Preview
GLM compatibility protocols
Load this reference only for an existing Anthropic Messages or Gemini contents client.
glm-5.3 is not supported on these compatibility protocols. Use OpenAI-compatible Chat Completions for that model, or select an earlier model whose current RunAPI capability contract supports the required protocol.
For Messages, use base URL https://runapi.ai, a RunAPI key, a supported exact model ID, max_tokens, and text messages. Verify final content, stop_reason, and usage; streaming ends at message_stop.
For Gemini contents, set RUNAPI_MODEL to a supported exact model ID and use https://runapi.ai/v1beta/models/$RUNAPI_MODEL:generateContent or streamGenerateContent with x-goog-api-key. Verify candidates, finishReason, and usageMetadata.
Apply one evidence-backed shape correction, at most one safe pre-response transport retry, and no automatic model or protocol hopping.