Skip to content

Query Enterprise Account Usage ​

Endpoint Path ​

http
GET /api/open/data/enterprise

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; default last 7 days1711468800
end_timestampint64NoEnd time (seconds)With start_timestamp; default current time1712073600
enterprise_idintYesEnterprise 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
dataQuotaStatsYesQuota statistics objectSee fields below

QuotaStats Object

FieldTypeRequiredDescriptionRemarks
enterprise_idintYesEnterprise IDEnterprise identifier
enterprise_namestringYesEnterprise nameEnterprise display name
total_quotaint64YesTotal quotaTotal granted quota for enterprise
used_quotaint64YesUsed quotaConsumed quota amount
remaining_quotaint64YesRemaining quotaAvailable quota remaining
quota_utilizationfloatYesUtilization ratePercentage of quota used
token_countintYesToken countNumber of active tokens
monthly_quota_limitint64YesMonthly limitMaximum monthly quota
current_month_usedint64YesMonth usedCurrent month consumption

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
    }
  ]
}