model |
Text |
Model ID used to generate the response, like gpt-4o or o1. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models. |
messages |
Completion_Message |
A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, images, and audio. |
frequency_penalty |
Number |
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. |
logit_bias |
Integer |
Modify the likelihood of specified tokens appearing in the completion. |
logprobs |
Boolean |
Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. |
max_completion_tokens |
Integer |
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. |
metadata |
Text |
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. |
presence_penalty |
Number |
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. |
reasoning_effort |
Text |
Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. |
seed |
Integer |
This feature is in Beta. 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, and you should refer to the system_fingerprint response parameter to monitor changes in the backend. |
service_tier |
Text |
Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service |
stop |
Text |
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. |
store |
Boolean |
Whether or not to store the output of this chat completion request for use in our model distillation or evals products. |
temperature |
Number |
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. |
top_logprobs |
Integer |
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used. |
top_p |
Number |
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. |
user |
Text |
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. |