Skip to main content
The /v1/completions endpoint supports the older OpenAI text completion format, which predates the chat completions API. You can use it for backward compatibility with existing tools and integrations that were built against the original completions interface before the chat format became the standard.
For most use cases, prefer the /v1/chat/completions endpoint. This endpoint is provided for backward compatibility with older integrations.

Request

POST https://kiosapi.com/v1/completions

Headers

Request Body

string
required
Model name (e.g. gpt-3.5-turbo-instruct).
string
required
Input text prompt to complete.
number
Sampling temperature between 0 and 2. Higher values produce more random output.
number
Nucleus sampling probability mass. Use as an alternative to temperature.
boolean
Set to true to receive a streamed response using server-sent events.
number
Maximum number of tokens to generate in the completion.
number
How many completions to generate for each prompt.
number
Number between -2.0 and 2.0. Positive values penalise new tokens based on whether they appear in the text so far.
number
Number between -2.0 and 2.0. Positive values penalise new tokens based on their existing frequency in the text.
number
Return log probabilities of the most likely tokens. Pass an integer to specify how many tokens to return.
string
A unique identifier for the end-user, which can help with monitoring and abuse detection.

Example Request

Response