Create a text completion
Create a completion using CompletionRequest. Response is CompletionsResponse.
Body
Request body for the text completion endpoint.
The text prompt to generate completions from. Required.
Optional images referenced by the prompt (base64, array of images or descriptors).
Optional audio inputs referenced by the prompt.
Optional video inputs referenced by the prompt.
Maximum tokens to generate for the completion.
Sampling temperature to control randomness of generation.
Nucleus sampling cumulative probability threshold.
Top-k filtering size to restrict token choices.
If true, request streaming partial output as it is produced.
List of stop sequences to end generation.
Optional seed to make generation deterministic.
Penalty to reduce likelihood of new tokens based on presence.
Penalty to reduce likelihood of tokens appearing based on frequency.
Token-specific additive biases applied to logits before sampling.
Whether to include logprob information in the completion response.
Response
Completions response
Response returned from the text completions endpoint.
Unique identifier for this completion response.
Type of the returned object; always 'completion' for this response.
completion Unix timestamp (seconds) when the completion was created.
Name or ID of the model used to generate the completion.
List of generated choices produced by the model.
Optional token usage details for this request.

