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.

Example response

Filtering

Narrow down results to specific subsets of your team:

Time granularity

The granularity parameter controls the time bucket size. Defaults to day.

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: Cache discovery results — team composition changes infrequently.

Project budgets

On Enterprise plans, GET /v1/analytics/team-projects also returns each project’s credit budget: what it holds (assigned), what it has spent (consumed) and what it can still spend (available). A project without an active budget returns budget: null — it spends from its group or the organization pool instead. On Business plans budget is always null.
What a project has left is budget.available, already computed server-side as assigned - consumed — never derive it from credit-usage rows, which follow different filters and time buckets. To alert before a project runs out, poll this endpoint and compare available against a threshold:
A project whose budget runs out stops generating until an admin raises it: an exhausted budget does not fall back to the group or the organization pool.

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 10,000 requests per day (10,000 RPD) per API key on the Business and Enterprise plans, the only plans where the Analytics API is available.

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 and subgroups with member count

Team Projects

List projects with name and credit budget

Frequently Asked Questions

The same data available in your Credit Usage dashboard and CSV export: date, tool category and specific tool, user email, usage count, credits consumed, project, and group. The difference is structured JSON instead of flat CSV rows.
They are not duplicates. tool is a category, and many tools share one — so two rows can show the same tool, user, project and date with the same counts and still be different consumptions. Tell them apart with tool_name, which identifies the specific tool that was billed, and add their credits together. De-duplicating them undercounts your real usage.
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). To filter by people, pass their addresses in user_emails; GET /v1/analytics/team-members lists the emails of your team.
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.
Call GET /v1/analytics/team-projects (Enterprise plans) and read each project’s budget.available — it is already computed as assigned - consumed. A project with budget: null has no active budget and spends from its group or the organization pool, which is not the same as a budget of zero: a zero budget can pay for nothing. See Project budgets for a polling example that alerts before a project runs out.