API 参考

通过 REST API 获取评测数据、提交中转站、查询排名。所有接口返回 JSON,Base URL 为 https://你的域名/proxybench/api

GET /rankings.php

获取中转站评测排名列表,支持分页与筛选。

Query 参数
limit返回条数,默认 20,最大 100
offset偏移量,默认 0
status按状态筛选:active / evaluating / pending
# 获取前 20 名活跃中转站 curl "https://你的域名/proxybench/api/rankings.php?limit=20&status=active" # 响应示例 { "data": [{ "id": 1, "rank": 1, "name": "ProxyHub", "base_url": "https://api.proxyhub.io/v1", "overall_score": 91.2, "grade": "A", "latency_ms": 187, "uptime_pct": 99.8, "models": ["openai","anthropic","google"] }], "total": 186, "limit": 20, "offset": 0 }

GET /proxies.php?id={id}

获取指定中转站的完整评测详情与最新评测数据。

curl "https://你的域名/proxybench/api/proxies.php?id=1"

POST /proxies.php

通过 API 提交新的中转站评测申请。需要 API Key 认证。

Body 参数必填 / 类型
name必填 · string · 中转站名称
base_url必填 · string · HTTPS API 地址
description可选 · string · 简介
models必填 · string[] · 模型列表
pricing_model可选 · string · official/custom/free
region可选 · string · 服务器区域
curl -X POST "https://你的域名/proxybench/api/proxies.php" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "MyProxy", "base_url": "https://api.example.com/v1", "description": "高性能中转服务", "models": ["openai", "anthropic", "deepseek"], "pricing_model": "official", "region": "sg" }'

认证方式

需要修改/提交数据的接口需通过 API Key 认证。API Key 在用户控制台中生成(功能规划中)。

# 通过 Authorization Header 传递 Authorization: Bearer pb_sk-xxxxxxxxxxxxxxxxxxxxxxxx # 当前阶段:API 提交接口已实现基础鉴权框架 # 可通过 session 登录后的网页表单提交,无需 API Key

错误响应

400请求参数有误
401未认证或 API Key 无效
404中转站不存在
429请求频率超限
广告位招租 970×90 底部横幅 · 立即购买
友情链接
暂无链接