How TokenHawk works

No SDK to install, no code migration: TokenHawk slots in front of your existing integration and does the work on the fly, on every request.

1. Create a TokenHawk key

From your dashboard, in 2 minutes. You provide your provider keys (OpenAI, Anthropic, Gemini, Mistral) there — they're stored encrypted, never accessible in plain text, not even by us.

2. Configure your code

Change your LLM client's base URL to TokenHawk, use your TokenHawk API key instead of the provider's, and prefix your models with their provider (e.g. openai/gpt-4o). That's everything that changes in your code.

# Before
from openai import OpenAI

client = OpenAI(api_key="sk-...")

client.chat.completions.create(
    model="gpt-4o",
    messages=[...],
)

# After
from openai import OpenAI

client = OpenAI(
    api_key="thawk_...",
    base_url="https://tokenhawk.aittow.com/api/v1",
)

client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[...],
)

3. Full visibility

Every request is analyzed, sensitive data is masked or blocked, access is logged, and content is optimized before being forwarded to the provider.

Tokensup to -60%
OriginalOptimized
Security20+ guardrails
AllowedMaskedBlocked
Audit100% traced
Logged events

The big picture

Your AI agent
↔
TokenHawk
Monitor · Optimize · Secure
↔
LLM providers
OpenAIAnthropicGoogle GeminiMistral AIMore to come

Works with your agent framework

TokenHawk exposes OpenAI's Chat Completions API — any client that speaks this format goes through the proxy by changing its base URL alone. Here's where the most common frameworks stand.

LangGraphConfig required

Use the ChatOpenAI client (langchain-openai) rather than ChatAnthropic or ChatGoogleGenerativeAI, which talk to the provider directly.

Google ADKConfig required

Route through the LiteLlm wrapper rather than a native Gemini model, which talks to Google directly.

OpenAI Agents SDKConfig required

Use OpenAIChatCompletionsModel explicitly — the SDK's default model (Responses API) isn't supported.

AutoGen (AG2)Compatible

Native OpenAI-compatible client: add base_url and your TokenHawk key to your config_list.

CrewAICompatible

CrewAI's LLM wrapper is already OpenAI-compatible: add base_url and your TokenHawk key.

Anthropic Agent SDKNot supported

Speaks Anthropic's native Messages protocol, not Chat Completions — not routable through TokenHawk today.

Full code snippets for each framework in your dashboard's Getting Started page.

Security & privacy

Your data. Your keys. Our responsibility.

Security isn't a feature — it's the foundation.

Your API keys are protected

Credentials are encrypted (AES-256-GCM) and handled with strict access controls.

Your prompts stay yours

We do not use your data to train models. Retention is minimal and configurable.

EU-based infrastructure

TokenHawk is operated from the EU, with data handling designed for European businesses.

Transparent by design

Clear documentation on what data is processed, stored, and for how long.

Learn more about our security →

Test before you commit

Start safely, then scale.

You don't have to trust us with production on day one.

Test in a non-production environment

Use a test API key and your development environment. See exactly how TokenHawk works with your own traffic.

Move to production when ready

Once you're comfortable, switch to your production environment. No code changes required.

Keep your production and development keys separate, just as you do today.

Frequently asked questions

Do I need to change my application code?

No. Only the base URL and API key change. Your prompts, logic and tools stay identical.

How long does integration take?

A few minutes: create a key, change an environment variable, redeploy.

Which LLM providers are supported?

OpenAI, Anthropic, Google Gemini and Mistral AI today, with the ability to switch providers without rewriting your integration.

Can I test before going to production?

Yes — create a test key separate from your production key. See our Security page for the recommended practice.