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).
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
- https://docs.cloud.google.com/vertex-ai/generative-ai/docs/samples/googlegenaisdk-videogen-with-img — Vertex AI google-genai video sample uses GenerateVideosConfig(output_gcs_uri=...), polls while not operation.done with client.operations.get(operation), and reads the result at operation.result.generated_videos[0].video.uri.
- https://docs.cloud.google.com/vertex-ai/generative-ai/docs/video/generate-videos-from-text — Veo on Vertex AI writes generated videos to a Cloud Storage bucket specified via output_gcs_uri, rather than returning inline bytes downloadable via the file API.