PicX Studio

Usage Tracking

Monitor API usage and credit balance with your API key, plus richer dashboard reports.

View as Markdown

Track how much of the API you are using and your remaining credit balance. Two endpoints are available directly with your API key; richer breakdowns are available through the dashboard API (JWT).

API-key endpoints — call these with Authorization: Bearer pxsk_…

GET /v1/account/usage

Usage statistics for your account over a period.

Auth: API Key

ParameterTypeRequiredDescription
periodstringNoWindow like 7d or 30d (pattern Nd, from 1d to 365d). Default 30d.

Response

{
  "total_requests": 150,
  "successful_requests": 145,
  "failed_requests": 5,
  "total_cost_usd": 3.24,
  "credits_used": 3240,
  "period_days": 30,
  "model_breakdown": {
    "gemini-3.1-flash-image-preview": 100,
    "bytedance/seedance/v2": 50
  }
}

GET /v1/account/me

Your profile and current credit balance.

Auth: API Key

Response

{
  "id": "9b1c7e0a-...",
  "email": "[email protected]",
  "name": "You",
  "role": "user",
  "is_active": true,
  "credits": { "balance": 6760, "total_earned": 10000, "total_used": 3240 }
}

The endpoints below are part of the dashboard API and require a browser session (JWT). They are not accessible with an API key.

GET /api/usage

Aggregated usage including per-model breakdown and top endpoints.

Auth: Dashboard (JWT)

ParameterTypeRequiredDescription
periodnumberNoDays, 1 to 365. Default 30.

Response

{
  "total_requests": 150,
  "successful_requests": 145,
  "failed_requests": 5,
  "total_credits_used": 3240,
  "period_days": 30,
  "model_breakdown": { "gemini-3.1-flash-image-preview": 100 },
  "top_endpoints": [ { "endpoint": "/v1/images/generate", "count": 100 } ]
}

GET /api/usage/daily

Per-day usage breakdown for the period.

Auth: Dashboard (JWT)

GET /api/logs

Paginated request logs: method, endpoint, status, latency, and credits.

Auth: Dashboard (JWT)

ParameterTypeRequiredDescription
limitnumberNoPage size, 1 to 100. Default 50.
offsetnumberNoPagination offset. Default 0.

GET /api/tier

Your tier limits — see Rate Limits.

Auth: Dashboard (JWT)

Check your usage

curl

curl "https://api.picxstudio.com/v1/account/usage?period=30d" \
  -H "Authorization: Bearer pxsk_your_key"

python

import requests

usage = requests.get(
    "https://api.picxstudio.com/v1/account/usage",
    headers={"Authorization": "Bearer pxsk_your_key"},
    params={"period": "30d"},
).json()
print(usage["credits_used"], "credits used")

Build with PicX

One API key and one credit balance across the REST API, MCP server, CLI and SDKs.