Documentation Index
Fetch the complete documentation index at: https://docs.pixcraft.es/llms.txt
Use this file to discover all available pages before exploring further.
Get Usage
Returns current usage statistics for the authenticated API key, including a daily breakdown for the current billing period.
Example request
curl https://www.pixcraft.es/api/v1/usage \
-H "Authorization: Bearer px_live_your_key"
Example response
{
"api_key": "px_...abc123",
"plan": "business",
"period": "2025-03",
"calls_used": 243,
"calls_limit": 2000,
"calls_remaining": 1757,
"reset_date": "2025-04-01",
"daily_breakdown": [
{ "date": "2025-03-01", "calls": 12 },
{ "date": "2025-03-02", "calls": 8 },
{ "date": "2025-03-03", "calls": 23 }
]
}
Response fields
| Field | Type | Description |
|---|
api_key | string | Masked version of your API key |
plan | string | Your plan name (starter, business, enterprise) |
period | string | Current billing period (YYYY-MM) |
calls_used | number | API calls consumed this period |
calls_limit | number or “unlimited” | Your plan’s monthly limit |
calls_remaining | number or “unlimited” | Calls left this period |
reset_date | string | When the counter resets (YYYY-MM-DD) |
daily_breakdown | array | Per-day call counts for the current period |
Building a usage dashboard
Use this endpoint to show your users or team how many API calls remain. For example:
const res = await fetch('https://www.pixcraft.es/api/v1/usage', {
headers: { 'Authorization': 'Bearer px_live_your_key' },
});
const usage = await res.json();
const percent = (usage.calls_used / usage.calls_limit) * 100;
console.log(`${percent.toFixed(1)}% of monthly limit used`);
if (percent > 80) {
console.warn('Warning: approaching monthly API limit');
}