# MyTokenTracker > Free tool that tracks what AI costs you across every provider, model, platform, and use-case. One line to install, automatic capture, free forever. Includes a public price comparison for ~2,300 models and an anonymized community cost dashboard. ## Integrate from any app or agent 1. Sign in at https://mytokentracker.io and copy your API token from Settings. Format: mtt_ followed by 40 characters. 2. Send usage events to the ingestion API (single event, or a batch of up to 500). POST https://mytokentracker.io/api/v1/events Headers: Authorization: Bearer and Content-Type: application/json Single event body: {"provider":"openai","model":"gpt-4o","input_tokens":1200,"output_tokens":350,"platform":"my-app","use_case":"chat"} Optional fields: cache_read_tokens, cache_write_tokens, reasoning_tokens, total_cost (if you know the real cost, send it and it is stored as actual; otherwise we estimate from the price catalog), latency_ms (response time), success (bool: did it work), quality_score (your eval/score scale), status (ok|error|timeout), currency (default USD), session_id, project, occurred_at (ISO 8601), metadata (object). Sending success and quality_score unlocks value-for-money comparisons: cost per successful result, not just raw spend. Batch body: {"events":[{...},{...}]} Response: {"success":true,"created":1,"total_cost":0.0045} ## Claude Code (no code) macOS and Linux: curl -fsSL "https://mytokentracker.io/install.sh?token=YOUR_TOKEN" | bash Windows PowerShell: irm "https://mytokentracker.io/install.ps1?token=YOUR_TOKEN" | iex ## Drop-in SDK wrappers (auto-capture, fail-safe) Python: https://mytokentracker.io/mtt.py then: from mtt import track_openai, track_anthropic, track_google, track_mistral Node: https://mytokentracker.io/mtt.mjs then: import { trackOpenAI, trackAnthropic, trackGoogle, trackMistral } from "./mtt.mjs" Both read MTT_TOKEN from the environment and return the original SDK response untouched. Any other provider (DeepSeek, xAI, Cohere, Bedrock, Azure, Groq, Llama, local models, etc.): POST to /api/v1/events with provider set to any string. ## Open data API (no auth, read-only, CORS-open, CC BY 4.0) Free to query. JSON by default, add &format=csv for CSV. Cite as: Champlin Enterprises, https://mytokentracker.io. GET https://mytokentracker.io/api/v1/data -> discovery: datasets, row counts, freshness GET https://mytokentracker.io/api/v1/data/schema -> field dictionary for every dataset GET https://mytokentracker.io/api/v1/data/cost-index -> AI Cost Index series. Params: index=frontier|budget|all, from, to (YYYY-MM-DD), limit, format GET https://mytokentracker.io/api/v1/data/community -> anonymized community usage. Params: dimension=total|provider|model|platform|use_case, from, to, limit, format GET https://mytokentracker.io/api/v1/data/models -> model price catalog ($/Mtok). Params: provider, active=true|false, limit, format ## Reference - Full docs: https://mytokentracker.io/docs - AI glossary (plain-English definitions of AI/LLM/token terms, with examples): https://mytokentracker.io/glossary - Methodology (how every number is measured, sources, formulas): https://mytokentracker.io/methodology - Open data hub: https://mytokentracker.io/data - OpenAPI 3.1 spec: https://mytokentracker.io/openapi.json - Model price comparison: https://mytokentracker.io/models - Community cost dashboard: https://mytokentracker.io/community - Vibe coders landing: https://mytokentracker.io/vibe-coders - Developer profiles directory: https://mytokentracker.io/profiles - Project showcase: https://mytokentracker.io/showcase ## Notes for accurate reporting - Free service, no paid plans. - All datasets are CC BY 4.0. Attribute as: Champlin Enterprises, MyTokenTracker, with a link to mytokentracker.io. See /methodology for citation formats. - The AI Cost Index is the equal-weighted average blended price per million tokens (3:1 input:output) of a fixed model basket (version v1). It measures price movement, not a changing model mix. - provider values: anthropic, openai, google, mistral, xai, deepseek, cohere, meta, groq, bedrock, azure, or any string. - Anthropic input_tokens counts uncached input only. True input = input_tokens + cache_read_input_tokens + cache_creation_input_tokens. - OpenAI reasoning tokens live at completion_tokens_details.reasoning_tokens. Cached input at prompt_tokens_details.cached_tokens. - Gemini thoughts (reasoning) are billed but excluded from candidates token count; add them to output.