SPB Git

spb/llmindex Public

The discriminative, contamination-resistant, fully transparent LLM ranking — updated live.

TypeScript 77.9% TeX 15.2% Python 3.7% SQL 1.4% JavaScript 1.1% Shell 0.5%
948 B · 32 lines typescript
Raw Blame History
1/**2 * llmindex.io — GET /api/v1/efficiency (Pareto frontier data, live)3 * Author:  Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 * License: Proprietary — © Simon-Pierre Boucher, all rights reserved6 */7import { type NextRequest } from 'next/server';8import { getEfficiencyData } from '@/lib/data';9import { apiJson } from '@/lib/api';10import { rateLimit } from '@/lib/rate-limit';1112export const dynamic = 'force-dynamic';1314export async function GET(req: NextRequest) {15  const limited = await rateLimit(req);16  if (limited) return limited;17  const points = await getEfficiencyData();18  return apiJson({19    points: points.map((p) => ({20      model: p.slug,21      name: p.name,22      provider: p.provider,23      score: p.score,24      score_low: p.scoreLow,25      score_high: p.scoreHigh,26      latency_p50: p.latencyP50,27      cost_per_1k_items: Number(p.costPer1kItems.toFixed(4)),28      on_frontier: p.onFrontier,29    })),30  });31}32