Upload media file from remote instead of file?

I’m uploading video files for transcription and OCR.

It starts with /upload start

https://generativelanguage.googleapis.com/upload/v1beta/files?key=mykey

… and then continues with upload finalize

https://generativelanguage.googleapis.com/upload/v1beta/files?key=mykey&upload_id=theuploadid&upload_protocol=resumable

(I’m sending the actual video).

But my question is this: is it possible to give Gemini the video from a remote location, not my direct environment?

HI @parakeet ,

Welcome to the forum!!

To give Gemini a video from a remote location without first transferring it to the environment where you are running the API call, the recommended approach is to:

1.Upload the video to Google Cloud Storage (GCS).

2.Use the Gemini model on Google Cloud Vertex AI.

3.Provide the GCS URI (gs://…) in your Vertex AI API request as the reference to the video file.

Thank you!!