usage
ManagementUsage
View Scenario API usage statistics for a date range.
Default response is summarized (~1–3 KB regardless of activity volume): headline CU totals, per-user consumption, aggregated per-model CU/jobs (sorted desc, joined with model names), and per-asset-kind counts. Heavy sections are stubbed with counts and opt-in hints — pass them in `include` to expand.
Args:
- start_date, end_date: optional ISO dates to bound the query
- team_id, project_id: optional context filters
- include: optional array to expand specific sections. Accepted values:
• 'usages' — per-usage-type aggregated totals (images-generation, training, custom, ...)
• 'usages.daily' — full per-day timeseries per usage type
• 'modelUsages.daily' — full per-day per-model timeseries
• 'nsfwUsages' — content-moderation totals (non-zero only)
• 'activity' — raw per-event activity log
• 'entities' — denormalized lookups for ids referenced above (avatar URLs and full job inputs are stripped)
- response_format: 'json' (default) or 'markdown'
Returns: { totals, consumption, modelUsages, assetUsages, sections, _hint } by default. Each value in `include` adds the corresponding section to the response.
Examples:
- "Show usage for this month" -> start_date="2026-04-01", end_date="2026-04-30"
- "What models cost me the most?" -> default response (modelUsages is already aggregated and sorted)
- "Break down model CU by day" -> include=['modelUsages.daily']
- "Give me the raw event log" -> include=['activity']
Don't use when: You need per-job execution state or cancellation. Prefer manage_jobs instead.
read-onlyidempotentopen-world
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| start_date | string | — | Start date (ISO format). |
| end_date | string | — | End date (ISO format). |
| include | array | — | Optional sections to include in the response. Default response only carries headline totals + aggregated model/asset breakdowns. Pass any of: 'usages' (per-usage-type totals), 'usages.daily' (per-day timeseries), 'modelUsages.daily' (per-day per-model timeseries), 'nsfwUsages' (moderation totals), 'activity' (raw event log), 'entities' (denormalized lookups for ids referenced above). |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |
Example Request
JSON
{
"team_id": "team_abc123",
"project_id": "proj_xyz789",
"start_date": "2026-03-01",
"end_date": "2026-03-31"
}Example Response
JSON
{
"usages": [
{
"date": "2026-03-20",
"credits": 120
}
]
}Common Use Cases
- Query credit usage for a date range to monitor spend
- Compare usage across teams or projects with explicit context filters