Skip to main content
POST
Completions

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

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

Example

For new applications, use the Chat Completions endpoint instead.