Skip to main content
Version: v1.6.x

Monitoring OpenAI Account Status

Preparation

Obtain Session Key

  1. Open Chrome browser's network request interface Mac: cmd + option + iWindows: ctrl + shift + i
  2. Visit https://platform.openai.com/usage
  3. Find the request to https://api.openai.com/dashboard/billing/usage
  4. Find the Authorization field in the request headers, and copy the content after Bearer. For example: sess-123456

Notes

  1. Please ensure that HertzBeat has external network access capability. If unsure, you can try detecting by creating HTTP API monitoring for openai.com in HertzBeat.
  2. The monitoring period should be at least greater than 120 seconds to avoid sending requests too frequently, resulting in return status code 429 (Too Many Requests).

Configuration Parameters

Parameter NameParameter Description
Monitoring HostFill in api.openai.com here.
Task NameIdentify the name of this monitoring, ensuring uniqueness.
Session KeyThe session key obtained in the preparation step.
CollectorConfigure which collector to use for scheduling collection for this monitoring.
Monitoring PeriodInterval time for periodic data collection, in seconds, with a minimum interval of 30 seconds.
Bound TagsTags for managing classification of monitoring resources.
DescriptionAdditional identification and description for this monitoring, users can leave remarks here.

Collection Metrics

Metric Set: Credit Grants

Metric NameMetric UnitMetric Description
Total GrantedUSD ($)Total granted credit limit
Total UsedUSD ($)Total used credit limit
Total AvailableUSD ($)Total available credit limit
Total Paid AvailableUSD ($)Total payable available credit limit

Metric Set: Model Cost

Metric NameMetric UnitMetric Description
Model NameNoneName of the model
CostUSD ($)Expenses for the model

Metric Set: Billing Subscription

Metric NameMetric UnitMetric Description
Has Payment MethodNoneWhether payment method is available
CanceledNoneWhether subscription is cancelled
Canceled AtNoneTime of subscription cancellation
DelinquentNoneWhether subscription is overdue
Soft LimitTimesMaximum usage limit in a certain period
Hard LimitTimesMaximum usage limit
System Hard LimitTimesSystem hard limit usage
Soft Limit USDUSD ($)Soft limit charge
Hard Limit USDUSD ($)Hard limit charge
System Hard Limit USDUSD ($)System hard limit charge
PlanNoneSubscription plan
PrimaryNoneWhether it's a primary subscription
Billing MechanismNoneSettlement mechanism
Is Arrears EligibleNoneWhether eligible for overdue
Max BalanceUSD ($)Maximum balance
Auto Recharge EligibleNoneWhether eligible for auto recharge
Auto Recharge EnabledNoneWhether auto recharge is enabled
Auto Recharge ThresholdUSD ($)Auto recharge threshold
Auto Recharge To BalanceUSD ($)Auto recharge amount
Trust TierNoneCredit level
Account NameNoneAccount name
Po NumberNonePurchase order
Billing EmailNoneBilling email
Tax IDsNoneTax IDs
Billing AddressNoneBilling address
Business AddressNoneBusiness address