Skip to main content
POST
/
v1
/
completions
Create completion
curl --request POST \
  --url https://aiproxy.infaas-amd-dev.glo1.nscale.com/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json; charset=utf-8' \
  --data '
{
  "model": "<string>",
  "prompt": "<unknown>",
  "stream": false,
  "stream_options": {
    "include_usage": true
  },
  "max_tokens": 123,
  "n": 1,
  "frequency_penalty": 0,
  "logit_bias": {},
  "logprobs": 0,
  "presence_penalty": 0,
  "stop": "<unknown>",
  "temperature": 1,
  "top_p": 1,
  "echo": true,
  "suffix": "<string>",
  "best_of": 123,
  "seed": 123
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "text": "<string>",
      "index": 123,
      "logprobs": {
        "tokens": [
          "<string>"
        ],
        "token_logprobs": [
          123
        ],
        "top_logprobs": [
          {}
        ],
        "text_offset": [
          123
        ]
      },
      "finish_reason": "<string>"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "total_tokens": 123,
    "completion_tokens": 123,
    "prompt_tokens_details": "<unknown>"
  },
  "system_fingerprint": "<string>"
}

Authorizations

Authorization
string
header
required

Security scheme that accepts Unikorn Identity JWTs.

Body

application/json; charset=utf-8
model
string
required
prompt
any
required
stream
boolean
default:false
stream_options
StreamOptions · object
max_tokens
integer<int32>
n
integer<int32>
default:1
frequency_penalty
number<float>
default:0
logit_bias
object
logprobs
integer<int32>
default:0
presence_penalty
number<float>
default:0
stop
any
temperature
number<float>
default:1
top_p
number<float>
default:1
echo
boolean
suffix
string
best_of
integer<int32>
seed
integer<int64>

Response

id
string
required
object
string
required
created
integer<int64>
required
model
string
required
choices
CompletionChoice · object[]
required
usage
Usage · object
required
system_fingerprint
string