Skip to content

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

FieldTypeRequiredDescription
modelstringModel name
promptstring | arrayText to complete
max_tokensintegerMax tokens to generate
temperaturenumberCreativity (0–2)
top_pnumberNucleus sampling
streambooleanSSE stream
stopstring/arrayStop 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).

Qevron — AI gateway. Arpanet / OpenAI / Anthropic / Gemini compatible.