curl https://api.poof.bg/v1/me \
-H "x-api-key: pk_your_api_key"
{
"organizationId": "org_abc123xyz",
"plan": "Pro",
"maxCredits": 2000,
"usedCredits": 1234,
"autoRechargeThreshold": 0.9
}
API Reference
Get Account Info
Retrieve account details and credit usage
GET
/
me
curl https://api.poof.bg/v1/me \
-H "x-api-key: pk_your_api_key"
{
"organizationId": "org_abc123xyz",
"plan": "Pro",
"maxCredits": 2000,
"usedCredits": 1234,
"autoRechargeThreshold": 0.9
}
Get information about your account including your current plan, credit balance, and usage statistics.
This endpoint is free: it does not consume credits and is not rate limited, so you can poll it as often as you like.
See API Error Codes for the error body format.
Request
No request body required. Just include your API key in the header.curl https://api.poof.bg/v1/me \
-H "x-api-key: pk_your_api_key"
Response
string
Your unique organization identifier.
string
Your current plan’s display name (e.g., “Free”, “Basic”, “Pro”, “Mega”, “Ultra”, “Giga”).
integer
Total credits available in your current billing cycle (monthly allocation plus any top-ups).
integer
Credits consumed in the current billing cycle. Each successful
/remove request costs 1 credit.number
Fraction of the plan limit at which Auto Recharge triggers, between
0.5 and 0.95 (e.g. 0.9 = 90%). Omitted when Auto Recharge is off.{
"organizationId": "org_abc123xyz",
"plan": "Pro",
"maxCredits": 2000,
"usedCredits": 1234,
"autoRechargeThreshold": 0.9
}
Examples
curl https://api.poof.bg/v1/me \
-H "x-api-key: pk_your_api_key"
from poof import Poof
client = Poof(api_key="pk_your_api_key")
info = client.me()
print(f"Plan: {info['plan']}")
print(f"Credits remaining: {info['maxCredits'] - info['usedCredits']}")
import { Poof } from '@poof-bg/js';
const poof = new Poof({ apiKey: 'pk_your_api_key' });
const account = await poof.me();
console.log(`Plan: ${account.plan}`);
console.log(`Credits remaining: ${account.maxCredits - account.usedCredits}`);
Use Cases
Monitoring Usage
Check your credit consumption before processing a batch:info = client.me()
remaining = info["maxCredits"] - info["usedCredits"]
if remaining < 100:
print("Warning: Low credits, consider a top-up or upgrade")
Usage Dashboard
Display account info in your application:const account = await poof.me();
const usagePercent = (account.usedCredits / account.maxCredits) * 100;
console.log(`Usage: ${usagePercent.toFixed(1)}%`);
Pre-flight Check
Verify credentials and check limits before starting a job:from poof import AuthError
try:
info = client.me()
images_to_process = 500
remaining = info["maxCredits"] - info["usedCredits"]
if remaining < images_to_process:
raise Exception(f"Not enough credits. Need {images_to_process}, have {remaining}")
# Proceed with processing
except AuthError:
print("Invalid API key")
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | authentication_error | x-api-key missing or not recognised |
curl https://api.poof.bg/v1/me \
-H "x-api-key: pk_your_api_key"