Skip to main content
Server path: /openai-ai | Type: Application | PCID required: Yes

Tools

ToolDescription
openai_ai_create_chat_completionStarting 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.
openai_ai_create_completionCreates a completion for the provided prompt and parameters.
openai_ai_create_embeddingCreates an embedding vector representing the input text.
openai_ai_create_imageCreates an image given a prompt. Learn more.
openai_ai_create_image_variationCreates a variation of a given image. This endpoint only supports dall-e-2.
openai_ai_create_moderationClassifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide.
openai_ai_create_realtime_sessionCreate an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event. It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.
openai_ai_create_realtime_transcription_sessionCreate an ephemeral API token for use in client-side applications with the Realtime API specifically for realtime transcriptions. Can be configured with the same session parameters as the transcription_session.update client event. It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API.
openai_ai_create_responseCreates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model’s response.
openai_ai_create_speechGenerates audio from the input text.
openai_ai_create_transcriptionTranscribes audio into the input language.
openai_ai_create_translationTranslates audio into English.
openai_ai_delete_chat_completionDelete a stored chat completion. Only Chat Completions that have been created with the store parameter set to true can be deleted.
openai_ai_delete_modelDelete a fine-tuned model. You must have the Owner role in your organization to delete a model.
openai_ai_delete_responseDeletes a model response with the given ID.
openai_ai_get_chat_completionGet a stored chat completion. Only Chat Completions that have been created with the store parameter set to true will be returned.
openai_ai_get_chat_completion_messagesGet the messages in a stored chat completion. Only Chat Completions that have been created with the store parameter set to true will be returned.
openai_ai_get_responseRetrieves a model response with the given ID.
openai_ai_list_chat_completionsList stored Chat Completions. Only Chat Completions that have been stored with the store parameter set to true will be returned.
openai_ai_list_input_itemsReturns a list of input items for a given response.
openai_ai_list_modelsLists the currently available models, and provides basic information about each one such as the owner and availability.
openai_ai_retrieve_modelRetrieves a model instance, providing basic information about the model such as the owner and permissioning.
openai_ai_update_chat_completionModify 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.

openai_ai_create_chat_completion

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. Parameters:
ParameterTypeRequiredDefaultDescription
audioobjectNoParameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
frequency_penaltynumberNoNumber 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.
function_callobjectNoDeprecated in favor of tool_choice. Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"name": "my_function"} forces the model to call that function. none is the default when no functions are present. auto is the default if functions are present.
functionsobject[]NoDeprecated in favor of tools. A list of functions the model may generate JSON inputs for.
logit_biasobjectNoModify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
logprobsbooleanNoWhether 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_tokensintegerNoAn upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.
max_tokensintegerNoThe maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. This value is now deprecated in favor of max_completion_tokens, and is not compatible with o-series models.
messagesany[]YesA 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.
modalitiesstring[]NoOutput types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"] The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"]
modelobjectYesThe model value
nintegerNoHow many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
parallel_tool_callsbooleanNoWhether to enable parallel function calling during tool use.
predictionobjectNoConfiguration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. This is most common when you are regenerating a file with only minor changes to most of the content.
presence_penaltynumberNoNumber 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_effortstringNoo-series models only 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.
response_formatobjectNoAn object specifying the format that the model must output. Setting to { "type": "json_schema", "json_schema": {...} } enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.
seedintegerNoThis 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.
stopstring[]NoNot supported with latest reasoning models o3 and o4-mini. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
storebooleanNoWhether or not to store the output of this chat completion request for use in our model distillation or evals products.
streambooleanNoIf set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information, along with the streaming responses guide for more information on how to handle the streaming events.
stream_optionsobjectNoOptions for streaming response. Only set this when you set stream: true.
temperaturenumberNoWhat 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.
tool_choiceobjectNoControls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. none is the default when no tools are present. auto is the default if tools are present.
toolsobject[]NoA list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
top_logprobsintegerNoAn 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_pnumberNoAn 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.
web_search_optionsobjectNoThis tool searches the web for relevant results to use in a response. Learn more about the web search tool.

openai_ai_create_completion

Creates a completion for the provided prompt and parameters. Parameters:
ParameterTypeRequiredDefaultDescription
best_ofintegerNoGenerates best_of completions server-side and returns the “best” (the one with the highest log probability per token). Results cannot be streamed. When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
echobooleanNoEcho back the prompt in addition to the completion
frequency_penaltynumberNoNumber 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. See more information about frequency and presence penalties.
logit_biasobjectNoModify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this tokenizer tool to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. As an example, you can pass &#123;"50256": -100&#125; to prevent the <|endoftext|> token from being generated.
logprobsintegerNoInclude the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response. The maximum value for logprobs is 5.
max_tokensintegerNoThe maximum number of tokens that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model’s context length. Example Python code for counting tokens.
modelobjectYesID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
nintegerNoHow many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
presence_penaltynumberNoNumber 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. See more information about frequency and presence penalties.
promptobjectYesThe prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
seedintegerNoIf 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.
stopstring[]NoNot supported with latest reasoning models o3 and o4-mini. Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
streambooleanNoWhether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.
stream_optionsobjectNoOptions for streaming response. Only set this when you set stream: true.
suffixstringNoThe suffix that comes after a completion of inserted text. This parameter is only supported for gpt-3.5-turbo-instruct.
temperaturenumberNoWhat 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_pnumberNoAn 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. We generally recommend altering this or temperature but not both.
userstringNoA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

openai_ai_create_embedding

Creates an embedding vector representing the input text. Parameters:
ParameterTypeRequiredDefaultDescription
dimensionsintegerNoThe number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
encoding_formatstringNoThe format to return the embeddings in. Can be either float or base64.
inputobjectYesInput text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. Some models may also impose a limit on total number of tokens summed across inputs.
modelobjectYesID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
userstringNoA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

openai_ai_create_image

Creates an image given a prompt. Learn more. Parameters:
ParameterTypeRequiredDefaultDescription
backgroundstringNoAllows to set transparency for the background of the generated image(s). This parameter is only supported for gpt-image-1. Must be one of transparent, opaque or auto (default value). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.
modelobjectNoThe model to use for image generation. One of dall-e-2, dall-e-3, or gpt-image-1. Defaults to dall-e-2 unless a parameter specific to gpt-image-1 is used.
moderationstringNoControl the content-moderation level for images generated by gpt-image-1. Must be either low for less restrictive filtering or auto (default value).
nintegerNoThe number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
output_compressionintegerNoThe compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1 with the webp or jpeg output formats, and defaults to 100.
output_formatstringNoThe format in which the generated images are returned. This parameter is only supported for gpt-image-1. Must be one of png, jpeg, or webp.
promptstringYesA text description of the desired image(s). The maximum length is 32000 characters for gpt-image-1, 1000 characters for dall-e-2 and 4000 characters for dall-e-3.
qualitystringNoThe quality of the image that will be generated. - auto (default value) will automatically select the best quality for the given model. - high, medium and low are supported for gpt-image-1. - hd and standard are supported for dall-e-3. - standard is the only option for dall-e-2.
response_formatstringNoThe format in which generated images with dall-e-2 and dall-e-3 are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter isn’t supported for gpt-image-1 which will always return base64-encoded images.
sizestringNoThe size of the generated images. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default value) for gpt-image-1, one of 256x256, 512x512, or 1024x1024 for dall-e-2, and one of 1024x1024, 1792x1024, or 1024x1792 for dall-e-3.
stylestringNoThe style of the generated images. This parameter is only supported for dall-e-3. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.
userstringNoA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

openai_ai_create_image_variation

Creates a variation of a given image. This endpoint only supports dall-e-2. Parameters:
ParameterTypeRequiredDefaultDescription
imagestringYesThe image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
modelobjectNoThe model to use for image generation. Only dall-e-2 is supported at this time.
nintegerNoThe number of images to generate. Must be between 1 and 10.
response_formatstringNoThe format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated.
sizestringNoThe size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
userstringNoA unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

openai_ai_create_moderation

Classifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide. Parameters:
ParameterTypeRequiredDefaultDescription
inputobjectYesInput (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
modelobjectNoThe content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.

openai_ai_create_realtime_session

Create an ephemeral API token for use in client-side applications with the Realtime API. Can be configured with the same session parameters as the session.update client event. It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API. Parameters:
ParameterTypeRequiredDefaultDescription
input_audio_formatstringNoThe format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.
input_audio_noise_reductionobjectNoConfiguration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
input_audio_transcriptionobjectNoConfiguration for input audio transcription, defaults to off and can be set to null to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through the /audio/transcriptions endpoint and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
instructionsstringNoThe default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. “be extremely succinct”, “act friendly”, “here are examples of good responses”) and on audio behavior (e.g. “talk quickly”, “inject emotion into your voice”, “laugh frequently”). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior. Note that the server sets default instructions which will be used if this field is not set and are visible in the session.created event at the start of the session.
max_response_output_tokensobjectNoMaximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or inf for the maximum available tokens for a given model. Defaults to inf.
modalitiesobjectNoThe set of modalities the model can respond with. To disable audio, set this to [“text”].
modelstringNoThe Realtime model used for this session.
output_audio_formatstringNoThe format of output audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, output audio is sampled at a rate of 24kHz.
temperaturenumberNoSampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.
tool_choicestringNoHow the model chooses tools. Options are auto, none, required, or specify a function.
toolsobject[]NoTools (functions) available to the model.
turn_detectionobjectNoConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to null to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjuction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.
voiceobjectNoThe voice value

openai_ai_create_realtime_transcription_session

Create an ephemeral API token for use in client-side applications with the Realtime API specifically for realtime transcriptions. Can be configured with the same session parameters as the transcription_session.update client event. It responds with a session object, plus a client_secret key which contains a usable ephemeral API token that can be used to authenticate browser clients for the Realtime API. Parameters:
ParameterTypeRequiredDefaultDescription
includestring[]NoThe set of items to include in the transcription. Current available items are: - item.input_audio_transcription.logprobs
input_audio_formatstringNoThe format of input audio. Options are pcm16, g711_ulaw, or g711_alaw. For pcm16, input audio must be 16-bit PCM at a 24kHz sample rate, single channel (mono), and little-endian byte order.
input_audio_noise_reductionobjectNoConfiguration for input audio noise reduction. This can be set to null to turn off. Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model. Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
input_audio_transcriptionobjectNoConfiguration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.
modalitiesobjectNoThe set of modalities the model can respond with. To disable audio, set this to [“text”].
turn_detectionobjectNoConfiguration for turn detection, ether Server VAD or Semantic VAD. This can be set to null to turn off, in which case the client must manually trigger model response. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech. Semantic VAD is more advanced and uses a turn detection model (in conjuction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with “uhhm”, the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.

openai_ai_create_response

Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model’s response. Parameters:
ParameterTypeRequiredDefaultDescription
includestring[]NoSpecify additional output data to include in the model response. Currently supported values are: file_search_call.results, message.input_image.image_url, computer_call_output.output.image_url.
inputobjectYesText, image, or file inputs to the model, used to generate a response. Learn more: - Text inputs and outputs - Image inputs - File inputs - Conversation state - Function calling
instructionsstringNoInserts a system (or developer) message as the first item in the model’s context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
max_output_tokensintegerNoAn upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
modelobjectYesThe model value
parallel_tool_callsbooleanNoWhether to allow the model to run tool calls in parallel.
previous_response_idstringNoThe unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
reasoningobjectNoo-series models only Configuration options for reasoning models.
storebooleanNoWhether to store the generated model response for later retrieval via API.
streambooleanNoIf set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information.
textobjectNoConfiguration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs
tool_choiceobjectNoHow the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.
toolsany[]NoAn array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. The two categories of tools you can provide the model are: - Built-in tools: Tools that are provided by OpenAI that extend the model’s capabilities, like web search or file search. Learn more about built-in tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
truncationstringNoThe truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model’s context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.

openai_ai_create_speech

Generates audio from the input text. Parameters:
ParameterTypeRequiredDefaultDescription
inputstringYesThe text to generate audio for. The maximum length is 4096 characters.
instructionsstringNoControl the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.
modelobjectYesOne of the available TTS models: tts-1, tts-1-hd or gpt-4o-mini-tts.
response_formatstringNoThe format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.
speednumberNoThe speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.
voiceobjectYesThe voice value

openai_ai_create_transcription

Transcribes audio into the input language. Parameters:
ParameterTypeRequiredDefaultDescription
filestringYesThe audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
include[]string[]NoAdditional information to include in the transcription response. logprobs will return the log probabilities of the tokens in the response to understand the model’s confidence in the transcription. logprobs only works with response_format set to json and only with the models gpt-4o-transcribe and gpt-4o-mini-transcribe.
languagestringNoThe language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.
modelobjectYesID of the model to use. The options are gpt-4o-transcribe, gpt-4o-mini-transcribe, and whisper-1 (which is powered by our open source Whisper V2 model).
promptstringNoAn optional text to guide the model’s style or continue a previous audio segment. The prompt should match the audio language.
response_formatstringNoThe format of the output, in one of these options: json, text, srt, verbose_json, or vtt. For gpt-4o-transcribe and gpt-4o-mini-transcribe, the only supported format is json.
streambooleanNoIf set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section of the Speech-to-Text guide for more information. Note: Streaming is not supported for the whisper-1 model and will be ignored.
temperaturenumberNoThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
timestamp_granularities[]string[]NoThe timestamp granularities to populate for this transcription. response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.

openai_ai_create_translation

Translates audio into English. Parameters:
ParameterTypeRequiredDefaultDescription
filestringYesThe audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
modelobjectYesID of the model to use. Only whisper-1 (which is powered by our open source Whisper V2 model) is currently available.
promptstringNoAn optional text to guide the model’s style or continue a previous audio segment. The prompt should be in English.
response_formatstringNoThe format of the output, in one of these options: json, text, srt, verbose_json, or vtt.
temperaturenumberNoThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.

openai_ai_delete_chat_completion

Delete a stored chat completion. Only Chat Completions that have been created with the store parameter set to true can be deleted. Parameters:
ParameterTypeRequiredDefaultDescription
completion_idstringYesThe ID of the chat completion to delete.

openai_ai_delete_model

Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. Parameters:
ParameterTypeRequiredDefaultDescription
modelstringYesThe model to delete

openai_ai_delete_response

Deletes a model response with the given ID. Parameters:
ParameterTypeRequiredDefaultDescription
response_idstringYesThe ID of the response to delete.

openai_ai_get_chat_completion

Get a stored chat completion. Only Chat Completions that have been created with the store parameter set to true will be returned. Parameters:
ParameterTypeRequiredDefaultDescription
completion_idstringYesThe ID of the chat completion to retrieve.

openai_ai_get_chat_completion_messages

Get the messages in a stored chat completion. Only Chat Completions that have been created with the store parameter set to true will be returned. Parameters:
ParameterTypeRequiredDefaultDescription
completion_idstringYesThe ID of the chat completion to retrieve messages from.
afterstringNoIdentifier for the last message from the previous pagination request.
limitintegerNoNumber of messages to retrieve.
orderstringNoSort order for messages by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc.

openai_ai_get_response

Retrieves a model response with the given ID. Parameters:
ParameterTypeRequiredDefaultDescription
response_idstringYesThe ID of the response to retrieve.
includestring[]NoAdditional fields to include in the response. See the include parameter for Response creation above for more information.

openai_ai_list_chat_completions

List stored Chat Completions. Only Chat Completions that have been stored with the store parameter set to true will be returned. Parameters:
ParameterTypeRequiredDefaultDescription
modelstringNoThe model used to generate the Chat Completions.
metadataobjectNoA list of metadata keys to filter the Chat Completions by. Example: metadata[key1]=value1&metadata[key2]=value2
afterstringNoIdentifier for the last chat completion from the previous pagination request.
limitintegerNoNumber of Chat Completions to retrieve.
orderstringNoSort order for Chat Completions by timestamp. Use asc for ascending order or desc for descending order. Defaults to asc.

openai_ai_list_input_items

Returns a list of input items for a given response. Parameters:
ParameterTypeRequiredDefaultDescription
response_idstringYesThe ID of the response to retrieve input items for.
limitintegerNoA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
orderstringNoThe order to return the input items in. Default is asc. - asc: Return the input items in ascending order. - desc: Return the input items in descending order.
afterstringNoAn item ID to list items after, used in pagination.
beforestringNoAn item ID to list items before, used in pagination.
includestring[]NoAdditional fields to include in the response. See the include parameter for Response creation above for more information.

openai_ai_list_models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

openai_ai_retrieve_model

Retrieves a model instance, providing basic information about the model such as the owner and permissioning. Parameters:
ParameterTypeRequiredDefaultDescription
modelstringYesThe ID of the model to use for this request

openai_ai_update_chat_completion

Modify 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. Parameters:
ParameterTypeRequiredDefaultDescription
completion_idstringYesThe ID of the chat completion to update.
metadataobjectYesSet 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. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.