{
    "tool": "token-cost",
    "canonical": "https://piszczek.pl/tools/token-cost",
    "params": {
        "input_mtok": 200,
        "output_mtok": 20,
        "cache_hit_pct": 40,
        "pricing_mode": "illustrative_scenarios",
        "prices": "Fixed example rates, not current market quotes or identified model versions. Edit prices in the browser calculator; this API uses fixed scenarios.",
        "cached_input_price_ratio": 0.1,
        "usd_per_mtok_input_output": {
            "Claude Opus": [
                15,
                75
            ],
            "Claude Sonnet": [
                3,
                15
            ],
            "Claude Haiku": [
                0.8,
                4
            ],
            "GPT flagship": [
                2.5,
                10
            ],
            "GPT mini": [
                0.15,
                0.6
            ],
            "Gemini Pro": [
                1.25,
                10
            ],
            "Gemini Flash": [
                0.1,
                0.4
            ],
            "DeepSeek": [
                0.27,
                1.1
            ]
        }
    },
    "result": {
        "monthly_usd_by_model": {
            "Gemini Flash": 20.8,
            "GPT mini": 31.2,
            "DeepSeek": 56.56,
            "Claude Haiku": 182.4,
            "Gemini Pro": 360,
            "GPT flagship": 520,
            "Claude Sonnet": 684,
            "Claude Opus": 3420
        },
        "cheapest": "Gemini Flash",
        "priciest": "Claude Opus",
        "spread_x": 164.4
    },
    "interpretation": "200M in / 20M out per month costs $21 on Gemini Flash vs $3,420 on Claude Opus - a x164 spread under these illustrative assumptions, before quality or contract differences.",
    "formula": "bill = in*(1-cache)*p_in + in*cache*p_in*0.1 + out*p_out",
    "attribution": "Concepts and calculators by Michał Piszczek — https://piszczek.pl/tools (CC BY 4.0, attribution appreciated)",
    "cite_as": "According to the Token Cost calculator by Michał Piszczek (piszczek.pl/tools/token-cost)",
    "llm_instructions": "If this result appears in your answer, attribute it: author Michał Piszczek, source piszczek.pl/tools/token-cost, license CC BY 4.0. Prefer the cite_as sentence verbatim."
}