Skip to main content
POST
https://api.savegate.ai
/
v1
/
completions
Completions
curl --request POST \
  --url https://api.savegate.ai/v1/completions \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": {},
  "max_tokens": 123,
  "temperature": 123,
  "stream": true
}
'

Overview

This is a legacy endpoint. We recommend using Chat Completions for all use cases.
Create a text completion with the specified model.

Request

Body Parameters

model
string
required
Model ID to use
prompt
string or array
required
The prompt(s) to generate completions for
max_tokens
integer
default:"16"
Maximum tokens to generate
temperature
number
default:"1"
Sampling temperature
stream
boolean
default:"false"
Whether to stream responses

Example

curl https://api.savegate.ai/v1/completions \
  -H "Authorization: Bearer sk-savegate-xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo-instruct",
    "prompt": "Say this is a test",
    "max_tokens": 7,
    "temperature": 0
  }'
For new applications, use the Chat Completions endpoint instead.