Skip to content
AISpendbook

Gateways and telemetry · Telemetry you send

SDK / HTTP ingestion

Send request-level AI usage (model, tokens, latency, customer, feature) from your services with the Python SDK or POST /api/v1/ingest/events and /ingest/batch.

How data moves
Your code, gateway or exporter sends request data to AI Spendbook with an ingestion key.
Credential
API key or token
What it covers
request telemetry
Money
An estimate priced by AI Spendbook, never a bill
Runs
push
Freshness
Events are available as soon as they are ingested.
Status
No vendor API to read: cost is an estimate from request telemetry.

Set it up

  1. Create an ingestion key under Settings → Ingestion keys; the secret is shown once.
  2. Install the SDK (pip install git+https://github.com/AISpendbook/aispendbook-python) or call POST /api/v1/ingest/events with Authorization: Bearer afk_….
  3. Send one event per model call with a unique event_id (retries are idempotent).
  4. Usage metadata is enough. Prompt and completion text is optional and is stored only when the workspace's data policy allows content capture.

What it needs

An ingestion key (afk_…) created under Settings → Ingestion keys (admin). Keys are scoped to ingestion endpoints only.

Every connector, by family

Start with your own numbers.

Every plan is free during launch. No credit card.