Developers

The Truebex API

Authenticate with an API key, call the API over HTTPS, and watch your usage in the dashboard. Every plan includes a monthly request allowance.

Quick start

  1. Create a free account (Google or email).
  2. Open Dashboard → API keys and create a key. Copy it — it is shown once.
  3. Call the API:
curl https://api.truebex.com/v1/ping \
  -H "Authorization: Bearer tbx_live_your_key"

Authentication

Send your key on every request, either as a bearer token or in the X-API-Key header. Keys start with tbx_live_.

Authorization: Bearer tbx_live_…
# or
X-API-Key: tbx_live_…
  • Keep keys on your server. Never ship them in browser or app code.
  • Use one key per environment, and revoke a key the moment it leaks.
  • We store only a hash of each key, so a lost key can't be recovered — create a new one.

Base URL

https://api.truebex.com

Endpoints

MethodPathDescription
GET/v1/pingCheck that a key works. Returns the server time.
GET/v1/accountThe key's owner, plan and this month's usage.

Project and asset endpoints are on the roadmap and will be added under /v1 without breaking these.

Example response

GET /v1/account

{
  "email": "[email protected]",
  "plan": "free",
  "key": { "id": 1, "name": "Production", "prefix": "tbx_live_Ab12Cd" },
  "usage": { "used": 42, "limit": 1000, "remaining": 958 }
}

Usage and limits

Every call to /v1 counts toward your monthly allowance, across all your keys. Allowances reset on the 1st of each month (UTC). Each response carries your current numbers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 958
PlanRequests / monthActive keys
Free1,0002
Pro100,00020
Studio100,00020
Team100,00020
Enterprise5,000,000200

Errors

Errors return JSON with a human-readable detail:

HTTP/1.1 429 Too Many Requests
{ "detail": "Monthly limit of 1000 requests reached for the Free plan." }
StatusMeaning
401Missing, malformed, invalid or revoked API key.
429Monthly request allowance used up. Resets on the 1st (UTC), or upgrade.
5xxServer problem. Retry with exponential backoff.

Examples

JavaScript (Node 18+)

const res = await fetch("https://api.truebex.com/v1/account", {
  headers: { Authorization: `Bearer ${process.env.TRUEBEX_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).detail);
console.log(await res.json());

Python

import os, requests

r = requests.get(
    "https://api.truebex.com/v1/account",
    headers={"Authorization": f"Bearer {os.environ['TRUEBEX_API_KEY']}"},
    timeout=10,
)
r.raise_for_status()
print(r.json())