InputImagePart

@Serializable
class InputImagePart(val imageUrl: String? = null, val fileId: String? = null, val detail: ImageDetail? = null) : ResponseContentPart

Image sent to the model, as input_image.

Exactly one of imageUrl and fileId must be set — the API answers 400 to a part carrying neither nor both. Both models the API serves read images; a model that cannot replace the part with a placeholder text. Images are accepted in user and developer messages and in the output of a tool call; in a system or assistant message they are rejected with 400.

Constructors

Link copied to clipboard
constructor(imageUrl: String? = null, fileId: String? = null, detail: ImageDetail? = null)

Properties

Link copied to clipboard

How much of the image's resolution reaches the model; ignored when fileId is set.

Link copied to clipboard

Identifier of an image uploaded through the Files API, of the form file-api-.... Mutually exclusive with imageUrl.

Link copied to clipboard

Either an http(s) link the API fetches (at most 8192 characters), or a base64 data URL that inlines the image (data:image/jpeg;base64,...). JPEG, PNG, GIF and WebP are supported. Mutually exclusive with fileId.

Link copied to clipboard
open override val type: String

Raw type discriminator of the part.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String