{"info":{"title":"ModelRunner OpenAPI schema for deepseek/v4","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]`. The chain of thought arrives on the same stream in a `reasoning_content` delta field."},"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`. Text only — this model accepts no image, audio or document parts."},"max_tokens":{"type":"integer","title":"Max Tokens","minimum":1,"x-order":3,"description":"Upper bound on generated tokens. `max_tokens` and the thinking budget share one 393,216-token ceiling, so a long chain of thought consumes the room left for the visible answer — 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":"high","x-order":2,"description":"How hard the model thinks before answering. Defaults to `high`. Lowering it does not cut cost on this endpoint: `low` and `medium` behave as `high` and `xhigh` behaves as `max`, so `high` is the cheapest reachable setting. Thinking tokens bill as output tokens."}}},"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. Streaming deltas additionally carry the chain of thought in a `reasoning_content` field beside `content`."},"ReasoningEffortEnum":{"enum":["low","medium","high","xhigh","max"],"type":"string","title":"ReasoningEffortEnum","description":"Thinking-effort levels documented for this model. They collapse: `low` and `medium` behave the same as `high`, and `xhigh` behaves the same as `max`, so only two distinct behaviours are reachable on this endpoint. `high` is the provider default and the effective floor."}}}}