跳转到主要内容
GET
/
billing
/
balance
/api/v1/billing/balance
curl --request GET \
  --url https://api.venice.ai/api/v1/billing/balance \
  --header 'Authorization: Bearer <token>'
{
  "canConsume": true,
  "consumptionCurrency": "DIEM",
  "balances": {
    "diem": 90.5,
    "usd": 25
  },
  "diemEpochAllocation": 100
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

响应

Successful response

Current balance information for the authenticated user

canConsume
boolean
必填

Whether the user has sufficient balance to make API requests

示例:

true

consumptionCurrency
enum<string> | null
必填

The currency that will be used for consumption (DIEM or USD)

可用选项:
USD,
VCU,
DIEM,
BUNDLED_CREDITS
示例:

"DIEM"

balances
object
必填
diemEpochAllocation
number
必填

Total DIEM allocation for the current epoch (from staking). Use with balances.diem to calculate usage percentage.

示例:

100