ContentPart

Represents a content part in a message.

Content can be text, images, audio, or other media types. Each content part has a type field that identifies its structure.

See also

Inheritors

Types

Link copied to clipboard
@SerialName(value = "image_url")
data class ImageUrl(val type: String = "image_url", val imageUrl: ImageUrlObject) : ContentPart

Image URL content part.

Link copied to clipboard
@SerialName(value = "input_audio")
data class InputAudio(val type: String = "input_audio", val inputAudio: AudioInputObject) : ContentPart

Input audio content part.

Link copied to clipboard
@SerialName(value = "output_text")
data class OutputText(val type: String = "output_text", val text: String, val annotations: List<String> = emptyList()) : ContentPart

Output text content part (used in assistant responses).

Link copied to clipboard
@SerialName(value = "text")
data class Text(val type: String = "text", val text: String) : ContentPart

Text content part.