Getting Started · 4 min · Updated 2026-06-14

Installing the Python wrapper

Detailed installation guide for the Tokeven Python SDK

Requirements

  • Python 3.11+
  • An existing Anthropic, OpenAI, or Google AI SDK installation
  • A Tokeven ingest token (create one in Settings > Tokens)

Install via pip

pip install tokeven

Configuration

The wrapper reads your ingest token from the environment or accepts it directly:

# Option 1: Environment variable
export TOKEVEN_INGEST_TOKEN="tkv_ing_..."

# Option 2: Pass directly
tracked = TokevenAnthropic(client, ingest_token="tkv_ing_...")

Supported providers

  • Anthropic SDK — full support (v0.1), via TokevenAnthropic
  • OpenAI SDK — full support (v0.1), via TokevenOpenAI
  • Google AI SDK — full support (v0.1), via TokevenGemini

Verifying the installation

After wrapping your client, make a test call and check the dashboard. You should see the call appear within seconds.

Track your real costs

Calculators estimate. The dashboard shows what you actually spend and where you can save.