API Reference

Billing

BrowseFleet uses metered billing powered by Stripe. You are charged per browser-hour of active session time. Self-hosted instances can run without Stripe configuration.

Pricing Tiers

TierBase PriceRateConcurrent SessionsDaily Requests
HobbyFree$0.10/hr5500
Starter$29/mo$0.10/hr101,000
Developer$99/mo$0.08/hr20Unlimited
Pro$499/mo$0.05/hr100Unlimited

How Metered Billing Works

BrowseFleet tracks the duration of each browser session. When a session is released or expires, the total time is recorded as "browser hours" and reported to Stripe as a metered usage event. You are billed at the end of each billing cycle for total browser hours consumed.

Usage Statistics

GET/v1/usage

Get usage statistics for the authenticated API key. Shows total sessions, browser hours, and daily breakdown.

Response

{
  "totalSessions": 1250,
  "activeSessions": 3,
  "totalBrowserHours": 456.7,
  "todayBrowserHours": 12.3,
  "todayApiCalls": 89,
  "daily": [
    {
      "date": "2026-04-02",
      "sessions": 45,
      "browserHours": 12.3,
      "apiCalls": 89
    },
    {
      "date": "2026-04-01",
      "sessions": 52,
      "browserHours": 15.1,
      "apiCalls": 102
    }
  ],
  "currentPeriod": {
    "start": "2026-04-01T00:00:00.000Z",
    "end": "2026-05-01T00:00:00.000Z"
  }
}
curl https://api.browsefleet.com/v1/usage \
  -H "x-api-key: bf_your_api_key"

Stripe Integration Endpoints

POST/v1/billing/checkout

Create a Stripe Checkout session for new subscription signup. Returns a URL to redirect the user to Stripe's hosted checkout page.

Parameters

NameTypeRequiredDefaultDescription
successUrlstringNoURL to redirect to after successful checkout.
cancelUrlstringNoURL to redirect to if checkout is cancelled.

Response

{
  "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_...",
  "sessionId": "cs_live_..."
}
POST/v1/billing/portal

Create a Stripe Customer Portal session for managing subscription, payment methods, and invoices.

Parameters

NameTypeRequiredDefaultDescription
returnUrlstringNoURL to redirect to after leaving the portal.

Response

{
  "portalUrl": "https://billing.stripe.com/p/session/..."
}
POST/v1/billing/webhook

Stripe webhook endpoint. Handles checkout.session.completed (creates API key), customer.subscription.deleted (deactivates key), and invoice.payment_failed (deactivates key). Requires stripe-signature header.

Self-Hosted Billing

Stripe integration is optional. If STRIPE_SECRET_KEY is not set, billing endpoints return HTTP 503 and usage is still tracked locally in SQLite but not reported to Stripe. You can use the usage endpoint for your own billing implementation.