Skip to content

Check your balance with /v1/balance

/v1/balance returns how many points an API key has left and which plan it is on. Call it before a large batch job, or on a schedule to alert when a key is running low.

The call itself is free — it does not consume points.

Endpoint

GET /v1/balance

Base URL: https://api.apitube.io.

Authentication

Any of the three standard methods work — see Authentication:

bash
curl "https://api.apitube.io/v1/balance" -H "X-API-Key: YOUR_API_KEY"
curl "https://api.apitube.io/v1/balance" -H "Authorization: Bearer YOUR_API_KEY"
curl "https://api.apitube.io/v1/balance?api_key=YOUR_API_KEY"

The balance returned always belongs to the key used to authenticate — a key cannot read another key's balance.

Parameters

This endpoint takes no parameters other than authentication — see Authentication.

Response format

json
{
  "api_key": "ak_live_abc123...",
  "points": 48500,
  "plan": "professional"
}

Response fields

FieldTypeDescription
api_keystringThe key the balance belongs to
pointsintegerPoints remaining
planstringCurrent subscription plan

What a point costs

RequestPoints
Any article, count or trends request1
Adding the prompt parameter+2 for the translation step (Basic and above only)
/v1/balance0

Reference directory requests (People, Companies, Journalists) also cost 1 point. Points are separate from the per-minute rate limit — see Rate limits and quotas.

Request examples

bash
curl "https://api.apitube.io/v1/balance" -H "X-API-Key: YOUR_API_KEY"
python
import requests

balance = requests.get(
    "https://api.apitube.io/v1/balance",
    headers={"X-API-Key": "YOUR_API_KEY"},
).json()

if balance["points"] < 1000:
    print(f"Low balance: {balance['points']} points left on {balance['plan']}")
javascript
const response = await fetch('https://api.apitube.io/v1/balance', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const balance = await response.json();

console.log(`${balance.points} points left on ${balance.plan}`);
php
$context = stream_context_create(['http' => ['header' => 'X-API-Key: YOUR_API_KEY']]);
$balance = json_decode(file_get_contents('https://api.apitube.io/v1/balance', false, $context), true);

echo $balance['points'], ' points left on ', $balance['plan'], PHP_EOL;

Errors

CodeStatusMeaning
ER0200400No API key in the request
ER0202401API key is invalid

Full list in HTTP response codes.