Features Pricing Docs Blog Playground Log In Sign Up

Account & Usage

The Account API lets you retrieve your account information and monitor your current API usage. Use these endpoints to track your screenshot quota and build usage dashboards.

Get Account Info

http
GET /api/v1/account

Returns your account details including current plan, subscription status, and API limits.

Example Request

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://screenshotrun.com/api/v1/account

Response

json
{
  "data": {
    "id": 1,
    "name": "John Doe",
    "email": "[email protected]",
    "plan": {
      "name": "Pro",
      "slug": "pro",
      "screenshots_per_month": 10000,
      "rate_limit_per_minute": 60
    },
    "subscription": {
      "status": "active",
      "current_period_end": "2026-04-09T00:00:00.000000Z"
    }
  }
}

Response Fields

FieldTypeDescription
idintegerYour user account ID
namestringYour account name
emailstringYour account email
planobject|nullCurrent plan details (null if on free plan without explicit plan)
plan.namestringPlan display name
plan.slugstringPlan identifier
plan.screenshots_per_monthintegerMaximum screenshots allowed per billing period
plan.rate_limit_per_minuteintegerMaximum API requests per minute
subscriptionobject|nullActive subscription details (null if no subscription)
subscription.statusstringSubscription status: active, cancelled, past_due, trialing, paused
subscription.current_period_endstringEnd date of the current billing period (ISO 8601)

Get Usage Statistics

http
GET /api/v1/account/usage

Returns your usage statistics for the current billing period, including screenshot counts and remaining quota.

Example Request

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://screenshotrun.com/api/v1/account/usage

Response

json
{
  "data": {
    "screenshots_used": 3450,
    "screenshots_limit": 10000,
    "screenshots_remaining": 6550,
    "usage_percentage": 34.5,
    "period_start": "2026-03-09T00:00:00.000000Z",
    "period_end": "2026-04-09T00:00:00.000000Z",
    "days_remaining": 27,
    "avg_daily_usage": 115,
    "projected_usage": 4035
  }
}

Response Fields

FieldTypeDescription
screenshots_usedintegerNumber of screenshots taken in the current period
screenshots_limitintegerMaximum screenshots allowed in this period
screenshots_remainingintegerRemaining screenshot quota
usage_percentagefloatPercentage of quota used (0–100)
period_startstringStart of the current billing period (ISO 8601)
period_endstringEnd of the current billing period (ISO 8601)
days_remainingintegerDays remaining in the current billing period
avg_daily_usageintegerAverage screenshots per day in the current period
projected_usageintegerProjected total screenshots by end of period based on current pace

Code Examples

PHP — Usage monitoring

php
$response = Http::withToken(env('SCREENSHOT_API_KEY'))
    ->get('https://screenshotrun.com/api/v1/account/usage');

$usage = $response->json('data');

echo "Used: {$usage['screenshots_used']}/{$usage['screenshots_limit']}";
echo "Remaining: {$usage['screenshots_remaining']}";

// Alert if usage exceeds 80%
if ($usage['usage_percentage'] > 80) {
    Log::warning('Screenshot API usage above 80%', $usage);
}

Python — Usage check before capture

python
import requests
import os

API_KEY = os.environ["SCREENSHOT_API_KEY"]
BASE_URL = "https://screenshotrun.com/api/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}

# Check remaining quota before taking screenshots
usage = requests.get(f"{BASE_URL}/account/usage", headers=headers).json()["data"]

if usage["screenshots_remaining"] > 0:
    response = requests.post(
        f"{BASE_URL}/screenshots",
        headers=headers,
        json={"url": "https://example.com"}
    )
    print(f"Screenshot created! Remaining: {usage['screenshots_remaining'] - 1}")
else:
    print(f"Quota exceeded! Resets at: {usage['period_end']}")

JavaScript — Account dashboard widget

javascript
async function getUsageSummary() {
  const [accountRes, usageRes] = await Promise.all([
    fetch("https://screenshotrun.com/api/v1/account", {
      headers: { Authorization: `Bearer ${API_KEY}` },
    }),
    fetch("https://screenshotrun.com/api/v1/account/usage", {
      headers: { Authorization: `Bearer ${API_KEY}` },
    }),
  ]);

  const account = (await accountRes.json()).data;
  const usage = (await usageRes.json()).data;

  return {
    plan: account.plan?.name ?? "Free",
    used: usage.screenshots_used,
    limit: usage.screenshots_limit,
    percentage: usage.usage_percentage,
    renewsAt: usage.period_end,
    subscriptionStatus: account.subscription?.status ?? "none",
  };
}

// Example output:
// { plan: "Pro", used: 3450, limit: 10000, percentage: 34.5, ... }

Usage Alerts

We automatically send notifications when your usage reaches certain thresholds:

ThresholdAction
80% of monthly quotaWarning notification sent to your account email
90% of monthly quotaSecond warning notification sent to your account email
100% of monthly quotaAPI returns 402 USAGE_LIMIT_EXCEEDED for new screenshot requests

To increase your quota, upgrade your plan at any time. The new limits take effect immediately.

Subscription Statuses

StatusDescriptionAPI access
activeSubscription is active and in good standingFull access
trialingSubscription is in trial periodFull access
cancelledSubscription cancelled but still within the paid periodFull access until period end
past_duePayment failed, awaiting retryLimited access
pausedSubscription paused by userRead-only access