{"info":{"title":"ModelRunner OpenAPI schema for z-ai/glm-5.2","version":"0.1.0"},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["messages"],"properties":{"seed":{"type":"integer","title":"Seed","x-order":8,"description":"Best-effort determinism hint."},"stop":{"title":"Stop","x-order":7,"description":"Up to 4 stop sequences."},"tools":{"type":"array","items":{"type":"object"},"title":"Tools","x-order":4,"description":"OpenAI-format tool definitions the model may call."},"stream":{"type":"boolean","title":"Stream","default":false,"x-order":1,"description":"Return the reply as a Server-Sent Events stream of deltas terminated by `data: [DONE]`."},"messages":{"type":"array","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","description":"system | user | assistant | tool"},"content":{"type":"string","description":"Message text."}}},"title":"Messages","x-order":0,"minItems":1,"description":"OpenAI-style conversation history. Each item is an object with a `role` (`system`, `user`, `assistant` or `tool`) and `content`."},"max_tokens":{"type":"integer","title":"Max Tokens","minimum":1,"x-order":3,"description":"Upper bound on generated tokens, up to the documented 131,072-token output ceiling. Thinking consumes this budget, so allow generous headroom."},"tool_choice":{"title":"Tool Choice","x-order":5,"description":"`auto`, `none`, `required`, or a specific tool."},"response_format":{"type":"object","title":"Response Format","x-order":6,"description":"Structured-output control. Set its `type` to `json_object` to force a JSON reply."},"reasoning_effort":{"allOf":[{"$ref":"#/components/schemas/ReasoningEffortEnum"}],"title":"Reasoning Effort","default":"max","x-order":2,"description":"How hard the model thinks before answering, across seven levels. Defaults to `max`, the highest — lower it to cut cost, because thinking tokens bill as output tokens. `none` disables reasoning entirely."}}},"Output":{"type":"object","title":"Output","properties":{"id":{"type":"string"},"model":{"type":"string"},"usage":{"type":"object"},"object":{"type":"string"},"choices":{"type":"array","items":{"type":"object"}},"created":{"type":"integer"}},"description":"An OpenAI ChatCompletion object: `id`, `object`, `created`, `model`, `choices[]` and `usage`. Cache hits surface at `usage.prompt_tokens_details.cached_tokens`; thinking, where the model reports it, at `usage.completion_tokens_details.reasoning_tokens` — thinking tokens are billed as output tokens."},"ReasoningEffortEnum":{"enum":["none","minimal","low","medium","high","xhigh","max"],"type":"string","title":"ReasoningEffortEnum","description":"Thinking-effort levels, lowest to highest. `none` produces no chain of thought (reasoning_tokens = 0); `max` is the provider default."}}}}