Skip to main content
Glama

Billing Events

get_billing_events
Read-onlyIdempotent

Retrieve paginated individual billing event records with cost breakdowns, filtered by endpoint and date range, to audit API usage and debug specific 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

TableJSON Schema
NameRequiredDescriptionDefault
endNoEnd 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.
limitNoMaximum number of items to return. Actual maximum depends on query type and expansion parameters.
startNoStart date in ISO8601 format (e.g., '2025-01-01T00:00:00Z' or '2025-01-01'). Defaults to 24 hours ago.
cursorNoPagination cursor from previous response. Encodes the page number.
expandNoData 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).
accountNoExact private account key profile label, not an authenticated provider owner ID.
api_key_idNoFilter 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_idNoFilter 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_idNoFilter 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_usernameNoFilter 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description only needs to add constraints beyond that. It does: a 10,000-record per-page cap and a 90-day date-range cap are operational limits not expressible in annotations, and the record field breakdown compensates for the absent output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most important content (what it returns, with what filters) is front-loaded, and the feature/use-case bullets are scannable. There is mild redundancy, since 'Flexible date range filtering' and 'Optional endpoint filtering' repeat the opening sentence and several use cases restate features, but nothing is padded egregiously.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, ten-parameter list endpoint with no output schema, the description supplies the missing pieces: the per-record return fields and USD cost breakdown, pagination mechanics, page-size and date-range caps, and default time windows. An agent has everything needed to call and interpret it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all ten parameters in detail, including date formats, array/comma syntax, and defaults. The description only restates 'endpoint' and 'date range' filtering generically, adding no syntax or format detail beyond the schema; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Returns paginated individual billing event records') and adds filters and scope. The emphasis on 'individual billing event records for each API request' distinguishes it by granularity from aggregate siblings like get_usage, get_analytics, and get_account_billing, so an agent can select it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Common Use Cases' block gives concrete selection contexts: auditing individual events, tracking request volumes, debugging specific requests by ID, and monitoring per-request unit consumption. It lacks any explicit when-not or named alternative (e.g., 'for aggregate totals use get_usage'), which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.