Query Enterprise Account Usage
Endpoint Path
http
GET /api/open/data/enterpriseRate 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 is an internal unit. Convert to CNY as follows:
Amount (¥) = quota ÷ quota_per_unit × usd_exchange_rateWhere:
quota: fromdata[].quotareturned by this endpointquota_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.
Request Parameters
| Field | Type | Required | Description | Constraints | Example |
|---|---|---|---|---|---|
| start_timestamp | int64 | No | Start time (seconds) | With end_timestamp; if either side is missing/0, both reset to last 7 days | 1711468800 |
| end_timestamp | int64 | No | End time (seconds) | With start_timestamp; if either side is missing/0, both reset to last 7 days | 1712073600 |
| enterprise_id | int | No | Enterprise ID | Optional; if provided, query specific enterprise | 1001 |
| organization_id | int | No | Department ID | Optional; if provided, query specific department | 1001 |
| member_id | int | No | Member ID | Pass when querying self | 234 |
Request Example
json
GET 'https://neolink.com/backend/api/open/data/enterprise?start_timestamp=1711468800&end_timestamp=1712073600&enterprise_id=1001'
GET 'https://neolink.com/backend/api/open/data/enterprise?enterprise_id=1001&member_id=234'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 | []QuotaData | Yes | Array of quota statistics records | See table below |
QuotaData Object
| Field | Type | Required | Description | Remarks |
|---|---|---|---|---|
| id | int | Yes | Record ID | Unique database identifier |
| user_id | int | Yes | User ID | User ID of the operator |
| username | string | Yes | Username | User login name |
| model_name | string | Yes | Model name | e.g. "gpt-4", "gpt-3.5-turbo" |
| created_at | int64 | Yes | Creation time | Unix timestamp in seconds |
| token_used | int64 | Yes | Tokens consumed | Total tokens consumed within this period |
| quota | int64 | Yes | Quota amount | Quota allocated for this period; for conversion see "Quota Calculation" above |
| count | int | Yes | Call count | Total number of calls within this period |
| enterprise_id | int | Yes | Enterprise ID | Owning enterprise |
| organization_id | int | Yes | Department ID | Owning department |
| member_id | int | Yes | Member ID | Member ID within the enterprise |
| token_id | int | Yes | Token ID | Associated Token record ID; 0 means no association |
Response Example
json
{
"success": true,
"message": "",
"data": [
{
"id": 1,
"user_id": 100,
"username": "john_doe",
"model_name": "gpt-4",
"created_at": 1711497600,
"token_used": 12500,
"quota": 62500,
"count": 25,
"enterprise_id": 1001,
"organization_id": 2001,
"member_id": 101,
"token_id": 0
}
]
}