Completions
Authorizations
Body
model specified as model_vendor/model
, for example openai/gpt-4o
The prompt to generate completions for, encoded as a string
Generates best_of completions server-side and returns the best one. Must be greater than n when used together.
Echo back the prompt in addition to the completion
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text.
Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.
Include log probabilities of the most likely tokens. Maximum value is 5.
The maximum number of tokens that can be generated in the completion.
How many completions to generate for each prompt.
Number between -2.0 and 2.0. Positive values penalize new tokens based on their presence in the text so far.
If specified, attempts to generate deterministic samples. Determinism is not guaranteed.
Up to 4 sequences where the API will stop generating further tokens.
Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events.
Options for streaming response. Only set this when stream is True.
The suffix that comes after a completion of inserted text. Only supported for gpt-3.5-turbo-instruct.
Sampling temperature between 0 and 2. Higher values make output more random, lower more focused.
Alternative to temperature. Consider only tokens with top_p probability mass. Range 0-1.
A unique identifier representing your end-user, which can help OpenAI monitor and detect abuse.