curl "https://api.magpipe.ai/functions/v1/get-credits-info" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"credits_balance": 45.23,
"credits_used_this_period": 74.77,
"has_payment_method": true,
"auto_recharge_enabled": true,
"auto_recharge_amount": 50.00,
"auto_recharge_threshold": 5.00,
"received_signup_bonus": true
}
Billing
Get Credit Balance
Get current credit balance and billing information
GET
/
get-credits-info
curl "https://api.magpipe.ai/functions/v1/get-credits-info" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"credits_balance": 45.23,
"credits_used_this_period": 74.77,
"has_payment_method": true,
"auto_recharge_enabled": true,
"auto_recharge_amount": 50.00,
"auto_recharge_threshold": 5.00,
"received_signup_bonus": true
}
Retrieve the current user’s credit balance, usage, and auto-recharge settings.
Response
number
Current credit balance in USD
number
Credits used in the current billing period
boolean
Whether a payment method is saved
boolean
Whether auto-recharge is enabled
number
Amount to add when auto-recharging (default: $50)
number
Balance threshold that triggers auto-recharge (default: $5)
boolean
Whether the $20 welcome bonus has been claimed
curl "https://api.magpipe.ai/functions/v1/get-credits-info" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"credits_balance": 45.23,
"credits_used_this_period": 74.77,
"has_payment_method": true,
"auto_recharge_enabled": true,
"auto_recharge_amount": 50.00,
"auto_recharge_threshold": 5.00,
"received_signup_bonus": true
}