> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent with GCS File Input

> Pass files to Gemini straight from Google Cloud Storage with a gs:// URL and Vertex AI.

## Code

```python gcs_file_input.py theme={null}
"""GCS file input with Gemini.

Pass files directly from Google Cloud Storage (gs://) without downloading.
Supports files up to 2GB. Requires Vertex AI authentication.
"""

from agno.agent import Agent
from agno.media import File
from agno.models.google import Gemini

agent = Agent(
    model=Gemini(
        id="gemini-3.5-flash",
        vertexai=True,
    ),
    markdown=True,
)

agent.print_response(
    "Summarize this document and extract key insights.",
    files=[
        File(
            url="gs://cloud-samples-data/generative-ai/pdf/2312.11805v3.pdf",
            mime_type="application/pdf",
        )
    ],
)
```

## Usage

<Snippet file="create-venv-step.mdx" />

**1. Set up Vertex AI**

```bash theme={null}
gcloud auth application-default login
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"
```

**2. Install dependencies**

```bash theme={null}
uv pip install -U google-genai agno
```

**3. Run Agent**

Save the code above as `gcs_file_input.py`, then run:

```bash theme={null}
python gcs_file_input.py
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.