List All API Keys
Endpoint Path
http
GET /api/open/token/searchRate Limit
This endpoint follows Authentication Overview · Rate Limits: default max 10 requests per user per minute (shared with most other Open query APIs). Exceeding the limit returns HTTP 429.
Quota Calculation
Quota fields are internal units. Convert to CNY as follows:
Amount (¥) = quota ÷ quota_per_unit × usd_exchange_rateWhere:
quota: fromdata[].remain_quota(remaining) ordata[].used_quota(used); for monthly limits usedata[].monthly_quota_limit/data[].current_month_usedquota_per_unit,usd_exchange_rate,quota_display_type: from Query Conversion Parameters (GET /api/open/status)
If quota_display_type = USD, omit × usd_exchange_rate.
When unlimited_quota = true, token quota is unlimited; do not convert remain_quota as remaining balance.
Request Parameters
| Field | Type | Required | Description | Constraints | Example |
|---|---|---|---|---|---|
| p | int | No | Page number | Default 1 | 1 |
| page_size | int | No | Records per page | Default 10, max 100 | 20 |
| size | int | No | Records per page (alias) | Same as page_size | 20 |
| ps | int | No | Records per page (alias) | Same as page_size | 20 |
| keyword | string | No | Token name keyword | Fuzzy match on name | api-key |
| token | string | No | Key fragment | Fuzzy match on key; auto-strips sk- | abc123 |
| status | string | No | Token status | See enum below | 1 |
| group | string | No | Group name | Match group or groups | default |
| enterprise_id | int | No | Enterprise ID | Required for enterprise query | 1001 |
| scope | string | No | Query scope | See Scope enum; default mine | organization |
| organization_id | int | No | Department ID | Enterprise mode | 2001 |
| user_id | int | No | User ID filter | Filter by owner | 100 |
Request Example
json
GET 'https://neolink.com/backend/api/open/token/search?keyword=prod&status=1&scope=organization&organization_id=2001&p=1&page_size=20'
GET 'https://neolink.com/backend/api/open/token/search?token=abc1&scope=mine'
GET 'https://neolink.com/backend/api/open/token/search?group=default&scope=all&user_id=100'Return Information
| Field | Type | Required | Description | Remarks |
|---|---|---|---|---|
| success | bool | Yes | Request success indicator | Fixed value |
| message | string | Yes | Error message (empty if successful) | Fixed value |
| data | []Token | Yes | Token list | See table below |
| total | int | Yes | Total records | Total count of tokens matching criteria |
Token Object Fields
| Field | Type | Required | Description | Remarks |
|---|---|---|---|---|
| id | int | Yes | Token record ID | Database unique identifier |
| name | string | Yes | Token name | Custom name |
| key | string | Yes | Full API key | Open API returns the full key (not last-4 hint) |
| status | int | Yes | Token status | 1=Normal; 2=Disabled; 3=Expired; 4=Insufficient quota |
| created_time | int64 | Yes | Creation time | Unix second timestamp |
| accessed_time | int64 | No | Last access time | Unix second timestamp; 0 if never accessed |
| expired_time | int64 | Yes | Expiration time | Unix second timestamp; -1=Never expires |
| remain_quota | int64 | Yes | Remaining quota | Current available quota; see Quota Calculation above |
| used_quota | int64 | Yes | Used quota | Consumed quota; see Quota Calculation above |
| unlimited_quota | bool | Yes | Unlimited quota flag | true=Unlimited; false=Limited |
| user_id | int | Yes | Owner user ID | Creator user ID |
| enterprise_id | int | Yes | Enterprise ID | Belonging enterprise |
| organization_id | int | Yes | Organization ID | Belonging department |
| busi_type | int | Yes | Business type | 0=personal; 1=org member; 2=org direct (business API key) |
| group | string | Yes | Primary group | Default group name |
| groups | []string | Yes | Group array | All belonging groups |
| model_limits | string | Yes | Model restrictions | Comma-separated model list |
| model_limits_enabled | bool | Yes | Model limits enabled | true=Enabled; false=Disabled |
| allow_ips | string | Yes | IP whitelist | Comma-separated IPs or CIDR |
| monthly_quota_limit | int64 | Yes | Monthly quota limit | Maximum monthly quota limit |
| current_month | int | Yes | Current month | Format YYYYMM |
| current_month_used | int64 | Yes | Month used | Current month consumption |
| cross_group_retry | bool | Yes | Cross-group retry | true=Enabled; false=Disabled |
| created_by_member_id | int | Yes | Creator member ID | Enterprise creator member ID |
| member_display_name | string | Yes | Creator display name | Real name or nickname |
| member_username | string | Yes | Creator username | Login username |
| member_mobile_masked | string | Yes | Creator mobile (masked) | Only shows last 4 digits |
| creator_deleted | bool | Yes | Creator deleted flag | true=Deleted; false=Normal |
Response Example
json
{
"success": true,
"message": "",
"data": [
{
"id": 5001,
"name": "api-key-prod-1",
"key": "sk-xxxxxxxxxxxxxxxxxxxxxxxx",
"status": 1,
"created_time": 1711468800,
"accessed_time": 1711584000,
"expired_time": -1,
"remain_quota": 1000000,
"used_quota": 500000,
"unlimited_quota": false,
"user_id": 100,
"enterprise_id": 1001,
"organization_id": 2001,
"busi_type": 1
}
],
"total": 156
}