OpenAI API

Audio content part

object

Learn about audio inputs.

typestringrequired

The type of the content part. Always input_audio.

Allowed values:input_audio

input_audioobjectrequired
Show Child Parameters
Example

Image content part

object

Learn about image inputs.

typestringrequired

The type of the content part.

Allowed values:image_url

image_urlobjectrequired
Show Child Parameters
Example

Refusal content part

object
typestringrequired

The type of the content part.

Allowed values:refusal

refusalstringrequired

The refusal message generated by the model.

Example

Text content part

object

Learn about text inputs.

typestringrequired

The type of the content part.

Allowed values:text

textstringrequired

The text content.

Example

System message

object

Developer-provided instructions that the model should follow, regardless of
messages sent by the user. With o1 models and newer, use developer messages
for this purpose instead.

contentOne Of
required

The contents of the system message.

Text contentstring

The contents of the system message.

rolestringrequired

The role of the messages author, in this case system.

Allowed values:system

namestring

An optional name for the participant. Provides the model information to differentiate between participants of the same role.

Example