import { useState, useMemo, useCallback, useRef, useEffect } from "react"; const TIERS = [ { id:1, name:"Basic", short:"Basic", desc:"Simple chat & summarization", bm:"MMLU <80%, GPQA <35%" }, { id:2, name:"Capable", short:"Capable", desc:"Solid knowledge, moderate coding", bm:"MMLU 80–88%, GPQA 35–55%" }, { id:3, name:"Professional", short:"Pro", desc:"Strong coding & reasoning", bm:"GPQA 55–75%, SWE 30–55%" }, { id:4, name:"Advanced", short:"Adv", desc:"Top reasoning, strong agentic", bm:"GPQA 75–90%, SWE 55–80%" }, { id:5, name:"Frontier", short:"Frontier", desc:"Current SOTA", bm:"GPQA >90%, SWE >78%" }, ]; const TC=["#94a3b8","#f59e0b","#3b82f6","#8b5cf6","#ef4444"]; const PC={OpenAI:"#10a37f",Anthropic:"#d4a27f",Google:"#4285f4",DeepSeek:"#818cf8",Meta:"#60a5fa",Mistral:"#fb923c",Moonshot:"#f472b6",Alibaba:"#fbbf24",MiniMax:"#2dd4bf",Zhipu:"#a78bfa",Xiaomi:"#f87171",xAI:"#c8c8c8",Microsoft:"#00a4ef"}; const dn=(y,m)=>y+(m-1)/12; const bl=(i,o)=>(3*i+o)/4; const MO=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; const dL=v=>{const y=Math.floor(v),m=Math.round((v-y)*12)+1;return `${MO[Math.min(m-1,11)]} '${String(y).slice(2)}`;}; const models=[ {tier:1,name:"GPT-3.5 Turbo",provider:"OpenAI",type:"closed",date:dn(2023,3),input:1.50,output:2.00,event:"launch"}, {tier:1,name:"GPT-3.5 Turbo",provider:"OpenAI",type:"closed",date:dn(2023,11),input:0.50,output:1.50,event:"cut"}, {tier:1,name:"GPT-3.5 Turbo 16K",provider:"OpenAI",type:"closed",date:dn(2023,6),input:3.00,output:4.00,event:"launch"}, {tier:1,name:"Claude Instant 1.2",provider:"Anthropic",type:"closed",date:dn(2023,3),input:1.63,output:5.51,event:"launch"}, {tier:1,name:"Llama 2 70B",provider:"Meta",type:"open",date:dn(2023,7),input:0.70,output:0.90,event:"launch"}, {tier:1,name:"Gemini 1.0 Pro",provider:"Google",type:"closed",date:dn(2023,12),input:0.50,output:1.50,event:"launch"}, {tier:1,name:"Claude 3 Haiku",provider:"Anthropic",type:"closed",date:dn(2024,3),input:0.25,output:1.25,event:"launch"}, {tier:1,name:"Gemini 1.5 Flash",provider:"Google",type:"closed",date:dn(2024,5),input:0.075,output:0.30,event:"launch"}, {tier:1,name:"Gemini 1.5 Flash",provider:"Google",type:"closed",date:dn(2024,10),input:0.0375,output:0.15,event:"cut"}, {tier:1,name:"Gemini 2.0 Flash Lite",provider:"Google",type:"closed",date:dn(2025,2),input:0.0375,output:0.15,event:"launch"}, {tier:1,name:"GPT-5 Nano",provider:"OpenAI",type:"closed",date:dn(2025,8),input:0.05,output:0.40,event:"launch"}, {tier:1,name:"Gemma 3N E4B",provider:"Google",type:"open",date:dn(2025,6),input:0.02,output:0.10,event:"launch"}, {tier:1,name:"Gemma 3 4B",provider:"Google",type:"open",date:dn(2025,3),input:0.017,output:0.068,event:"launch"}, {tier:2,name:"GPT-4 (8K)",provider:"OpenAI",type:"closed",date:dn(2023,3),input:30.00,output:60.00,event:"launch"}, {tier:2,name:"GPT-4 (32K)",provider:"OpenAI",type:"closed",date:dn(2023,3),input:60.00,output:120.00,event:"launch"}, {tier:2,name:"GPT-4 Turbo",provider:"OpenAI",type:"closed",date:dn(2023,11),input:10.00,output:30.00,event:"launch"}, {tier:2,name:"Claude 2.1",provider:"Anthropic",type:"closed",date:dn(2023,11),input:8.00,output:24.00,event:"launch"}, {tier:2,name:"Claude 3 Sonnet",provider:"Anthropic",type:"closed",date:dn(2024,3),input:3.00,output:15.00,event:"launch"}, {tier:2,name:"Gemini 1.5 Pro",provider:"Google",type:"closed",date:dn(2024,2),input:3.50,output:10.50,event:"launch"}, {tier:2,name:"Gemini 1.5 Pro",provider:"Google",type:"closed",date:dn(2024,7),input:1.25,output:5.00,event:"cut"}, {tier:2,name:"Llama 3 70B",provider:"Meta",type:"open",date:dn(2024,4),input:0.59,output:0.79,event:"launch"}, {tier:2,name:"Mixtral 8x22B",provider:"Mistral",type:"open",date:dn(2024,4),input:0.65,output:0.65,event:"launch"}, {tier:2,name:"GPT-4o Mini",provider:"OpenAI",type:"closed",date:dn(2024,7),input:0.15,output:0.60,event:"launch"}, {tier:2,name:"DeepSeek V2.5",provider:"DeepSeek",type:"open",date:dn(2024,9),input:0.14,output:0.28,event:"launch"}, {tier:2,name:"Llama 3.1 405B",provider:"Meta",type:"open",date:dn(2024,7),input:3.00,output:3.00,event:"launch"}, {tier:2,name:"Mistral Large 2",provider:"Mistral",type:"open",date:dn(2024,7),input:2.00,output:6.00,event:"launch"}, {tier:2,name:"Claude 3.5 Haiku",provider:"Anthropic",type:"closed",date:dn(2024,10),input:0.80,output:4.00,event:"launch"}, {tier:2,name:"Llama 3.3 70B",provider:"Meta",type:"open",date:dn(2024,12),input:0.88,output:0.88,event:"launch"}, {tier:2,name:"GPT-4.1 Nano",provider:"OpenAI",type:"closed",date:dn(2025,4),input:0.10,output:0.40,event:"launch"}, {tier:2,name:"Llama 4 Maverick",provider:"Meta",type:"open",date:dn(2025,4),input:0.27,output:0.85,event:"launch"}, {tier:2,name:"Gemma 3 27B",provider:"Google",type:"open",date:dn(2025,3),input:0.04,output:0.15,event:"launch"}, {tier:2,name:"Gemma 3 12B",provider:"Google",type:"open",date:dn(2025,3),input:0.04,output:0.13,event:"launch"}, {tier:2,name:"Mistral Small 3.1",provider:"Mistral",type:"open",date:dn(2025,3),input:0.20,output:0.60,event:"launch"}, {tier:2,name:"Grok 3 Mini",provider:"xAI",type:"closed",date:dn(2025,2),input:0.30,output:0.50,event:"launch"}, {tier:2,name:"Grok 4 Fast",provider:"xAI",type:"closed",date:dn(2025,9),input:0.20,output:0.50,event:"launch"}, {tier:2,name:"Llama 4 Scout",provider:"Meta",type:"open",date:dn(2025,4),input:0.15,output:0.40,event:"launch"}, {tier:3,name:"Claude 3 Opus",provider:"Anthropic",type:"closed",date:dn(2024,3),input:15.00,output:75.00,event:"launch"}, {tier:3,name:"GPT-4o",provider:"OpenAI",type:"closed",date:dn(2024,5),input:5.00,output:15.00,event:"launch"}, {tier:3,name:"GPT-4o",provider:"OpenAI",type:"closed",date:dn(2024,8),input:2.50,output:10.00,event:"cut"}, {tier:3,name:"Claude 3.5 Sonnet",provider:"Anthropic",type:"closed",date:dn(2024,6),input:3.00,output:15.00,event:"launch"}, {tier:3,name:"Claude 3.5 Sonnet v2",provider:"Anthropic",type:"closed",date:dn(2024,10),input:3.00,output:15.00,event:"launch"}, {tier:3,name:"o1-mini",provider:"OpenAI",type:"closed",date:dn(2024,9),input:3.00,output:12.00,event:"launch"}, {tier:3,name:"o3-mini",provider:"OpenAI",type:"closed",date:dn(2025,1),input:1.10,output:4.40,event:"launch"}, {tier:3,name:"DeepSeek V3",provider:"DeepSeek",type:"open",date:dn(2024,12),input:0.27,output:1.10,event:"launch"}, {tier:3,name:"Gemini 2.0 Flash",provider:"Google",type:"closed",date:dn(2024,12),input:0.10,output:0.40,event:"launch"}, {tier:3,name:"GPT-4.1",provider:"OpenAI",type:"closed",date:dn(2025,4),input:2.00,output:8.00,event:"launch"}, {tier:3,name:"GPT-4.1 Mini",provider:"OpenAI",type:"closed",date:dn(2025,4),input:0.40,output:1.60,event:"launch"}, {tier:3,name:"GPT-5 Mini",provider:"OpenAI",type:"closed",date:dn(2025,8),input:0.25,output:2.00,event:"launch"}, {tier:3,name:"Gemini 2.5 Flash",provider:"Google",type:"closed",date:dn(2025,6),input:0.30,output:2.50,event:"launch"}, {tier:3,name:"Kimi K2",provider:"Moonshot",type:"open",date:dn(2025,7),input:0.60,output:2.00,event:"launch"}, {tier:3,name:"Qwen 2.5 Max",provider:"Alibaba",type:"open",date:dn(2025,6),input:1.20,output:6.00,event:"launch"}, {tier:3,name:"Claude Haiku 4.5",provider:"Anthropic",type:"closed",date:dn(2025,11),input:1.00,output:5.00,event:"launch"}, {tier:3,name:"GPT-OSS-20B",provider:"OpenAI",type:"open",date:dn(2025,8),input:0.02,output:0.10,event:"launch"}, {tier:3,name:"MiniMax M2.5",provider:"MiniMax",type:"open",date:dn(2026,2),input:0.30,output:1.20,event:"launch"}, {tier:3,name:"GLM-4.7",provider:"Zhipu",type:"open",date:dn(2025,12),input:1.00,output:3.20,event:"launch"}, {tier:3,name:"Gemini 3 Flash",provider:"Google",type:"closed",date:dn(2026,2),input:0.50,output:3.00,event:"launch"}, {tier:3,name:"MiMo-V2-Flash",provider:"Xiaomi",type:"open",date:dn(2026,2),input:0.10,output:0.30,event:"launch"}, {tier:3,name:"Grok 3",provider:"xAI",type:"closed",date:dn(2025,2),input:3.00,output:15.00,event:"launch"}, {tier:3,name:"Grok 4.1 Fast",provider:"xAI",type:"closed",date:dn(2025,11),input:0.20,output:0.50,event:"launch"}, {tier:3,name:"Mistral Medium 3",provider:"Mistral",type:"open",date:dn(2025,5),input:0.40,output:2.00,event:"launch"}, {tier:3,name:"Qwen 3 235B",provider:"Alibaba",type:"open",date:dn(2025,4),input:0.18,output:0.54,event:"launch"}, {tier:4,name:"o1",provider:"OpenAI",type:"closed",date:dn(2024,9),input:15.00,output:60.00,event:"launch"}, {tier:4,name:"DeepSeek R1",provider:"DeepSeek",type:"open",date:dn(2025,1),input:0.55,output:2.19,event:"launch"}, {tier:4,name:"Claude Sonnet 4",provider:"Anthropic",type:"closed",date:dn(2025,6),input:3.00,output:15.00,event:"launch"}, {tier:4,name:"Claude Opus 4.1",provider:"Anthropic",type:"closed",date:dn(2025,6),input:15.00,output:75.00,event:"launch"}, {tier:4,name:"GPT-5",provider:"OpenAI",type:"closed",date:dn(2025,8),input:1.25,output:10.00,event:"launch"}, {tier:4,name:"o3",provider:"OpenAI",type:"closed",date:dn(2025,6),input:2.00,output:8.00,event:"launch"}, {tier:4,name:"Gemini 2.5 Pro",provider:"Google",type:"closed",date:dn(2025,6),input:1.25,output:10.00,event:"launch"}, {tier:4,name:"GPT-OSS-120B",provider:"OpenAI",type:"open",date:dn(2025,8),input:0.04,output:0.19,event:"launch"}, {tier:4,name:"DeepSeek V3.2",provider:"DeepSeek",type:"open",date:dn(2025,11),input:0.28,output:0.42,event:"launch"}, {tier:4,name:"Kimi K2.5",provider:"Moonshot",type:"open",date:dn(2026,1),input:0.60,output:3.00,event:"launch"}, {tier:4,name:"Claude Sonnet 4.5",provider:"Anthropic",type:"closed",date:dn(2025,11),input:3.00,output:15.00,event:"launch"}, {tier:4,name:"Claude Sonnet 4.6",provider:"Anthropic",type:"closed",date:dn(2026,2),input:3.00,output:15.00,event:"launch"}, {tier:4,name:"GLM-5",provider:"Zhipu",type:"open",date:dn(2026,1),input:1.50,output:5.00,event:"launch"}, {tier:4,name:"Grok 4",provider:"xAI",type:"closed",date:dn(2025,7),input:3.00,output:15.00,event:"launch"}, {tier:4,name:"GPT-5.1",provider:"OpenAI",type:"closed",date:dn(2025,11),input:1.25,output:10.00,event:"launch"}, {tier:4,name:"Qwen 3 Max",provider:"Alibaba",type:"closed",date:dn(2025,9),input:1.20,output:6.00,event:"launch"}, {tier:4,name:"Qwen3.5 Flash",provider:"Alibaba",type:"closed",date:dn(2026,2),input:0.10,output:0.40,event:"launch"}, {tier:4,name:"Qwen3.5 122B-A10B",provider:"Alibaba",type:"open",date:dn(2026,2),input:0.15,output:0.60,event:"launch"}, {tier:4,name:"Qwen3.5 35B-A3B",provider:"Alibaba",type:"open",date:dn(2026,2),input:0.08,output:0.30,event:"launch"}, {tier:4,name:"Qwen3.5 27B",provider:"Alibaba",type:"open",date:dn(2026,2),input:0.10,output:0.40,event:"launch"}, {tier:5,name:"Claude Opus 4.5",provider:"Anthropic",type:"closed",date:dn(2025,11),input:5.00,output:25.00,event:"launch"}, {tier:5,name:"Claude Opus 4.6",provider:"Anthropic",type:"closed",date:dn(2026,2),input:5.00,output:25.00,event:"launch"}, {tier:5,name:"GPT-5.2",provider:"OpenAI",type:"closed",date:dn(2025,12),input:1.75,output:14.00,event:"launch"}, {tier:5,name:"GPT-5.2 Pro",provider:"OpenAI",type:"closed",date:dn(2025,12),input:21.00,output:168.00,event:"launch"}, {tier:5,name:"Gemini 3 Pro",provider:"Google",type:"closed",date:dn(2025,11),input:2.00,output:12.00,event:"launch"}, {tier:5,name:"Gemini 3.1 Pro",provider:"Google",type:"closed",date:dn(2026,2),input:2.00,output:12.00,event:"launch"}, {tier:5,name:"Qwen3.5 397B",provider:"Alibaba",type:"open",date:dn(2026,2),input:0.50,output:2.50,event:"launch"}, ]; const edgeModels = [ {edge:"laptop",tier:1,name:"Llama 2 13B (Q4)",provider:"Meta",type:"open",date:dn(2023,7),input:0.20,output:0.20,event:"edge",notes:"First Basic-tier on laptop · M1+ 16GB",lag:"4mo after GPT-3.5",first:true}, {edge:"laptop",tier:2,name:"Mixtral 8x7B (Q4)",provider:"Mistral",type:"open",date:dn(2024,1),input:0.24,output:0.24,event:"edge",notes:"Capable MoE on 32GB MacBook · MMLU ~80%",lag:"10mo after GPT-4",first:true}, {edge:"laptop",tier:2,name:"Llama 3 70B (Q4)",provider:"Meta",type:"open",date:dn(2024,4),input:0.59,output:0.79,event:"edge",notes:"Capable on 64GB MacBook Pro · MMLU ~82%",lag:"13mo after GPT-4"}, {edge:"laptop",tier:3,name:"Llama 3.3 70B (Q4)",provider:"Meta",type:"open",date:dn(2024,12),input:0.35,output:0.40,event:"edge",notes:"Pro-tier on 64GB MacBook · matches GPT-4o",lag:"9mo after Claude 3 Opus",first:true}, {edge:"laptop",tier:3,name:"DeepSeek R1 32B (Q4)",provider:"DeepSeek",type:"open",date:dn(2025,1),input:0.12,output:0.18,event:"edge",notes:"Pro reasoning on 32GB MacBook · GPQA ~60%",lag:"10mo after Claude 3 Opus"}, {edge:"laptop",tier:3,name:"QwQ 32B (Q4)",provider:"Alibaba",type:"open",date:dn(2025,3),input:0.15,output:0.20,event:"edge",notes:"Strong reasoning on 32GB laptop",lag:"12mo after Claude 3 Opus"}, {edge:"laptop",tier:4,name:"DeepSeek R1 70B (Q4)",provider:"DeepSeek",type:"open",date:dn(2025,3),input:0.40,output:0.60,event:"edge",notes:"Advanced reasoning on 128GB Mac Studio",lag:"6mo after o1",first:true}, {edge:"laptop",tier:4,name:"Llama 4 Maverick (Q4)",provider:"Meta",type:"open",date:dn(2025,5),input:0.27,output:0.85,event:"edge",notes:"Advanced MoE on 64GB MacBook · heavy quant",lag:"8mo after o1"}, {edge:"laptop",tier:4,name:"Qwen3.5 35B-A3B (Q4)",provider:"Alibaba",type:"open",date:dn(2026,2),input:0.08,output:0.30,event:"edge",notes:"Adv-tier · only 3B active · runs on 21GB Mac! GPQA 81%",lag:"17mo after o1"}, {edge:"phone",tier:1,name:"Phi-2 2.7B",provider:"Microsoft",type:"open",date:dn(2023,12),input:0.10,output:0.10,event:"edge",notes:"First usable on-phone LLM · 4GB RAM",lag:"9mo after GPT-3.5",first:true}, {edge:"phone",tier:1,name:"Gemini Nano",provider:"Google",type:"closed",date:dn(2024,1),input:0.03,output:0.03,event:"edge",notes:"Built into Pixel 8 · on-device",lag:"10mo after GPT-3.5"}, {edge:"phone",tier:1,name:"Phi-3 Mini 3.8B",provider:"Microsoft",type:"open",date:dn(2024,4),input:0.08,output:0.08,event:"edge",notes:"MMLU 69% in your pocket",lag:"13mo after GPT-3.5"}, {edge:"phone",tier:1,name:"Llama 3.2 3B",provider:"Meta",type:"open",date:dn(2024,9),input:0.06,output:0.06,event:"edge",notes:"Meta's phone-optimized",lag:"18mo after GPT-3.5"}, {edge:"phone",tier:2,name:"Phi-4 Mini 3.8B",provider:"Microsoft",type:"open",date:dn(2025,2),input:0.07,output:0.07,event:"edge",notes:"First Capable-tier phone model · MMLU 82%",lag:"23mo after GPT-4",first:true}, {edge:"phone",tier:2,name:"Gemma 3N E4B",provider:"Google",type:"open",date:dn(2025,6),input:0.02,output:0.10,event:"edge",notes:"Designed for phones · shared GPU memory",lag:"27mo after GPT-4"}, ]; function expFit(pts){ const p=pts.filter(q=>q.y>0); if(p.length<3)return null; const x0=p[0].x; let sx=0,sy=0,sxx=0,sxy=0; for(const q of p){const cx=q.x-x0,ly=Math.log(q.y);sx+=cx;sy+=ly;sxx+=cx*cx;sxy+=cx*ly;} const n=p.length,den=n*sxx-sx*sx; if(Math.abs(den)<1e-10)return null; const b_=(n*sxy-sx*sy)/den,a_=Math.exp((sy-b_*sx)/n); if(!isFinite(a_)||!isFinite(b_))return null; return{a:a_,b:b_,fn:x=>a_*Math.exp(b_*(x-x0))}; } function linScale(domain,range){ const[d0,d1]=domain,[r0,r1]=range; const m=(r1-r0)/(d1-d0); return v=>r0+m*(v-d0); } function logScale(domain,range){ const[d0,d1]=domain,[r0,r1]=range; const ld0=Math.log(d0),ld1=Math.log(d1); const m=(r1-r0)/(ld1-ld0); return v=>{ const lv=Math.log(Math.max(v,d0)); return r0+m*(lv-ld0); }; } const Tab=({active,onClick,children})=>(); const Toggle=({value,onChange,label})=>(); const Chip=({active,onClick,color,children})=>(); function Chart({data,tierTrends,tierDat,selT,hov,trend,useLog,pt,width,height,edgeOn,edgeData}){ const mg={top:15,right:25,bottom:55,left:70}; const w=width-mg.left-mg.right, h=height-mg.top-mg.bottom; const [tip,setTip]=useState(null); const xD=[2023.1,2030.2], yD=useLog?[0.001,200]:[0,200]; const sx=linScale(xD,[0,w]); const sy=useLog?logScale(yD,[h,0]):linScale(yD,[h,0]); const xTicks=[2024,2025,2026,2027,2028,2029,2030]; const xTickLabel=v=>{ const y=Math.floor(v); const m=Math.round((v-y)*12)+1; if(m===1)return `${y}`; return `${MO[Math.min(m-1,11)]} '${String(y).slice(2)}`; }; const yTicks=useLog?[0.001,0.003,0.01,0.03,0.06,0.1,0.3,0.6,1,3,6,10,30,60,100,200]:[0,25,50,75,100,125,150,175,200]; const NOW = 2026.2; const nowPx = sx(NOW); const trendPaths=useMemo(()=>{ if(!trend)return[]; const paths=[]; for(const t of TIERS){ if(!selT.has(t.id)||!tierTrends[t.id])continue; const{fit}=tierTrends[t.id]; const dd=tierDat[t.id]; if(!dd||dd.length<3)continue; const xs=dd.map(m=>m.date); const dataXMin=Math.min(...xs)-0.05, dataXMax=Math.max(...xs)+0.05; const buildPath=(x0,x1)=>{ let d="",count=0; for(let x=x0;x<=x1;x+=0.008){ const y=fit.fn(x); if(y<0.0005||y>300)continue; const px=sx(x),py=sy(y); if(!isFinite(px)||!isFinite(py))continue; if(py<-10||py>h+10)continue; d+=(count===0?`M${px.toFixed(1)},${py.toFixed(1)}`:` L${px.toFixed(1)},${py.toFixed(1)}`); count++; } return count>=2?d:null; }; const solidD=buildPath(dataXMin, dataXMax); const projD=buildPath(dataXMax-0.01, 2030.1); paths.push({id:t.id, solidD, projD, color:TC[t.id-1]}); } return paths; },[trend,selT,tierTrends,tierDat,sx,sy,h]); return(
LLM API PRICING · 2023–2026 DATA · PROJECTED TO 2030
Solid = best-fit · Dashed = projected to 2030 · ⭐ laptop / 📱 phone edge milestones · Hover tier labels to isolate
}First price vs cheapest today at each capability level
Tiers: GPQA Diamond, SWE-bench, MMLU composites. Prices: Launch = provider announcement. Cut = pricing page change. Trendlines: Least-squares exponential fit on log-price vs time. Half-life = ln(2)/|b|. Blended: (3×input + output)/4. Edge: ⭐ = runs on MacBook Pro (Apple Silicon), 📱 = runs on iPhone/Android. Prices via OpenRouter. X-axis icons mark first time each tier reached that device.