Skip to content

Get plan and usage stats

Returns the current plan name, billing period, plan limits, and usage counts.

The response shape depends on the account's billingSystem:

  • Stripe users: per-period usage.uploads / usage.profiles counters.
  • Metronome (usage-based) users: usage.connectedAccounts, usage.xApiCallsByOperation (per-operation X API call counts — resolve keys via GET /v1/billing/x-pricing), plus a spend block with currentPeriodCents, xSpendCents, and xSpendLimitCents. The legacy usage.xApiCalls 3-tier aggregate is still emitted for back-compat but excludes the $0.200 URL tier and any future tiers — new clients should consume xApiCallsByOperation only.

GET /v1/usage-stats

Returns the current plan name, billing period, plan limits, and usage counts.

The response shape depends on the account's billingSystem:

  • Stripe users: per-period usage.uploads / usage.profiles counters.
  • Metronome (usage-based) users: usage.connectedAccounts, usage.xApiCallsByOperation (per-operation X API call counts — resolve keys via GET /v1/billing/x-pricing), plus a spend block with currentPeriodCents, xSpendCents, and xSpendLimitCents. The legacy usage.xApiCalls 3-tier aggregate is still emitted for back-compat but excludes the $0.200 URL tier and any future tiers — new clients should consume xApiCallsByOperation only.

Responses

200 — Usage stats

  • billingSystem (string) (enum: stripe, metronome) — Which billing system the account is on. Shape of usage/spend differs.
  • planName (string)
  • billingPeriod (string) (enum: monthly, yearly)
  • signupDate (string)
  • billingAnchorDay (integer) — Day of month (1-31) when the billing cycle resets
  • hasAccess (boolean) — True if the account is in good standing. False for past-due/unpaid/paused subscriptions.
  • customerId (string) — Stripe customer ID, when present.
  • isInvitedUser (boolean) — True if this is a team member; limits/usage reflect the account owner.
  • autoUpgradeEnabled (boolean) — Stripe-only. Always false for Metronome users.
  • limits (object) — Plan limits. For Metronome users both fields are -1 (unlimited).
  • usage (object) — Per-period usage counts. Fields present depend on billingSystem: Stripe returns uploads / profiles / lastReset; Metronome returns connectedAccounts / xApiCalls / xApiCallsByOperation.
  • spend (object) — Metronome users only. Current-period spend summary.

401

404