Skip to content

Google (Gemini & Vertex AI)

Gemini is available two ways: through Google AI (google, an API key) or through Vertex AI / Agent Platform (google-vertex, Application Default Credentials). Pick whichever matches how your org buys Google models.

The quickest path: a single API key.

  1. Create a key in Google AI Studio.
  2. Store it as GEMINI_API_KEY.
.crabd.yml
model: google/gemini-2.5-pro
providers:
allowlist: [google]
workflow
- uses: louisescher/crabd@v0
with:
model: google/gemini-2.5-pro
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}

Use google-vertex when you want Gemini billed and governed through Google Cloud. It authenticates with Application Default Credentials, a service-account key the runner can read.

  1. Set up Workload Identity Federation for the repository, so the runner gets a short-lived token and there’s no key to leak.
  2. Provide the ADC file path and your project/location via env.
.crabd.yml
model: google-vertex/gemini-2.5-pro
providers:
allowlist: [google-vertex]
workflow
- uses: google-github-actions/auth@v2
id: auth
with:
workload_identity_provider: projects/123/locations/global/workloadIdentityPools/gh/providers/gh
service_account: crabd@my-gcp-project.iam.gserviceaccount.com
- uses: louisescher/crabd@v0
with:
model: google-vertex/gemini-2.5-pro
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }}
GOOGLE_CLOUD_PROJECT: my-gcp-project
GOOGLE_CLOUD_LOCATION: us-central1