{
  "metadata": {
    "name": "apiroute.dev token waste check",
    "version": "0.1",
    "generated_at": "2026-05-28T06:00:00.000Z",
    "last_verified": "2026-05-28",
    "status": "ui_live_contract_available",
    "canonical_url": "https://apiroute.dev/api/token-waste-check",
    "json_url": "https://apiroute.dev/api/token-waste-check.json",
    "companion_ui": "https://apiroute.dev/#token-waste-check"
  },
  "purpose": "Agent-readable contract for comparing a selected model route with cheaper matching SLM, budget, or local-open alternatives before repeated prompts or multi-step agent loops spend tokens.",
  "input_model": {
    "selected_model": "Model name or source key selected in the homepage Token Waste Check UI.",
    "workload": {
      "use_case": "general | coding | rag | translation | vision | agents",
      "iterations": "Number of agent steps or repeated prompt calls.",
      "system_memory_tokens": "Repeated system, memory, instruction, and policy tokens.",
      "context_tokens_per_iteration": "Task, document, code, browser, or retrieved context tokens per iteration.",
      "tool_overhead_tokens_per_iteration": "Tool result, schema, and function-call overhead per iteration.",
      "output_tokens_per_iteration": "Expected generated output tokens per iteration.",
      "cache_share": "Estimated share of input tokens priced as cached input.",
      "requirements": "Capability gates such as vision, function calling, prompt caching, minimum context, and minimum output."
    }
  },
  "output_model": {
    "status": "high_waste | route_check | moderate_savings | efficient | no_route | loading",
    "selected_cost_usd": "Estimated cost of the selected model for one full run.",
    "cheaper_route_cost_usd": "Estimated cost of the cheapest matching route for one full run.",
    "savings_per_run_usd": "Selected route cost minus cheaper route cost.",
    "savings_percent": "Percent cheaper versus the selected route.",
    "projected_monthly_savings_usd_at_10_runs_per_day": "Planning projection for 10 repeated runs per day.",
    "cheaper_route_is_slm_or_budget": "True when the matching route is tagged budget, local-open, or known small/budget model family.",
    "recommendation": "Short operator-facing recommendation."
  },
  "status_labels": [
    {
      "id": "high_waste",
      "meaning": "Estimated cheaper route saves at least 75 percent versus the selected model. Test the cheaper route before routine use."
    },
    {
      "id": "route_check",
      "meaning": "Estimated cheaper route saves at least 40 percent. A route change is likely worth checking."
    },
    {
      "id": "moderate_savings",
      "meaning": "Estimated cheaper route saves at least 15 percent. Savings exist but quality and reliability may matter more."
    },
    {
      "id": "efficient",
      "meaning": "Selected route is close enough to the cheapest matching route for this planning estimate."
    },
    {
      "id": "no_route",
      "meaning": "No model matched the current hard filters for context, output, provider, and capability requirements."
    }
  ],
  "routing_policy": [
    "Filter by context window, max output tokens, pricing status, vision, function calling, and prompt caching before comparing prices.",
    "Use neutral wording such as token waste check, SLM routing, budget route, and model-route check.",
    "Do not present 'Token Speculation Mismatch' as an established field term unless a primary source verifies it.",
    "Commercial relationships, affiliate links, or sponsors must not influence neutral route ranking.",
    "Use the check as planning math only; verify provider pricing and quality before production routing."
  ],
  "worker_usage": {
    "recommended_fetch_order": [
      "https://apiroute.dev/api/agent-instructions",
      "https://apiroute.dev/api/live-prices",
      "https://apiroute.dev/api/recommend-route",
      "https://apiroute.dev/api/token-waste-check"
    ],
    "telegram_approval_note": "Workers may generate a draft recommendation from this contract, but publishing or social posting still requires manual Telegram approval.",
    "social_note": "If used for news-style posts, state the cost-routing insight transparently and avoid hidden advertising."
  },
  "related_endpoints": [
    "https://apiroute.dev/api/live-prices",
    "https://apiroute.dev/api/recommend-route",
    "https://apiroute.dev/api/route-recommendation-guide",
    "https://localai.apiroute.dev/data/routing-workloads.json"
  ],
  "caveat": "This is a rule-based planning contract. It is not a benchmark, provider guarantee, or financial recommendation."
}