Skip to content

Completions (legacy) ​

Uses the legacy Completions protocol format. New code should use Chat Completions; this endpoint exists for backward compatibility only.

POST https://router.accels.tech/v1/completions

Body ​

ParameterTypeRequiredNotes
modelstring✓e.g. gpt-3.5-turbo-instruct, davinci-002
promptstring | string[]✓Input
max_tokensinteger
temperaturenumber
top_pnumber
ninteger
streamboolean
stopstring | string[]
suffixstring
echoboolean
presence_penaltynumber-2 to 2
frequency_penaltynumber-2 to 2
logit_biasobject
seedintegerDeterministic sampling
userstringEnd-user identifier

Response ​

json
{
  "id": "cmpl-xxx",
  "object": "text_completion",
  "created": 1718000000,
  "model": "gpt-3.5-turbo-instruct",
  "choices": [{"text": "...", "index": 0, "finish_reason": "stop"}],
  "usage": {"prompt_tokens": 5, "completion_tokens": 7, "total_tokens": 12}
}

Example ​

bash
curl https://router.accels.tech/v1/completions \
  -H "Authorization: Bearer $ACCELSROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-3.5-turbo-instruct","prompt":"hello, ","max_tokens":16}'