Skip to main content

Team analytics

Programmatic access to the same credit usage data available in your dashboard and CSV export.
The Analytics API lets you retrieve your team’s AI credit consumption data programmatically. Integrate usage data directly into your reporting pipelines, BI tools, or internal dashboards. Available exclusively for Business and Enterprise plans at no additional cost. It does not consume credits.

Credit usage

Query credit consumption over time with POST /v1/analytics/team-credit-usage. Each response includes per-user breakdown with email addresses and per-project grouping automatically.
curl -X POST https://api.magnific.com/v1/analytics/team-credit-usage \
  -H "X-Magnific-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "granularity": "day",
    "start_date": "2026-05-01",
    "end_date": "2026-05-31",
    "group_ids": [10]
  }'

Example response

{
  "data": [
    {
      "date": "2026-05-01T00:00:00+00:00",
      "consumptions": [
        {
          "tool": "AI Image Models",
          "user_uses": 45,
          "user_credits": 1800,
          "user_usages": [
            {
              "user_email": "designer@company.com",
              "user_uses": 30,
              "user_credits": 1200,
              "project_reference": "a1b2c3d4-1111-4000-8000-000000000001",
              "project_name": "Marketing Campaign",
              "group_name": "Design Team"
            },
            {
              "user_email": "developer@company.com",
              "user_uses": 15,
              "user_credits": 600
            }
          ]
        },
        {
          "tool": "Asset Download",
          "user_uses": 10,
          "user_credits": 900
        }
      ]
    }
  ]
}

Filtering

Narrow down results to specific subsets of your team:
FilterWhat it doesWhere to get the IDs
group_idsShow only consumption from members of specific groupsGET /v1/analytics/team-groups
project_referencesShow only consumption within specific projectsGET /v1/analytics/team-projects
api_key_idsShow only consumption from specific API keysGET /v1/analytics/team-api-keys

Time granularity

The granularity parameter controls the time bucket size. Defaults to day.
ValueDescriptionBest for
dayOne data point per calendar dayShort ranges (up to 30 days)
weekOne data point per ISO week (Monday–Sunday)Medium ranges (1–3 months)
monthOne data point per calendar monthQuarterly or yearly overviews
yearOne data point per calendar yearMulti-year trend analysis

Date range limits

  • If no dates are provided, returns the last 7 days
  • Enterprise: maximum 365 days
  • Business: maximum 180 days

Discovery endpoints

Four companion endpoints let you list team resources and get the IDs needed for filtering credit usage:
EndpointReturns
GET /v1/analytics/team-membersMembers with email, role, and status
GET /v1/analytics/team-api-keysAPI keys with name and status
GET /v1/analytics/team-groupsGroups with name and member count
GET /v1/analytics/team-projectsProjects with name
Cache discovery results — team composition changes infrequently.

Authentication

All endpoints authenticate with the X-Magnific-API-Key header. Your team is identified automatically from the API key. See Authentication for details.

Rate limits

All Analytics API endpoints are limited to 100 requests per day (100 RPD).

API reference

Credit Usage

Query credit consumption over time with filters

Team Members

List members with email, role, and status

API Keys

List API keys with name and status

Team Groups

List groups with member count

Team Projects

List projects with name

Frequently Asked Questions

The same data available in your Credit Usage dashboard and CSV export: date, tool (display name), user email, usage count, credits consumed, project, and group. The difference is structured JSON instead of flat CSV rows.
No. The Analytics API is included with your Business or Enterprise plan at no additional cost.
Call the discovery endpoints first. For example, GET /v1/analytics/team-groups returns all your groups with their group_id. Pass those IDs into the group_ids filter when querying credit usage. The same applies to projects (project_references) and API keys (api_key_ids).
Enterprise plans can query up to 365 days. Business plans can query up to 180 days. If no dates are provided, the API defaults to the last 7 days.