Legacy Completions
Endpoint
Section titled “Endpoint”POST https://api.bve.me/v1/completionsRequires Authorization: Bearer sk-bve-YOUR_KEY.
Limitations
Section titled “Limitations”- Streaming is not supported. Passing
"stream": truereturns a400error. - Array prompts are joined with
\n\nbefore being sent as a single user message. - The emulated
idis derived from the chat completion id (chatcmpl-→cmpl-).
Request body
Section titled “Request body”{ "model": "gpt-4o", "prompt": "The capital of France is", "max_tokens": 10}| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
prompt | string | string[] | No | Prompt text. Arrays are joined with \n\n. |
max_tokens | integer | No | Max tokens to generate |
temperature | number | No | Sampling temperature |
top_p | number | No | Nucleus sampling |
stop | string | array | No | Stop sequences |
presence_penalty | number | No | Presence penalty |
frequency_penalty | number | No | Frequency penalty |
user | string | No | End-user identifier |
seed | integer | No | Deterministic seed |
stream | boolean | No | Must be false or omitted |
Response
Section titled “Response”{ "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 }}Streaming error
Section titled “Streaming error”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" }}cURL example
Section titled “cURL example”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 }'