Get information about your account including your current plan, credit balance, and usage statistics.
Request
No request body required. Just include your API key in the header.
curl https://api.poof.bg/v1/me \
-H "x-api-key: YOUR_API_KEY"
Response
Your unique organization identifier.
Your current subscription plan (e.g., “Free”, “Pro”, “Enterprise”).
Total credits available in your current billing cycle.
Credits consumed in the current billing cycle.
If auto-recharge is enabled, the credit threshold that triggers a top-up. null if disabled.
{
"organizationId": "org_abc123xyz",
"plan": "Pro",
"maxCredits": 5000,
"usedCredits": 1234,
"autoRechargeThreshold": 100
}
Examples
curl https://api.poof.bg/v1/me \
-H "x-api-key: YOUR_API_KEY"
Use Cases
Monitoring Usage
Check your credit consumption before processing a batch:
account = client.get_account()
remaining = account.max_credits - account.used_credits
if remaining < 100:
print("Warning: Low credits, consider upgrading")
Usage Dashboard
Display account info in your application:
const account = await poof.getAccount();
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:
try:
account = client.get_account()
images_to_process = 500
remaining = account.max_credits - account.used_credits
if remaining < images_to_process:
raise Exception(f"Not enough credits. Need {images_to_process}, have {remaining}")
# Proceed with processing
except AuthenticationError:
print("Invalid API key")
Error Responses
| Status | Code | Description |
|---|
| 401 | authentication_error | Invalid or missing API key |
curl https://api.poof.bg/v1/me \
-H "x-api-key: YOUR_API_KEY"