Skip to content

Query Enterprise Account Usage ​

Endpoint Path ​

http
GET /api/open/data/enterprise

Rate 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_rate

Where:

  • quota: from data[].quota returned by this endpoint
  • quota_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 ​

FieldTypeRequiredDescriptionConstraintsExample
start_timestampint64NoStart time (seconds)With end_timestamp; if either side is missing/0, both reset to last 7 days1711468800
end_timestampint64NoEnd time (seconds)With start_timestamp; if either side is missing/0, both reset to last 7 days1712073600
enterprise_idintNoEnterprise IDOptional; if provided, query specific enterprise1001
organization_idintNoDepartment IDOptional; if provided, query specific department1001
member_idintNoMember IDPass when querying self234

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 ​

FieldTypeRequiredDescriptionRemarks
successboolYesRequest success indicatorFixed value
messagestringYesError message (empty if successful)Fixed value
data[]QuotaDataYesArray of quota statistics recordsSee table below

QuotaData Object

FieldTypeRequiredDescriptionRemarks
idintYesRecord IDUnique database identifier
user_idintYesUser IDUser ID of the operator
usernamestringYesUsernameUser login name
model_namestringYesModel namee.g. "gpt-4", "gpt-3.5-turbo"
created_atint64YesCreation timeUnix timestamp in seconds
token_usedint64YesTokens consumedTotal tokens consumed within this period
quotaint64YesQuota amountQuota allocated for this period; for conversion see "Quota Calculation" above
countintYesCall countTotal number of calls within this period
enterprise_idintYesEnterprise IDOwning enterprise
organization_idintYesDepartment IDOwning department
member_idintYesMember IDMember ID within the enterprise
token_idintYesToken IDAssociated 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
    }
  ]
}