Skip to main content
POST

Text Completion API

The Legacy Completions API uses prompt as input and is suitable for businesses still using the old OpenAI SDK or simple text completion workflows. For new conversational scenarios, it is recommended to use the chat completions API.

Request Body

string
required
Model name.
string | array<string>
required
Input prompt.
boolean
Whether to enable streaming output.
integer
Maximum number of tokens to generate.
number
Sampling temperature.
number
Nucleus sampling parameter.
string | array<string>
Stop sequences.

Request Example

Response Example