Cannot Access Filename of Uploaded Video in Google AI Studio

Hello,

I’m experiencing an issue with Google AI Studio where I cannot access or retrieve the filename of videos I’ve uploaded to the platform.

Details of the issue:

  • When uploading a video file to Google AI Studio, I need to programmatically access the original filename
  • The platform appears to accept the video upload but doesn’t provide a way to reference the original filename
  • I’ve tried uploading both directly from my computer and from Google Drive

What I’ve already tried:

  • Different video formats and sizes
  • Different browsers
  • Uploading through different methods (direct upload, Google Drive)

Is there a supported way to access the original filename of uploaded videos in Google AI Studio? If this functionality isn’t currently available, is there a workaround or alternative approach you could suggest?

I’ve seen that video uploads have experienced some issues recently according to other forum posts, so I’m wondering if this might be related to those problems or if it’s a separate limitation.

Thank you for your assistance!

@MaxNewman,

The gemini api doesn’t store meta data information like file names . there is no supported way to retrieve this information.

however, if you are using Gemini API and Files API to upload the files, you can retrieve a unique file name from the file object.

following a simple snippet that can retrieve this info

client = genai.Client(api_key=GOOGLE_API_KEY)

myfile = client.files.upload(file='video0.mp4')

file_name = myfile.name

print(myfile.name)

Note: this is not the name of the original file , but a unique file name givign by the api whil you upload