Optional
options: RequestOptionsOptional
options: RequestOptionsOptional
options: RequestOptionsDelete a stored chat completion. Only Chat Completions that have been created
with the store
parameter set to true
can be deleted.
Optional
options: RequestOptionsList stored Chat Completions. Only Chat Completions that have been stored with
the store
parameter set to true
will be returned.
Optional
query: null | ChatCompletionListParamsOptional
options: RequestOptionsOptional
options: RequestOptionsGet a stored chat completion. Only Chat Completions that have been created with
the store
parameter set to true
will be returned.
Optional
options: RequestOptionsA convenience helper for using tool calls with the /chat/completions endpoint which automatically calls the JavaScript functions you provide and sends their results back to the /chat/completions endpoint, looping as long as the model requests function calls.
For more details and examples, see the docs
Optional
options: RunnerOptionsOptional
options: RunnerOptionsModify a stored chat completion. Only Chat Completions that have been created
with the store
parameter set to true
can be modified. Currently, the only
supported modification is to update the metadata
field.
Optional
options: RequestOptions
Starting a new project? We recommend trying Responses to take advantage of the latest OpenAI platform features. Compare Chat Completions with Responses.
Creates a model response for the given chat conversation. Learn more in the text generation, vision, and audio guides.
Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide.