[ Web Proxy ]
URL:
Viewing: https://firebase.google.com/docs/reference/kotlin/com/google/firebase/ai/type/ImagePart [Back]  [Original]

ImagePart  |  Firebase SDKs for Android Skip to main content
Overview Fundamentals AI Build Run Reference Samples
Firebase [Firebase]
Send feedback Stay organized with collections Save and categorize content based on your preferences.

ImagePart

class ImagePart : Part


Represents image data sent to and received from requests. The image is converted client-side to JPEG encoding at 80% quality before being sent to the server.

Summary

Public companion functions

ImagePart
@PublicPreviewAPI
createWithThinking(
    image: Bitmap,
    displayName: String?,
    isThought: Boolean,
    thoughtSignature: String?
)

Creates an ImagePart with advanced thinking metadata.

Public constructors

ImagePart(image: Bitmap)
ImagePart(image: Bitmap, displayName: String)

Public properties

String?
Bitmap
open Boolean
String?

Public companion functions

createWithThinking

@PublicPreviewAPI
fun createWithThinking(
    image: Bitmap,
    displayName: String?,
    isThought: Boolean,
    thoughtSignature: String?
): ImagePart

Creates an ImagePart with advanced thinking metadata.

Parameters
image: Bitmap

Bitmap to convert into a Part.

displayName: String?

The name of the file, including the extension.

isThought: Boolean

Indicates whether the response is a thought.

thoughtSignature: String?

The signature associated with the thought, if any.

Public constructors

ImagePart

ImagePart(image: Bitmap)
Parameters
image: Bitmap

Bitmap to convert into a Part

ImagePart

ImagePart(image: Bitmap, displayName: String)
Parameters
image: Bitmap

Bitmap to convert into a Part

Public properties

displayName

val displayNameString?

image

val imageBitmap

isThought

open val isThoughtBoolean

thoughtSignature

val thoughtSignatureString?
Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-07-09 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-07-09 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page