Skip to main content

Gcp/vertex Usage

@webframp/gcp/vertex-usagev2026.05.12.1· 8d agoMODELS
01README

GCP Vertex AI token usage monitoring — multi-project scanning of token_count metrics via the Cloud Monitoring API. Provides per-model breakdowns with input/output direction split and tokens-per-minute rates.

Authentication

Uses gcloud auth print-access-token (Application Default Credentials). Requires an authenticated gcloud CLI session.

Required Permissions

  • monitoring.timeSeries.list on each project

Usage

swamp model create @webframp/gcp/vertex-usage vertex-usage \
  --global-arg 'projects=["jw-cd-apps-ai","jw-avs-genmedia"]'

# Scan all projects
swamp model method run vertex-usage scan_projects

# Single project
swamp model method run vertex-usage get_token_usage --input project=jw-cd-apps-ai

Methods

  • scan_projects — Fan-out across all configured projects, per-model breakdown
  • get_token_usage — Single project with model breakdown
02Models1
@webframp/gcp/vertex-usagev2026.05.12.1gcp/vertex_usage.ts
fn scan_projects(days: number)
Fan-out scan across all configured GCP projects. Returns per-project token usage with model-level breakdown.
ArgumentTypeDescription
daysnumberLookback period in days
fn get_token_usage(project: string, days: number)
Get token usage for a single GCP project with model breakdown.
ArgumentTypeDescription
projectstringGCP project ID
daysnumberLookback period in days

Resources

scan_results(6h)— Multi-project Vertex AI token usage scan results
single_scan(6h)— Single project Vertex AI token usage scan
03Stats
A
100 / 100
Downloads
1
Archive size
10.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
04Platforms
05Labels