Get a completion along with the probabilities of alternative tokens at each position. This endpoint is not recommended for new use cases and is maintained for legacy compatibility only.
Use /chat/completions instead for the best and newest models.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The model to use for the completion.
The prompt to generate completions for.
Whether to include the stop strings in output text. Defaults to false.
The maximum number of tokens to generate in the completion.
The maximum number of tokens to generate in the completion.
Sets a minimum probability threshold relative to the most likely token.
0 <= x <= 1Whether to return the generated tokens as token IDs instead of text. Defaults to false.
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed.
Whether to skip special tokens in the output.
An array of sequences where the API will stop generating further tokens.
If true, the response will be streamed as a series of events instead of a single JSON object.
Options for streaming response. Only set this when you set stream: true.
What sampling temperature to use, between 0 and 2.
0 <= x <= 2Limits the model to consider only the top K most likely tokens at each step.
An alternative to sampling with temperature, called nucleus sampling.
x <= 1Successful response - JSON when stream=false, SSE when stream=true
The list of completion choices.
The Unix timestamp (in seconds) of when the completion was created.
The model used for the completion.
The object type, which is always 'text_completion'.
A URL to the JSON Schema for this object.
"https://example.com/openai/schemas/Completion.json"
Usage statistics for the completion request.