{"info":{"title":"ModelRunner OpenAPI schema for alibaba/qwen3.8-max","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":9,"description":"Best-effort determinism hint."},"stop":{"title":"Stop","x-order":8,"description":"Up to 4 stop sequences."},"tools":{"type":"array","items":{"type":"object"},"title":"Tools","x-order":5,"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":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}],"description":"Message text, or an array of OpenAI-style content parts for a multimodal turn."}}},"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`. This model reads images and video as well as text, so `content` may be a plain string or an array of content parts — an image part has type `image_url` and carries the image URL at `image_url.url`, and up to 2,048 images fit in one request."},"max_tokens":{"type":"integer","title":"Max Tokens","minimum":1,"x-order":4,"description":"Upper bound on the generated reply, up to the documented 131,072-token output ceiling. That ceiling is the same in thinking and non-thinking mode."},"tool_choice":{"title":"Tool Choice","x-order":6,"description":"`auto`, `none`, `required`, or a specific tool."},"response_format":{"type":"object","title":"Response Format","x-order":7,"description":"Structured-output control. Set its `type` to `json_object` to force a JSON reply. Thinking is on by default and the brand documents that a thinking-mode reply may not be strictly valid JSON, so pair this with `reasoning_effort` set to `none` when the output has to parse."},"thinking_budget":{"type":"integer","title":"Thinking Budget","default":262144,"minimum":1,"x-order":3,"description":"Ceiling on chain-of-thought tokens. Defaults to 262,144, the maximum chain-of-thought length published for this model; the 131,072-token reply ceiling is published as its own separate figure. When the limit is reached the model stops reasoning and responds immediately."},"reasoning_effort":{"allOf":[{"$ref":"#/components/schemas/ReasoningEffortEnum"}],"title":"Reasoning Effort","default":"xhigh","x-order":2,"description":"How hard the model thinks before answering. Defaults to `xhigh`, which is already the maximum tier: `high` and `max` resolve to the same behaviour, `minimal` and `low` to the low tier, `medium` is its own tier, and `none` switches thinking off completely. Thinking tokens bill as output tokens, so lowering this is the main cost lever."}}},"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 at `usage.completion_tokens_details.reasoning_tokens`, which is nested inside `completion_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. Seven accepted values resolve to four distinct behaviours: `none` turns reasoning off entirely, `minimal` and `low` both give the low tier, `medium` is its own tier, and `high`, `max` and `xhigh` all give maximum intensity. `xhigh` is the provider default."}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"servers":[{"url":"https://queue.modelrunner.run/alibaba/qwen3.8-max"}],"paths":{"/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Chat completion with Qwen3.8-Max (OpenAI-compatible, synchronous)","description":"OpenAI Chat Completions request. Set \"stream\": true for Server-Sent Events. The body `model` may be omitted; if present it must equal the endpoint in the URL.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}}},"responses":{"200":{"description":"A chat.completion object (or an SSE stream when streaming).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request (OpenAI error envelope)."},"401":{"description":"Missing or invalid API key."},"429":{"description":"insufficient_quota (balance) or rate_limit_exceeded."},"502":{"description":"Upstream error."}}}}}}