限额和用量
返回当前生效的限额与实时用量。限额按用户统计,多建 Key 不会提高额度。
GEThttps://geo-api.geoeval.com/v1/account
需在 Authorization 请求头中传入 API Key。 前往下方在线调试
请求示例
curl "https://geo-api.geoeval.com/v1/account" \ -H "Authorization: Bearer $GEOEVAL_API_KEY"const response = await fetch(`https://geo-api.geoeval.com/v1/account`, { headers: { Authorization: `Bearer ${process.env.GEOEVAL_API_KEY}`, },});const data = (await response.json()) as Record<string, unknown>;if (!response.ok) throw new Error(`${data.code}: ${data.message}`);console.log(data);import os
import requests
response = requests.get( "https://geo-api.geoeval.com/v1/account", headers={ "Authorization": f"Bearer {os.environ['GEOEVAL_API_KEY']}", }, timeout=30,)response.raise_for_status()print(response.json())响应 200
user_idstring你的用户 ID。
statusstring账号状态:active。
limitsobject账号级限额 (所有 Key 合计)。
子字段: limits
enqueue_rpminteger每分钟可提交的 query 数上限。
max_inflight_tasksinteger同时未结束的任务数上限。
daily_task_limitinteger每日 (UTC) 可提交的任务数上限。
usageobject当前用量。
子字段: usage
queries_last_minuteinteger过去 60 秒内受理的 query 数。
inflight_tasksinteger进行中 query 的任务数。
tasks_todayinteger今日 (UTC) 已受理的任务数。
api_keysinteger持有的 API Key 数量。
响应示例
{ "user_id": "01a224f1-0b7e-7f10-9a44-2c1d5e8b7a31", "status": "active", "limits": { "enqueue_rpm": 60, "max_inflight_tasks": 200, "daily_task_limit": 5000 }, "usage": { "queries_last_minute": 0, "inflight_tasks": 2, "tasks_today": 12, "api_keys": 1 }}错误
所有接口还可能返回 400、401、403 或 500,详见错误.