v27

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2193427579.9 KB
Inference

Create completion.

Generate an OpenAI-compatible completion for the given prompt using the specified model.

post/v1/completions

Request body

modelstring required

The identifier of the model to use.

best_ofinteger nullable

The number of completions to generate.

echoboolean nullable

Whether to echo the prompt.

frequency_penaltynumber nullable

The penalty for repeated tokens.

logit_biasobject nullable

The logit bias to use.

logprobsinteger nullable

Include the log probabilities on the logprobs most likely output tokens.

max_tokensinteger nullable

The maximum number of tokens to generate.

ninteger nullable

The number of completions to generate.

presence_penaltynumber nullable

The penalty for repeated tokens.

seedinteger nullable

The seed to use.

streamboolean nullable

Whether to stream the response.

stream_optionsobject nullable

The stream options to use.

temperaturenumber nullable

The temperature to use.

top_pnumber nullable

The top p to use.

userstring nullable

The user to use.

suffixstring nullable

The suffix that should be appended to the completion.

Response

An OpenAICompletion. When streaming, returns Server-Sent Events (SSE) with OpenAICompletion chunks.

idstring required

The ID of the completion.

createdinteger required

The Unix timestamp in seconds when the completion was created.

modelstring required

The model that was used to generate the completion.

object'text_completion'

The object type.