Skip to main content

Query Balance

Overview

The "Query Balance" API allows you to query the account balance.

Request

POST https://api.peperwork.ai/api/account/v2/getBalance

Request body

Name    Type   Mandatory   Description
modelIdstringtrueThe unique identifier of the model

Response body

Name          Type    Mandatory   Description
totalinttrueTotal quota
usedinttrueUsed quota
expireTimelongtrueExpiration time (millisecond timestamp)

Example request

curl -i -X POST https://api.peperwork.ai/api/account/v2/getBalance \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DOCAI_API_KEY" \
-d '{"modelId":"Your model Id"}'

Example response

{
"code": 200,
"data": [
{
"total": 10000,
"used": 3500,
"expireTime": 1735689600000
}
],
"requestId": "49bd854af81048358219e57ae3c607a9",
"currentTimeMillis": 1683797919008
}