跳到主要内容
YZ Index

API 文档

通过 API 获取赢政指数排行榜和变化数据

概述

赢政指数提供 RESTful JSON API,所有接口均为 GET 请求,无需认证,支持跨域访问(CORS)。返回数据编码为 UTF-8。

排行榜数据

GET /yz-index/api/rankings

获取指定维度的模型排行榜数据。默认返回最新一期公开评测(full run)的综合排名。

参数 类型 必填 说明
dimension string 可选 排序维度,可选值:coding knowledge longctx value stability overall,默认 overall
run_id int 可选 指定评测批次 ID。不传则使用最新公开批次
{ "ok": true, "run_id": 16, "dimension": "overall", "run": { "id": 16, "run_type": "full", "status": "done", "started_at": "2026-03-16 00:30:00", "finished_at": "2026-03-16 03:45:00", "formula_version": "v3", "judge_set_version": "v5", "benchmark_version": "v3" // ... 更多 run 字段 }, "rankings": [ { "model_slug": "claude-opus", "model_name": "Claude Opus 4", "model_version": "claude-opus-4-6-20250619", "provider": "anthropic", "coding": 89.5, "knowledge": 85.2, "longctx": 78.0, "value": 62.3, "stability": 91.0, "availability": 100.0, "overall": 82.7 } // ... 更多模型 ] }

本周变化

GET /yz-index/api/changes

获取指定周的模型排名变化数据。返回上升、下降、稳定三组模型列表及变化幅度。

参数 类型 必填 说明
week string 可选 周标签,格式 2026-W12。不传则返回最新一周
{ "ok": true, "week": "2026-W12", "weeks": ["2026-W12", "2026-W11", "2026-W10"], "up": [ { "model_slug": "gpt-4o", "model_name": "GPT-4o", "direction": "up", "delta": 3.2, "current_overall": 80.5, "previous_overall": 77.3, "provider": "openai" // ... 更多字段 } ], "down": [ // ... 下降的模型 ], "stable": [ // ... 持平的模型 ], "total": 8, "run": { "id": 16, "run_type": "full", "started_at": "2026-03-16 00:30:00", "model_count": 8 // ... 更多 run 字段 } }

指定维度和批次

GET /yz-index/api/rankings?dimension=coding&run_id=16

通过组合 dimensionrun_id 参数,获取特定评测批次下指定维度的排行榜。适合历史数据对比和特定维度深入分析。

参数 类型 必填 说明
dimension string 必填 排序维度,此例中为 coding,返回结果按编程能力分数降序排列
run_id int 必填 指定评测批次 ID,此例中为 16
{ "ok": true, "run_id": 16, "dimension": "coding", "run": { "id": 16, "run_type": "full", "status": "done" // ... 更多 run 字段 }, "rankings": [ { "model_slug": "claude-opus", "model_name": "Claude Opus 4", "coding": 89.5, "knowledge": 85.2, "longctx": 78.0, "value": 62.3, "stability": 91.0, "availability": 100.0, "overall": 82.7 // 按 coding 降序排列 } // ... 更多模型 ] }

错误处理

当服务端出现异常时,HTTP 状态码为 500,返回如下结构:

{ "ok": false, "error": "错误描述信息" }

当请求的 dimension 参数不在允许列表中时,会自动回退为 overall;当无可用评测数据时,返回空的 rankings 数组而非报错。