Skip to main content
GET
Get usage
Query the cumulative spend over a specified time range (in USD).

Request

Query parameters

Maximum span 100 days.

Response

total_usage is in USD ×100 (i.e. 12.43 = $0.1243), consistent with OpenAI’s convention. However, the OpenPAI console / logs display in RMB; refer to the console for the exact conversion.

Finer granularity

For per-request logs, use Console → Logs, or the dedicated API:
It returns, for each call: model, tokens, latency, charge, Request ID, IP and more.

Client compatibility

NextChat / ChatBox / LobeChat and others call this endpoint to display spend trends in their UI; OpenPAI fully supports it so the client “Account info” panel works.