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 KeyRead subscription and estimated usage status.
Response
| Field | Type | Required | Description |
|---|---|---|---|
| data.has_active_subscription | boolean | No | Whether org has an active billing subscription. |
| data.customer_id | string | null | No | Billing customer identifier. |
| data.estimated_cost_cents | integer | No | Estimated 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.