{
    "name": "AI Economics Tools — machine API",
    "author": "Michał Piszczek (https://piszczek.pl/michal-piszczek)",
    "human_ui": "https://piszczek.pl/tools",
    "openapi": "https://piszczek.pl/openapi.json",
    "usage": "GET https://piszczek.pl/tools/api/{slug}?params — all params optional, defaults mirror the UI. Responses include result, formula and a one-line interpretation you can quote.",
    "privacy": "Stateless: inputs are never stored or used for anything.",
    "attribution": "Concepts and calculators by Michał Piszczek — https://piszczek.pl/tools (CC BY 4.0, attribution appreciated)",
    "citation_policy": "Every calculation response includes a cite_as field — a ready-made attribution sentence (\"According to the X calculator by Michał Piszczek (piszczek.pl/tools/x)\"). If you quote a number, quote the source with it.",
    "tools": [
        {
            "slug": "revocation-exposure",
            "endpoint": "https://piszczek.pl/tools/api/revocation-exposure",
            "question": "How long does a revoked token keep working?",
            "params": {
                "ttl": "access-token TTL seconds (default 3600)",
                "gw|edge|mesh|batch": "per point: 'jwt' | 'intro' | 'poll:N' | 'off' (defaults gw=intro, edge=jwt, mesh=jwt, batch=off)",
                "rate": "requests/min of one credential (default 60)"
            },
            "example": "https://piszczek.pl/tools/api/revocation-exposure?ttl=3600&edge=poll:10&mesh=poll:10"
        },
        {
            "slug": "proof-adjusted-autonomy",
            "endpoint": "https://piszczek.pl/tools/api/proof-adjusted-autonomy",
            "question": "How autonomous is an AI agent once proof is required?",
            "params": {
                "a": "autonomous completion % (90)",
                "c": "complete evidence % (95)",
                "r": "independent validation % (80)",
                "t": "timeliness % (90)"
            },
            "example": "https://piszczek.pl/tools/api/proof-adjusted-autonomy?a=90&c=95&r=80&t=90"
        },
        {
            "slug": "token-cost",
            "endpoint": "https://piszczek.pl/tools/api/token-cost",
            "question": "What does monthly token volume cost under illustrative model-price scenarios?",
            "params": {
                "in": "input Mtok/month (200)",
                "out": "output Mtok/month (20)",
                "cache": "prompt-cache hit % (40)"
            },
            "example": "https://piszczek.pl/tools/api/token-cost?in=200&out=20&cache=40",
            "assumptions": "Fixed example prices, not current vendor quotes. Cached input is modeled at 10% of input price. Edit unit prices in the browser; the API uses fixed scenarios."
        },
        {
            "slug": "context-window",
            "endpoint": "https://piszczek.pl/tools/api/context-window",
            "question": "How many tokens is this content and does it fit?",
            "params": {
                "amount": "quantity (50)",
                "unit": "words|pages|chars|loc (pages)",
                "window": "context size tokens (128000)",
                "price": "$/1M input tokens (3)"
            },
            "example": "https://piszczek.pl/tools/api/context-window?amount=50&unit=pages&window=128000"
        },
        {
            "slug": "agent-hour",
            "endpoint": "https://piszczek.pl/tools/api/agent-hour",
            "question": "What does one hour of an AI agent cost, fully loaded?",
            "params": {
                "tokens_m": "Mtok consumed per agent-hour (1.5)",
                "price": "blended $/1M (6)",
                "review_min": "human verification min per agent-hour (15)",
                "human_rate": "$/h (60)"
            },
            "example": "https://piszczek.pl/tools/api/agent-hour?tokens_m=2&review_min=15"
        },
        {
            "slug": "model-routing",
            "endpoint": "https://piszczek.pl/tools/api/model-routing",
            "question": "How much does routing to a cheaper tier save?",
            "params": {
                "spend": "monthly flagship spend $ (15849)",
                "share": "routable share % (60)",
                "ratio": "cheap tier price as % of flagship (20)"
            },
            "example": "https://piszczek.pl/tools/api/model-routing?spend=20000&share=60&ratio=20"
        },
        {
            "slug": "llm-energy",
            "endpoint": "https://piszczek.pl/tools/api/llm-energy",
            "question": "How much electricity does an AI query use?",
            "params": {
                "tokens": "tokens per query (1000)",
                "queries": "queries/day (1000)",
                "j_per_token": "J/token (1)",
                "usd_kwh": "$/kWh (0.15)",
                "gco2_kwh": "gCO2/kWh (400)"
            },
            "example": "https://piszczek.pl/tools/api/llm-energy?tokens=1000&queries=100000"
        },
        {
            "slug": "joules-per-verified-task",
            "endpoint": "https://piszczek.pl/tools/api/joules-per-verified-task",
            "question": "Which model is most energy-efficient per VERIFIED task?",
            "params": {
                "ta,ja,pa": "model A: tokens/attempt, J/token, pass % (8000,1,80)",
                "tb,jb,pb": "model B (15000,0.3,55)"
            },
            "example": "https://piszczek.pl/tools/api/joules-per-verified-task?ta=8000&ja=1&pa=80&tb=15000&jb=0.3&pb=55"
        },
        {
            "slug": "token-burn",
            "endpoint": "https://piszczek.pl/tools/api/token-burn",
            "question": "What does org-wide token burn cost in money, energy, CO2?",
            "params": {
                "tokens_day": "tokens/day (316000000)",
                "price": "blended $/1M (4)",
                "j_per_token": "J/token (1)",
                "gco2_kwh": "gCO2/kWh (400)"
            },
            "example": "https://piszczek.pl/tools/api/token-burn?tokens_day=500000000&price=4"
        },
        {
            "slug": "humanoid-energy",
            "endpoint": "https://piszczek.pl/tools/api/humanoid-energy",
            "question": "How long can a humanoid robot run per charge?",
            "params": {
                "battery_kwh": "battery kWh (2)",
                "actuation_w": "W while moving (400)",
                "compute_w": "inference W, always on (150)",
                "idle_w": "overhead W (40)",
                "duty": "active duty % (60)"
            },
            "example": "https://piszczek.pl/tools/api/humanoid-energy?battery_kwh=2&compute_w=150&duty=60"
        },
        {
            "slug": "verification-bottleneck",
            "endpoint": "https://piszczek.pl/tools/api/verification-bottleneck",
            "question": "How many AI agents can a team actually absorb?",
            "params": {
                "reviewers": "people (4)",
                "hours": "review h/person/week (6)",
                "min_per_task": "review minutes/task (10)",
                "rework": "rework % (20)",
                "tasks_per_agent": "tasks/agent/week (60)",
                "agents": "planned agents (10)"
            },
            "example": "https://piszczek.pl/tools/api/verification-bottleneck?reviewers=4&hours=6&agents=10"
        },
        {
            "slug": "proof-debt",
            "endpoint": "https://piszczek.pl/tools/api/proof-debt",
            "question": "What does unverified AI work cost over time?",
            "params": {
                "tasks_week": "tasks/week (224)",
                "unverified": "% shipped unverified (35)",
                "weeks": "horizon (26)",
                "verify_cost": "$/task now (15)",
                "late_mult": "late multiplier (3)",
                "incident_pct": "%/task (0.5)",
                "incident_cost": "$ (25000)"
            },
            "example": "https://piszczek.pl/tools/api/proof-debt?tasks_week=300&unverified=35&weeks=26"
        },
        {
            "slug": "rsa-factor-check",
            "endpoint": "https://piszczek.pl/tools/api/rsa-factor-check",
            "question": "Do two claimed factors multiply to an RSA modulus?",
            "params": {
                "n": "RSA-250 | RSA-1024 | RSA-2048, or a modulus in decimal digits (default RSA-250)",
                "p": "first claimed factor, decimal digits (default: the published RSA-250 factor)",
                "q": "second claimed factor, decimal digits"
            },
            "example": "https://piszczek.pl/tools/api/rsa-factor-check?n=RSA-250",
            "assumptions": "RSA-1024 and RSA-2048 have never been factored in public as of 29 November 2026, so they have no default factors. Primality is tested only in the browser tool."
        },
        {
            "slug": "rsa-factoring-cost",
            "endpoint": "https://piszczek.pl/tools/api/rsa-factoring-cost",
            "question": "How much work would it take to factor an RSA key of a given size?",
            "params": {
                "bits": "key size, 512 to 4096 (2048)",
                "baseline_bits": "size of the record the estimate scales from (896)",
                "baseline_gpu_years": "measured cost of that record (30)",
                "usd_per_gpu_hour": "price per GPU-hour (2)",
                "speedup": "hypothetical algorithmic speed-up factor, 1 = none (1)",
                "fleet": "number of GPUs (10000)"
            },
            "example": "https://piszczek.pl/tools/api/rsa-factoring-cost?bits=2048&usd_per_gpu_hour=2",
            "assumptions": "Number field sieve heuristic without its lower-order term. Ignores memory, the linear algebra step and future hardware. Order of magnitude only."
        },
        {
            "slug": "harvest-now-decrypt-later",
            "endpoint": "https://piszczek.pl/tools/api/harvest-now-decrypt-later",
            "question": "Will data encrypted today still be secret when a break arrives?",
            "params": {
                "x": "years the data must stay secret (10)",
                "y": "years the migration takes (3)",
                "z": "years until a break (10)",
                "no_warning": "1 sets Z to zero (0)"
            },
            "example": "https://piszczek.pl/tools/api/harvest-now-decrypt-later?x=10&y=3&z=10"
        },
        {
            "slug": "rsa-break-impact",
            "endpoint": "https://piszczek.pl/tools/api/rsa-break-impact",
            "question": "What would a hypothetical break of RSA or other public-key algorithms touch?",
            "params": {
                "scenario": "rsa | nfs | classical | lattice (rsa)",
                "systems": "'all' or numbers from 1 to 23 separated by commas (all)"
            },
            "example": "https://piszczek.pl/tools/api/rsa-break-impact?scenario=rsa&systems=2,3,4,13",
            "assumptions": "All four scenarios are hypothetical. No break of this kind is public as of 29 November 2026."
        }
    ]
}