All endpoints require a normal or admin session cookie (requireApiAuth(['normal', 'admin'])). POST /proxy/refresh additionally requires the admin role.
Returns usage data for all configured providers. It prefers latest cached records; if no cached record exists for a provider, the server may fetch live data for that provider and persist it.
normal or admin session cookie.
curl -b cookies.txt -X POST http://localhost:3001/api/proxy/latest{
"success": true,
"data": [
{
"id": "prov_abc123",
"provider": "claude",
"name": "My Claude",
"region": null,
"refreshInterval": 5,
"identity": { "plan": "Pro" },
"progress": [
{
"name": "Fast Requests",
"desc": null,
"usedPercent": 45,
"remainingPercent": 55,
"used": 225,
"limit": 500,
"windowMinutes": 10080,
"resetsAt": 1741910400,
"resetDescription": "Resets weekly"
}
],
"updatedAt": 1741824000
},
{
"id": "prov_err456",
"provider": "kimi",
"code": "UNKNOWN",
"message": "No data available",
"timestamp": 1741824000
}
]
}Each item in the array is either a usage record (contains progress) or an error record (contains code). Distinguish them by checking for the progress field.
Usage record fields:
| Field | Type | Description |
|---|---|---|
id |
string | Provider ID |
provider |
string | Provider type |
name |
string|null | Provider display name |
region |
string | Region identifier |
refreshInterval |
number | Provider refresh interval (minutes) |
identity.plan |
string | Subscription plan (e.g. Pro, Starter) |
progress |
array | Progress item array |
progress[].usedPercent |
number | Percentage used; may exceed 100 for overquota scenarios |
progress[].resetsAt |
number|null | Reset timestamp (Unix seconds) |
updatedAt |
number | Data timestamp (Unix seconds) |
Error record fields:
| Field | Type | Description |
|---|---|---|
id |
string | Provider ID |
provider |
string | Provider type |
code |
string | Error code |
message |
string | Error message |
timestamp |
number | Unix seconds |
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED |
Not authenticated |
| 500 | LATEST_ERROR |
Server error |
Refreshes all configured providers with the same per-provider protection rules used by single refresh (recent-cache reuse and failure cooldown). Admin only. May take several seconds depending on the number of providers.
admin session cookie.
curl -b cookies.txt -X POST http://localhost:3001/api/proxy/refreshSame structure as /proxy/latest. Each provider item may additionally include:
fromCache: truewhen recent data was reused.stale: trueandstaleAtwhen fallback cached data is returned after a fetch failure/cooldown.fetchErrorandauthRequiredfor degraded fallback responses.
| Status | Code | Description |
|---|---|---|
| 403 | FORBIDDEN |
Not an admin |
| 500 | REFRESH_ERROR |
Batch refresh failed |