Completions
POST /v1/completions
Use this endpoint for legacy text completion clients and code fill-in-the-middle flows.
Request
Section titled “Request”{ "model": "qwen3.5-coder-32b", "prompt": "def fibonacci(n):", "max_tokens": 128, "temperature": 0.2}Fill in the middle
Section titled “Fill in the middle”{ "model": "qwen3.5-coder-32b", "prompt": "def add(a, b):\n ", "suffix": "\nprint(add(2, 3))", "max_tokens": 64}Response
Section titled “Response”{ "id": "cmpl_...", "object": "text_completion", "choices": [ { "text": "return a + b", "index": 0, "finish_reason": "stop" } ]}