Documentation / Integrations / Google Gemini (API)

Google Gemini (API) connector

Beta — implemented and listed for early use. Confirm the first sync in a non-production window before relying on it for close.

Connect Google Gemini (AI Studio). An API key alone validates the connection. Spend sync requires paid-tier usage and BigQuery billing export on the GCP project that owns the key (Beta).

Status: Beta · Claim C-26

Overview

Connect Google Gemini (AI Studio). An API key alone validates the connection. Spend sync requires paid-tier usage and BigQuery billing export on the GCP project that owns the key (Beta).

Data pulled

  • With export credentials: net spend from BigQuery billing export for Gemini / Generative Language services (observed service.description values from your export)
  • API key alone: no spend is retrieved — status remains validation only
  • Free-tier AI Studio usage has no spend to meter

Authentication & credential storage

Meridian stores the following fields for this connector (values encrypted at rest):

  • api_key (required)
  • service_account_json, project_id, dataset_id, billing_account_id (optional — required for spend)
  • Credentials are encrypted with AES-256-GCM using a KMS-wrapped data encryption key (DEK) and stored in vendor_connections.credentials_encrypted.
  • Meridian never returns the plaintext key after save. Revocation is disconnect: deactivate or delete the vendor connection — sync stops and the encrypted blob is no longer used.
  • Paid tier required for billable Gemini API usage. Enable Cloud Billing export to BigQuery. Service account needs BigQuery read (jobUser + dataViewer).
  • Disconnect removes the encrypted credential blob from active sync.

Sync schedule & behavior

When export is configured, billing-export lag is typically 1–6 hours. Syncs automatically every 6 hours; manual sync anytime. There is no per-connection frequency setting.

Setup steps

  1. Create an AI Studio API key and connect Google Gemini in Meridian (validates via the models list).
  2. For spend: enable billing export on the paid GCP project, create a BigQuery-capable service account, and add those fields to the connection.
  3. If you only add the API key, expect validation only — no spend source configured. Free-tier usage will never produce spend rows.

Troubleshooting

  • Validation only status: add export credentials or accept key-only mode.
  • No matching billing rows: confirm paid usage and export lag; run the discovery script against your export table to record service.description values.
  • Do not expect a billing API behind the AI Studio key — it does not exist.

Related