Get Current User Information
🔐 PAT required (User permission)
Returns the authenticated user's profile and three independent quota buckets: wallet, promotion, and subscriptions.
Base URL
https://api.autorouter.top— Production
Authentication
This endpoint requires a system access token (PAT) + Auto-Api-User. sk-xxx API Keys are not supported.
| Header | Description |
|---|---|
Authorization | System access token. Format: Bearer {system_access_token}. Generate it in Personal Center → Profile → Access Token. The Bearer prefix is optional. |
Auto-Api-User | Current logged-in user ID. Must match the user that owns the token. Copy it from Personal Center → Profile → User ID. |
Endpoints
GET /api/user/self
Get current user information
🔐 PAT required (User permission)
Responses
200: Success
Content-Type: application/json
401: Unauthorized
Response Fields
Top level
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
message | string | Error message; empty on success |
data | object | User profile and balance information |
data user fields
| Field | Type | Description |
|---|---|---|
id | integer | User ID |
username | string | Username |
display_name | string | Display name |
role | integer | Role: 1 user, 10 admin, 100 root |
status | integer | Account status |
email | string | Email address |
group | string | User group |
user_level_id | integer | Base membership level ID configured by admins |
user_level_name | string | Base membership level name |
effective_user_level_id | integer | Effective membership level ID at runtime |
effective_user_level_name | string | Effective membership level name at runtime |
quota | integer | Remaining wallet quota. Wallet balance only; does not include promotion or subscription quota |
quota_amount | number | Wallet balance amount |
promotion_quota | integer | Independent promotion quota, tracked separately from wallet quota |
promotion_amount | number | Independent promotion balance |
promotion_expires_at | integer | Promotion expiration time as a Unix timestamp in seconds; 0 when no promotion is available |
total_available_quota | integer | Current available quota total, calculated as quota + promotion_quota; does not include subscription quota |
used_quota | integer | Lifetime used quota. This is cumulative account usage and should not be interpreted as wallet-only consumption |
used_quota_amount | number | Lifetime used balance |
request_count | integer | Lifetime request count |
aff_code | string | Referral code |
aff_count | integer | Number of referred signups |
aff_quota | integer | Redeemable referral reward quota |
aff_history_quota | integer | Lifetime referral reward quota |
inviter_id | integer | Inviter user ID |
setting | string | User settings JSON string |
sidebar_modules | string | Sidebar module configuration |
stripe_customer | string | Stripe customer ID |
permissions | object | Permission configuration |
subscriptions | array | Independent subscription quota list; each item summarizes one active subscription (see below) |
github_id / discord_id / oidc_id / wechat_id / telegram_id / linux_do_id | string | Linked third-party account IDs; empty when not linked |
data.subscriptions[] subscription quota
| Field | Type | Description |
|---|---|---|
id | integer | Subscription record ID |
plan_id | integer | Subscription plan ID |
amount_total | number | Total subscription amount. Returns -1 for unlimited subscriptions |
amount_used | number | Used amount |
start_time | integer | Subscription start time (Unix timestamp, seconds) |
end_time | integer | Subscription end time (Unix timestamp, seconds) |
status | string | Subscription status; see table below |
Subscription status values
| Value | Description |
|---|---|
active | Active |
cancel_pending | Cancellation requested; still usable until the current period ends |
Quota field relationships
The response exposes three independent quota buckets:
| Type | Quota field | Amount field | Description |
|---|---|---|---|
| Wallet | quota | quota_amount | Remaining wallet balance |
| Promotion | promotion_quota | promotion_amount | Independent promotion credits with promotion_expires_at |
| Subscription | subscriptions[] | amount_total / amount_used | Independent subscription quota list, tracked per subscription |
total_available_quotacurrently sums wallet and promotion quota only:quota + promotion_quota. It does not include subscription quota fromsubscriptions.used_quotarepresents lifetime account usage, not wallet-only consumption.amount_total = -1in a subscription item means unlimited quota.
Request Examples
curl -X GET "https://api.autorouter.top/api/user/self" \
-H "Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN" \
-H "Auto-Api-User: YOUR_USER_ID"Response Example
{
"success": true,
"message": "",
"data": {
"id": 1,
"username": "admin",
"display_name": "Root User",
"role": 100,
"status": 1,
"email": "",
"group": "default",
"user_level_id": 1,
"user_level_name": "default",
"effective_user_level_id": 1,
"effective_user_level_name": "default",
"quota": 499833937905329,
"quota_amount": 999667875.810658,
"promotion_quota": 0,
"promotion_amount": 0,
"promotion_expires_at": 0,
"total_available_quota": 499833937905329,
"used_quota": 168868338185,
"used_quota_amount": 337736.67637,
"request_count": 12922181,
"aff_code": "zwRf",
"aff_count": 0,
"aff_quota": 0,
"aff_history_quota": 0,
"inviter_id": 0,
"github_id": "",
"discord_id": "",
"oidc_id": "",
"wechat_id": "",
"telegram_id": "",
"linux_do_id": "",
"setting": "{\"billing_preference\":\"wallet_first\",\"language\":\"zh\"}",
"stripe_customer": "",
"sidebar_modules": "",
"permissions": {
"sidebar_settings": false,
"sidebar_modules": {}
},
"subscriptions": [
{
"id": 12,
"plan_id": 3,
"amount_total": 100,
"amount_used": 25.5,
"start_time": 1756617600,
"end_time": 1759296000,
"status": "active"
}
]
}
}Video Editing
Edit an existing video with instruction-based editing and video transfer. Async task API: submit a request, receive a task_id, then poll for status to get the result.
Connect Agent Tools
AutoRouter is compatible with various popular AI applications and tools. Below is a list of verified supported applications and their configuration guides.