Google GenAI SDK
The Google Gen AI SDK accepts anHttpOptions base URL. Point it at the gateway and the SDK’s generateContent calls route through it unchanged.
The SDK appends
/v1beta/... itself, so the base URL is just the gateway plus /w/{{app}}.Prerequisites
- A Caveman Cloud account with a gateway URL (
CAVE_GATEWAY_URL) - Your Cave API key (
CAVE_API_KEY) - Your Gemini provider key (
GEMINI_API_KEY)
Example
Raw HTTP / curl
No SDK is required. The gateway speaks each provider’s native protocol on its native path, bare or/w/-prefixed. Send the provider’s own request shape and headers.
OpenAI protocol (Chat Completions, Responses, embeddings)
Anthropic protocol
Labeling traffic with headers
Addx-cave-agent or x-cave-workflow headers to identify different parts of your system in Traces. These labels do not grant access; they only tag requests for filtering and analysis.
Next steps
- Query your traces with Caveman Cloud SQL
- Set up evaluations to measure workload quality
- Configure optimizations for eligible workloads