Billing Events
get_billing_eventsRetrieve individual billing events by endpoint and date range to audit costs, track usage patterns, and debug specific API requests.
Instructions
Returns paginated individual billing event records with filters for endpoint and date range. Each record includes the request ID, timestamp, endpoint, output units billed, and a cost breakdown in USD (cost_subtotal, cost_discount, cost_total; cost_estimate_nano_usd carries cost_total in nano USD).
Key Features:
Individual billing event records for each API request
Per-request cost breakdown before and after discounts
Flexible date range filtering
Optional endpoint filtering
Cursor-based pagination for efficient large dataset queries
Limited to 10000 records per page for performance
Date range capped at 90 days per request
Common Use Cases:
Audit individual billing events
Track request patterns and volumes
Debug specific requests by ID
Monitor billing unit consumption per request
See fal.ai docs for more details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End date in ISO8601 format, exclusive (e.g., '2025-02-01T00:00:00Z' or '2025-02-01'). Data up to but not including this timestamp is returned. Defaults to current time. | |
| limit | No | Maximum number of items to return. Actual maximum depends on query type and expansion parameters. | |
| start | No | Start date in ISO8601 format (e.g., '2025-01-01T00:00:00Z' or '2025-01-01'). Defaults to 24 hours ago. | |
| cursor | No | Pagination cursor from previous response. Encodes the page number. | |
| expand | No | Data to include in the response. Use 'auth_method' for a formatted authentication method label, and 'auth_method_structured' for a machine-readable auth method object (detail, api_key_id, login_username). | |
| account | No | Exact private account key profile label, not an authenticated provider owner ID. | |
| api_key_id | No | Filter by specific API key ID(s). Accepts 1-50 key IDs. Supports comma-separated values: ?api_key_id=key1,key2 or array syntax: ?api_key_id=key1&api_key_id=key2 | |
| request_id | No | Filter by specific request ID(s). Accepts 1-50 request IDs. Supports comma-separated values: ?request_id=req1,req2 or array syntax: ?request_id=req1&request_id=req2 | |
| endpoint_id | No | Filter by specific endpoint ID(s). Accepts 1-50 endpoint IDs. Supports comma-separated values: ?endpoint_id=model1,model2 or array syntax: ?endpoint_id=model1&endpoint_id=model2 | |
| login_username | No | Filter by team member login username(s) (nickname). Accepts 1-50 usernames. Supports comma-separated values: ?login_username=alice,bob or array syntax: ?login_username=alice&login_username=bob |