Skip to content

Completions

POST /v1/completions

Use this endpoint for legacy text completion clients and code fill-in-the-middle flows.

{
"model": "qwen3.5-coder-32b",
"prompt": "def fibonacci(n):",
"max_tokens": 128,
"temperature": 0.2
}
{
"model": "qwen3.5-coder-32b",
"prompt": "def add(a, b):\n ",
"suffix": "\nprint(add(2, 3))",
"max_tokens": 64
}
{
"id": "cmpl_...",
"object": "text_completion",
"choices": [
{
"text": "return a + b",
"index": 0,
"finish_reason": "stop"
}
]
}