Data provided as an inline data part is encoded as base64 and included directly (inline) in the
request. For large files, see FileDataPart which references content by URI instead of
including the data in the request.
Important
Only small files can be sent as inline data because of limits on total request
sizes;
see input files and requirements
for more details and size limits.
[[["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 2025-08-27 UTC."],[],[],null,["# FirebaseAI Framework Reference\n\nInlineDataPart\n==============\n\n @available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)\n public struct InlineDataPart : ../Protocols/Part.html\n\nA data part that is provided inline in requests.\n\nData provided as an inline data part is encoded as base64 and included directly (inline) in the\nrequest. For large files, see [FileDataPart](../Structs/FileDataPart.html) which references content by URI instead of\nincluding the data in the request. \nImportant\n\nOnly small files can be sent as inline data because of limits on total request\nsizes;\nsee [input files and requirements](https://firebase.google.com/docs/vertex-ai/input-file-requirements#provide-file-as-inline-data)\nfor more details and size limits.\n- `\n ``\n ``\n `\n\n ### [data](#/s:10FirebaseAI14InlineDataPartV4data10Foundation0D0Vvp)\n\n `\n ` \n The data provided in the inline data part. \n\n #### Declaration\n\n Swift \n\n public var data: Data { get }\n\n- `\n ``\n ``\n `\n\n ### [mimeType](#/s:10FirebaseAI14InlineDataPartV8mimeTypeSSvp)\n\n `\n ` \n The IANA standard MIME type of the data. \n\n #### Declaration\n\n Swift \n\n public var mimeType: String { get }\n\n- `\n ``\n ``\n `\n\n ### [init(data:mimeType:)](#/s:10FirebaseAI14InlineDataPartV4data8mimeTypeAC10Foundation0D0V_SStcfc)\n\n `\n ` \n Creates an inline data part from data and a MIME type. \n Important\n\n Supported input types depend on the model on the model being used; see [input\n files and requirements](https://firebase.google.com/docs/vertex-ai/input-file-requirements)\n for more details. \n\n #### Declaration\n\n Swift \n\n public init(data: Data, mimeType: String)\n\n #### Parameters\n\n |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*data*` ` | The data representation of an image, video, audio or document; see [input files and requirements](https://firebase.google.com/docs/vertex-ai/input-file-requirements) for supported media types. |\n | ` `*mimeType*` ` | The IANA standard MIME type of the data, for example, `\"image/jpeg\"` or `\"video/mp4\"`; see [input files and requirements](https://firebase.google.com/docs/vertex-ai/input-file-requirements) for supported values. |"]]