If you are not sure whether you have a wrapped key or a CostHawk access token, read Wrapped Keys first.
Quick Setup
1
Create a wrapped key
Go to Dashboard → Integrations, click Create API Key, select Google, and paste your Google AI API key.
2
Copy your wrapped key
Copy the
ch_sk_... key that CostHawk generates.3
Update your code
Change the base URL and API key as shown below.
Proxy URL
https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent.
Code Examples
Python
Node.js
curl
Include the
model field in the request body. CostHawk uses it to construct the correct Google API URL (/v1beta/models/{model}:generateContent).Supported Models
All Google Gemini models work through the proxy, including:gemini-2.0-flashgemini-2.0-progemini-1.5-flashgemini-1.5-pro
