Gemini File Manager icon

Gemini File Manager

Manage files with Google Gemini Files API - upload, list, and manage files for AI workflows

File → Get

AI-generated

Summary

Retrieve metadata for a specified file.

Inputs

  • fileName (required) — The name/ID of the file (e.g., files/abc-123)
  • additionalOptions — Collection of additional options including Page Size, Page Token, and Timeout.

Output shape

the file's metadata object

Returns file metadata based on the specified file name. The additional options may affect pagination but are not required for the operation.

Examples

Example 1: Get metadata of a specific file

Specify 'fileName' with the file's ID.

Discussion