Gemini File Manager icon

Gemini File Manager

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

File → Delete

AI-generated

Summary

Delete a specified file from the Gemini File Manager.

Inputs

  • fileName (required) — The name/ID of the file to delete (e.g., files/abc-123).
  • additionalOptions — Optional settings, such as timeout and pagination parameters.

Output shape

an object indicating success or failure of the deletion operation with a message.

Returns a success message if the file is deleted, or an error message if the deletion fails.

Examples

Example 1: Delete a file named files/abc-123

Set the 'File Name' parameter to 'files/abc-123' to delete this specific file.

Example 2: Attempt to delete a non-existent file

Provide a non-existing 'File Name'; expect an error message in the output.

Discussion