Actions10
Model → Get Usage
AI-generatedSummary
Retrieve usage statistics for AI models optionally filtered by model or endpoint ID within a specified time range.
Inputs
- Model — Optionally filter usage data to a specific model by selecting from the list or entering a model ID (e.g., fal-ai/flux/dev). Leave empty to see usage for all models.
- Time Range (required) — Select a predefined time range (e.g., last 1 hour, last 24 hours) or choose a custom range to specify start and end dates for usage data.
- Start Date — Specify the start date and time for a custom time range in ISO8601 format (visible only if 'Custom Range' is selected).
- End Date — Specify the end date and time for a custom time range in ISO8601 format (visible only if 'Custom Range' is selected).
- Usage Options — Configure additional usage query options including filtering by specific endpoint ID, which data sections to include in the response (time series, summary, auth method), and limiting the number of returned results (1 to 1000).
Output shape
a JSON object containing usage statistics, including time-range metadata, optional time-series data, summaries, and authentication method details depending on options selected.
The response includes a _meta field indicating if usage data was found. Time series data arrays are filtered to exclude empty buckets. Usage data can be scoped to a specific model or endpoint ID or fetched for all models if no filter is set. Requires an Admin API Key for access.
Examples
Example 1: Fetch usage data for a specific model over the last 24 hours with default time series data included.
Set 'Model' to desired model (or leave empty for all models), choose 'Last 24 Hours' for time range, and leave 'Usage Options' as default (include time series, limit 50).
Example 2: Retrieve usage data filtered by a specific endpoint ID with summary and authentication method info for a custom date range.
Select 'Custom Range' for time range, set 'Start Date' and 'End Date' accordingly, enter desired endpoint ID in 'Usage Options', and specify 'Include' options to include 'summary' and 'auth_method'.