Completions
Klasik (sohbet öncesi) metin tamamlama uç noktası. Tek bir prompt alır ve devamını üretir. Yeni uygulamalarda genellikle Chat Completions tercih edilir.
POST/v1/completions
İstek parametreleri
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
model | string | ✓ | Model adı |
prompt | string | dizi | ✓ | Tamamlanacak metin |
max_tokens | integer | Üretilecek azami token | |
temperature | number | Yaratıcılık (0–2) | |
top_p | number | Çekirdek örnekleme | |
stream | boolean | SSE akışı | |
stop | string/dizi | Durdurma dizileri |
Örnek
bash
curl https://app.qevron.ai/v1/completions \
-H "Authorization: Bearer $QEVRON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "verinova",
"prompt": "Bir zamanlar uzak bir galakside",
"max_tokens": 64
}'python
resp = client.completions.create(
model="verinova",
prompt="Bir zamanlar uzak bir galakside",
max_tokens=64,
)
print(resp.choices[0].text)javascript
const resp = await client.completions.create({
model: "verinova",
prompt: "Bir zamanlar uzak bir galakside",
max_tokens: 64,
});
console.log(resp.choices[0].text);Yanıt
json
{
"id": "cmpl-...",
"object": "text_completion",
"created": 1716200000,
"model": "verinova",
"choices": [
{ "index": 0, "text": " parlak bir yıldızın etrafında...", "finish_reason": "length" }
],
"usage": { "prompt_tokens": 8, "completion_tokens": 64, "total_tokens": 72 }
}Üretilen metin choices[0].text içindedir (chat'teki message.content yerine).