Sign in
DocsUsage

Usage

Usage & Subscription API

Use the usage endpoint for account-level billing state and estimated cost telemetry tied to your API key organization.

Important fields

  • has_active_subscription Boolean guard for feature gating. Treat false as subscription-required state for protected generation flows.
  • estimated_cost_cents Integer cents estimate for the organization. Convert to display currency client-side when needed.

Currency conversion

Use integer cents from the API as source-of-truth. For display, convert with `estimated_cost_cents / 100` and apply locale formatting.
GET/api/v1/usageAPI Key

Read subscription and estimated usage status.

Response

FieldTypeRequiredDescription
data.has_active_subscriptionbooleanNoWhether org has an active billing subscription.
data.customer_idstring | nullNoBilling customer identifier.
data.estimated_cost_centsintegerNoEstimated usage cost in cents.
bashcURL2 lines
curl -X GET 'https://app.clariva.ai/api/v1/usage' \
  -H 'Authorization: Bearer $CLARIVA_API_KEY'
jsonResponse7 lines
{
  "data": {
    "has_active_subscription": true,
    "customer_id": "cus_01jv3p4r5xv6y7z8",
    "estimated_cost_cents": 1245
  }
}

Search documentation

Find pages, endpoints, and sections.