Completions
The classic (pre-chat) text completion endpoint. It takes a single prompt and generates the continuation. New apps usually prefer Chat Completions.
POST/v1/completions
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ✓ | Model name |
prompt | string | array | ✓ | Text to complete |
max_tokens | integer | Max tokens to generate | |
temperature | number | Creativity (0–2) | |
top_p | number | Nucleus sampling | |
stream | boolean | SSE stream | |
stop | string/array | Stop sequences |
Example
bash
curl https://app.qevron.ai/v1/completions \
-H "Authorization: Bearer $QEVRON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "verinova",
"prompt": "Once upon a time in a distant galaxy",
"max_tokens": 64
}'python
resp = client.completions.create(
model="verinova",
prompt="Once upon a time in a distant galaxy",
max_tokens=64,
)
print(resp.choices[0].text)javascript
const resp = await client.completions.create({
model: "verinova",
prompt: "Once upon a time in a distant galaxy",
max_tokens: 64,
});
console.log(resp.choices[0].text);Response
json
{
"id": "cmpl-...",
"object": "text_completion",
"created": 1716200000,
"model": "verinova",
"choices": [
{ "index": 0, "text": " around a bright star...", "finish_reason": "length" }
],
"usage": { "prompt_tokens": 8, "completion_tokens": 64, "total_tokens": 72 }
}Generated text is in choices[0].text (instead of chat's message.content).