Google Vertex AI with LangSpend

← Back to Home

Track Google Vertex AI model costs with zero-code attribution

Google Vertex AI Integration

Learn how to track Google Vertex AI model costs with LangSpend. Works with Gemini, PaLM, and other Vertex AI models.

Installation

Install required packages

terminal

Basic Setup

Wrap your Vertex AI client

vertex-ai.ts

Gemini 2.0 Flash

Gemini 2.0 Flash Example with Customer & Feature Tracking

💡 Custom Metadata: Use the meta property in customer and feature objects to pass any custom properties for advanced tracking and analytics.

gemini-example.ts