Token Usage Query
GET https://api.58api.net/api/usage/token with the current Bearer token returns that token's granted, used, and remaining quota, unlimited flag, model limits, and expiry.
What it does
Retrieve the current Bearer token's quota usage: total granted, used, available, unlimited flag, model limits and expiration time.
๐ฎ Endpoint
GET /api/usage/token- Requires Authorization header
- Returns usage info for the token used in the current request
๐ Authentication
Include the following header for API key authentication:
Authorization: Bearer $API_KEYsk-prefix is accepted but optional; the server normalizes it- Missing or invalid Authorization header returns 401
๐ก Request Example
curl -X GET https://api.58api.net/api/usage/token \
-H "Authorization: Bearer $API_KEY"โ Success Response Example
{
"code": true,
"message": "ok",
"data": {
"object": "token_usage",
"name": "Default Token",
"total_granted": 1000000,
"total_used": 12345,
"total_available": 987655,
"unlimited_quota": false,
"model_limits": {
"gpt-5.5": true
},
"model_limits_enabled": false,
"expires_at": 0
}
}โ Error Response Examples
- Missing Authorization header:
{
"success": false,
"message": "No Authorization header"
}- Invalid scheme (non-Bearer):
{
"success": false,
"message": "Invalid Bearer token"
}- Token fetch failed (e.g., invalid or deleted):
{
"success": false,
"message": "token not found"
}๐งพ Field Descriptions (data)
object: Alwaystoken_usagename: Token nametotal_granted: Total granted (= used + available)total_used: Used quotatotal_available: Remaining available quotaunlimited_quota: Whether the token has unlimited quotamodel_limits: Allowed model listmodel_limits_enabled: Whether model-specific limits are enabledexpires_at: Expiration Unix timestamp in seconds.0means never expires.
Wan Video API
Resolution, duration, ratio, keyframe, multi-reference (media array), Responses API usage and official billing rules for wan3.0-video and wan3.0-video-prime.
Authentication System Description (Auth)
How account endpoints under /api distinguish Public and User access, and how a system access token from Profile is sent with Authorization and New-Api-User.