Get Account Balance
Retrieve your current account balance and available funds.
Endpoint
GET /v1/account/balance
Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Response
Success Response (200 OK)
{
"totalBalanceCents": 3250,
"totalBalanceFormatted": "$32.50",
"breakdown": {
"paid": {
"cents": 2550,
"formatted": "$25.50"
},
"free": {
"cents": 500,
"formatted": "$5.00"
},
"bonus": {
"cents": 200,
"formatted": "$2.00"
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
totalBalanceCents | integer | Total balance in cents (also equals total renders remaining, since 1 cent = 1 render) |
totalBalanceFormatted | string | Total balance formatted as USD currency (e.g., "$32.50") |
breakdown | object | Detailed breakdown by balance type |
breakdown.paid.cents | integer | Paid balance in cents from purchased renders |
breakdown.paid.formatted | string | Paid balance formatted as USD |
breakdown.free.cents | integer | Free balance in cents from trial or promotional offers |
breakdown.free.formatted | string | Free balance formatted as USD |
breakdown.bonus.cents | integer | Bonus balance in cents from referrals or promotions |
breakdown.bonus.formatted | string | Bonus balance formatted as USD |
Balance Types
Browser7 tracks three types of balance:
Paid Balance
Funds from purchased renders. This balance:
- Never expires
- Is used after free and bonus balance are depleted
- Can be topped up at any time
Free Balance
Promotional or trial balance provided by Browser7. This balance:
- May have expiration dates
- Is used first before paid balance
- Typically provided for new accounts or special promotions
Bonus Balance
Balance earned through referrals or special programs. This balance:
- May have expiration dates
- Is used second (after free, before paid)
- Is earned through the referral program or special events
Usage Priority
Balance is consumed in this order:
- Free balance (highest priority)
- Bonus balance
- Paid balance (lowest priority)
Cost Per Render
Each render costs exactly 1 cent ($0.01 USD), which includes:
- Page rendering
- Geo-targeting
- CAPTCHA solving
- Wait actions
- Bandwidth
Since 1 cent = 1 render, the totalBalanceCents field directly shows how many renders you can perform. For example, totalBalanceCents: 1050 means you have 1,050 renders remaining.
Check the Pricing page for detailed pricing information.
Use Cases
Monitor Balance Before Large Jobs
Check your balance before starting batch operations:
# Check if you have enough balance for 1000 renders
curl https://api.browser7.com/v1/account/balance \
-H "Authorization: Bearer b7_your_api_key"
# If totalBalanceCents >= 1000, proceed with batch job
Low Balance Alerts
Set up automated alerts when balance drops below a threshold:
const client = new Browser7({ apiKey: process.env.BROWSER7_API_KEY });
async function checkBalance() {
const balance = await client.getAccountBalance();
if (balance.totalBalanceCents < 1000) {
console.warn(`Low balance: ${balance.totalBalanceFormatted} (${balance.totalBalanceCents} renders remaining)`);
// Send notification to ops team
}
}
Track Usage Over Time
Log balance changes to monitor usage patterns:
import time
from browser7 import Browser7
client = Browser7(api_key=os.environ['BROWSER7_API_KEY'])
# Before batch job
balance_before = client.get_account_balance()
print(f"Starting balance: {balance_before['totalBalanceFormatted']} ({balance_before['totalBalanceCents']} renders)")
# Run your renders...
# ...
# After batch job
balance_after = client.get_account_balance()
renders_used = balance_before['totalBalanceCents'] - balance_after['totalBalanceCents']
print(f"Ending balance: {balance_after['totalBalanceFormatted']} ({balance_after['totalBalanceCents']} renders)")
print(f"Renders used: {renders_used}")
Examples
Basic Request
curl https://api.browser7.com/v1/account/balance \
-H "Authorization: Bearer b7_your_api_key"
Response Example
{
"totalBalanceCents": 1700,
"totalBalanceFormatted": "$17.00",
"breakdown": {
"paid": {
"cents": 1575,
"formatted": "$15.75"
},
"free": {
"cents": 0,
"formatted": "$0.00"
},
"bonus": {
"cents": 125,
"formatted": "$1.25"
}
}
}
SDK Examples
All SDKs provide a convenient method to check account balance:
Node.js
const Browser7 = require('browser7');
const client = new Browser7({ apiKey: 'b7_your_api_key' });
const balance = await client.getAccountBalance();
console.log(`Total balance: ${balance.totalBalanceFormatted}`);
console.log(`Renders remaining: ${balance.totalBalanceCents}`);
console.log(`\nBreakdown:`);
console.log(` Paid: ${balance.breakdown.paid.formatted} (${balance.breakdown.paid.cents} renders)`);
console.log(` Free: ${balance.breakdown.free.formatted} (${balance.breakdown.free.cents} renders)`);
console.log(` Bonus: ${balance.breakdown.bonus.formatted} (${balance.breakdown.bonus.cents} renders)`);
Python
from browser7 import Browser7
client = Browser7(api_key='b7_your_api_key')
balance = client.get_account_balance()
print(f"Total balance: {balance['totalBalanceFormatted']}")
print(f"Renders remaining: {balance['totalBalanceCents']}")
print(f"\nBreakdown:")
print(f" Paid: {balance['breakdown']['paid']['formatted']} ({balance['breakdown']['paid']['cents']} renders)")
print(f" Free: {balance['breakdown']['free']['formatted']} ({balance['breakdown']['free']['cents']} renders)")
print(f" Bonus: {balance['breakdown']['bonus']['formatted']} ({balance['breakdown']['bonus']['cents']} renders)")
PHP
use Browser7\Browser7Client;
$client = new Browser7Client('b7_your_api_key');
$balance = $client->getAccountBalance();
echo "Total balance: " . $balance->totalBalanceFormatted . "\n";
echo "Renders remaining: " . $balance->totalBalanceCents . "\n";
echo "\nBreakdown:\n";
echo " Paid: " . $balance->breakdown->paid->formatted . " (" . $balance->breakdown->paid->cents . " renders)\n";
echo " Free: " . $balance->breakdown->free->formatted . " (" . $balance->breakdown->free->cents . " renders)\n";
echo " Bonus: " . $balance->breakdown->bonus->formatted . " (" . $balance->breakdown->bonus->cents . " renders)\n";
Error Responses
401 Unauthorized
Returned when authentication fails:
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
See Authentication for details.
Best Practices
- Check before large jobs - Verify sufficient balance before starting batch operations
- Set up alerts - Monitor balance and alert when it drops below a threshold
- Top up proactively - Add to your balance before running out to avoid service interruption
- Track usage - Log balance before and after jobs to understand costs
Purchase More Renders
To add to your account balance:
- Go to the Dashboard
- Navigate to Billing → Purchase Renders
- Choose your amount
- Complete the payment
Your balance is updated immediately and reflected in the next API call.
Related Documentation
- Create Render - Start render jobs that consume balance
- Pricing - Detailed pricing information
- Authentication - API key setup
- Error Handling - Handle insufficient balance errors