Skip to content

Legacy Completions

POST https://api.bve.me/v1/completions

Requires Authorization: Bearer sk-bve-YOUR_KEY.

  • Streaming is not supported. Passing "stream": true returns a 400 error.
  • Array prompts are joined with \n\n before being sent as a single user message.
  • The emulated id is derived from the chat completion id (chatcmpl-cmpl-).
{
"model": "gpt-4o",
"prompt": "The capital of France is",
"max_tokens": 10
}
FieldTypeRequiredDescription
modelstringYesModel ID
promptstring | string[]NoPrompt text. Arrays are joined with \n\n.
max_tokensintegerNoMax tokens to generate
temperaturenumberNoSampling temperature
top_pnumberNoNucleus sampling
stopstring | arrayNoStop sequences
presence_penaltynumberNoPresence penalty
frequency_penaltynumberNoFrequency penalty
userstringNoEnd-user identifier
seedintegerNoDeterministic seed
streambooleanNoMust be false or omitted
{
"id": "cmpl-abc123",
"object": "text_completion",
"created": 1716288000,
"model": "gpt-4o",
"choices": [
{
"text": " Paris",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 7,
"completion_tokens": 2,
"total_tokens": 9
}
}
Terminal window
curl https://api.bve.me/v1/completions \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-4o", "prompt": "Hello", "stream": true}'

Returns 400:

{
"error": {
"message": "Streaming legacy completions are not supported. Use /v1/chat/completions with stream=true.",
"type": "invalid_request_error",
"code": "unsupported_streaming_completion"
}
}
Terminal window
curl https://api.bve.me/v1/completions \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"prompt": "The capital of France is",
"max_tokens": 5
}'