Check Balance
Request Address
GET https://api.moonshot.ai/v1/users/me/balanceExample request
curl https://api.moonshot.ai/v1/users/me/balance -H "Authorization: Bearer $MOONSHOT_API_KEY"Response
{
"code": 0,
"data": {
"available_balance": 49.58894,
"voucher_balance": 46.58893,
"cash_balance": 3.00001
},
"scode": "0x0",
"status": true
}Response Content Description
| Field | Description | Type | Unit |
|---|---|---|---|
| available_balance | The available balance, including cash balance and voucher balance. When it is less than or equal to 0, the user cannot call the inference API | float | USD |
| voucher_balance | The voucher balance, which cannot be negative | float | USD |
| cash_balance | The cash balance, which can be negative, indicating that the user owes money. When it is negative, available_balance is equal to the value of voucher_balance | float | USD |