Skip to main content
GET
/
models
/
analytics
Analytics
curl --request GET \
  --url https://api.fal.ai/v1/models/analytics \
  --header 'Authorization: <api-key>'
{
  "time_series": [
    {
      "bucket": "2025-01-15T12:00:00-05:00",
      "results": [
        {
          "endpoint_id": "fal-ai/flux/dev",
          "request_count": 1500,
          "success_count": 1450,
          "p50_duration": 2.5,
          "p90_duration": 4.8
        }
      ]
    }
  ],
  "next_cursor": null,
  "has_more": false
}

Authorizations

Authorization
string
header
required

Admin API key must be prefixed with "Key ", e.g. Authorization: Key YOUR_ADMIN_API_KEY

Query Parameters

limit
integer

Maximum number of items to return. Actual maximum depends on query type and expansion parameters.

Required range: x >= 1
Example:

50

cursor
string

Pagination cursor from previous response. Encodes the page number.

Example:

"Mg=="

start

Start date in ISO8601 format (e.g., '2025-01-01T00:00:00Z' or '2025-01-01'). Defaults to 24 hours ago.

Example:

"2025-01-01T00:00:00Z"

end

End date in ISO8601 format (e.g., '2025-01-31T23:59:59Z' or '2025-01-31'). Defaults to current time.

Example:

"2025-01-31T23:59:59Z"

timezone
string
default:UTC

Timezone for date aggregation and boundaries. All timestamps in responses are in UTC, but this controls how dates are bucketed.

Example:

"UTC"

timeframe
enum<string>

Aggregation timeframe for timeseries data (auto-detected from date range if not specified). Auto-detection uses: minute (<2h), hour (<2d), day (<64d), week (<183d), month (>=183d).

Available options:
minute,
hour,
day,
week,
month
Example:

"day"

bound_to_timeframe
enum<string>
default:true

Whether to adjust start/end dates to align with timeframe boundaries and use exclusive end. Defaults to true. When true, dates are aligned to the start of the timeframe period (e.g., start of day) and end is made exclusive (e.g., start of next day). When false, uses exact dates provided.

Available options:
true,
false
Example:

"true"

endpoint_id
required

Filter by specific endpoint ID(s). Must provide at least 1 endpoint ID (1-50 models). Supports comma-separated values: ?endpoint_id=model1,model2 or array syntax: ?endpoint_id=model1&endpoint_id=model2

Example:
["fal-ai/flux/dev"]
expand
default:["time_series","request_count"]

Data and metrics to include in the response. Use 'time_series' for time-bucketed data, metric names for specific metrics in time series, and 'summary' for aggregate statistics. At least one of 'time_series' or 'summary' and at least one metric are required.

Example:
["request_count", "success_count"]

Response

Analytics data retrieved successfully

Response containing performance analytics with pagination support

next_cursor
string | null
required

Cursor for the next page of results, null if no more pages

has_more
boolean
required

Boolean indicating if more results are available (convenience field derived from next_cursor)

time_series
object[]

Time series analytics data grouped by time bucket (when expand includes 'time_series'). Each bucket contains all analytics records for that time period.

summary
object[]

Aggregate statistics (when expand includes 'summary')