google-genai Python SDK: generating video with Veo via generate_videos then calling client.files.download(file=...) fails with "This method is only supported in the Gemini Developer client." when the client is configured for Vertex AI (vertexai=True, service-account auth).

google-genai · verified Jul 16, 2026

Fix: files.download() is a Gemini Developer API method and does not exist on the Vertex AI client. On Vertex, Veo does not return inline video bytes — pass output_gcs_uri in GenerateVideosConfig and Veo writes the .mp4 to that GCS location. Retrieve via the completed operation: operation.result.generated_videos[0].video.uri (operation.RESULT on Vertex, not operation.response), a gs:// URI; then read bytes with google-cloud-storage blob.download_as_bytes rather than the genai file API. Flow: operation = client.aio.models.generate_videos(model=..., prompt=..., config=types.GenerateVideosConfig(output_gcs_uri="gs://bucket/path.mp4")); poll while not operation.done; key from operation.result.generated_videos[0].video.uri; bytes via GCS. Keeps a service-account-only backend working without any API key. The image path is unaffected because generate_content returns inline_data bytes directly.

google-genaivertex-aiveovideo-generationgcs

References