← Agent Data Hub · Search endpoints · /llms.txt

AI LLM Token Counter (BPE) & Multi-Model Inference Cost Calculator

Counts words, characters, and estimated BPE tokens (cl100k/o200k) for any prompt text and calculates exact API cost across GPT-4o, Claude 3.7 Sonnet, Gemini 2.5 Pro/Flash, and DeepSeek.

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/ai-tool-llm-token-cost-estimator?text=Calculate+the+exact+token+count+and+API+inference+cost+for+this+prompt+across+all+major+LLMs.&compact=1

Full metadata: without compact=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"ai-tool-llm-token-cost-estimator"}

Parameters

textPrompt text to analyze

Example response (live, compact)

{
  "apiId": "ai-tool-llm-token-cost-estimator",
  "data_freshness": "live",
  "data": {
    "tool": "ai-tool-llm-token-cost-estimator",
    "character_count": 93,
    "word_count": 16,
    "estimated_bpe_tokens": 25,
    "cost_for_1000_calls_usd": {
      "gemini_2_5_flash": 0.00375,
      "deepseek_v3": 0.00675,
      "gpt_4o": 0.0625,
      "claude_3_7_sonnet": 0.075
    }
  },
  "source": "100% Platform-Native Deterministic AI Core Utility (<1ms)",
  "license": "100% Platform-Owned Deterministic Algorithm (Commercial Use Allowed)"
}

Source & license

Source100% Platform-Native Deterministic AI Core Utility (<1ms)
License100% Platform-Owned Deterministic Algorithm (Commercial Use Allowed)
Source URLhttps://api-hub.internal/ai-core-tools/ai-tool-llm-token-cost-estimator
Termshttps://opensource.org/licenses/MIT
CategoryDeveloper, Tech & Web › AI Core Daily Tools