Skip to main content
Retrieve credit usage grouped by feature over a specified time window.

Overview

The Credit Breakdown endpoint aggregates credit consumption by feature, giving you a clear picture of where your credits are going. Use this to identify high-consumption features, optimise usage patterns, and forecast future credit needs.

Authentication

Requires a valid API key. No special permission scope is needed beyond a valid key.

Key Features

  • Feature-Level Grouping: See total credits consumed per feature
  • Configurable Window: Look back 1 to 365 days
  • Percentage Breakdown: Understand relative consumption across features
  • No Credit Cost: This endpoint is free to use
curl -X GET "https://api.trigify.io/v1/credits/breakdown?days=30" \
  -H "x-api-key: YOUR_API_KEY"

Query Parameters

ParameterTypeDefaultDescription
daysinteger30Number of days to look back (1-365)

Example Response

{
  "success": true,
  "data": {
    "total_credits": 1250,
    "period_days": 30,
    "breakdown": [
      {
        "feature": "search_create",
        "credits": 500,
        "percentage": 40.0
      },
      {
        "feature": "profile_enrich",
        "credits": 350,
        "percentage": 28.0
      },
      {
        "feature": "workflow_execution",
        "credits": 250,
        "percentage": 20.0
      },
      {
        "feature": "social_topics",
        "credits": 150,
        "percentage": 12.0
      }
    ]
  }
}

Response Fields

FieldTypeDescription
total_creditsintegerTotal credits consumed in the time window
period_daysintegerNumber of days covered by the breakdown
breakdownarrayPer-feature aggregation
breakdown[].featurestringFeature name
breakdown[].creditsintegerCredits consumed by this feature
breakdown[].percentagenumberPercentage of total credits consumed by this feature

Credit Usage

This endpoint is free and does not consume credits.