Skip to main content
The Anthropic SDKs work with Caveman Cloud by setting their baseURL to the gateway. The SDK appends /v1/messages itself, and the gateway speaks Anthropic’s protocol natively, so nothing is translated. Claude Pro/Max OAuth bearer tokens pass through unchanged.

Prerequisites

  • A Caveman Cloud account with a gateway URL (CAVE_GATEWAY_URL)
  • Your Cave API key (CAVE_API_KEY)
  • Your Anthropic provider key (ANTHROPIC_API_KEY)

Anthropic SDK (TypeScript)

Replace {{app}} with your workload name or app slug.

Anthropic SDK (Python)

When your provider key is stored in Caveman Cloud, you can drop the x-cave-upstream-key header and pass CAVE_API_KEY in its place.

Labeling traffic

Add x-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