Skip to main content

Documentation Index

Fetch the complete documentation index at: https://fal.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Available Operations

The Platform APIs provide the following endpoints for Serverless Apps:

Files

List Root Directory Contents

List the contents of the root directory of your Serverless storage.

List Directory Contents

List the contents of any nested directory by providing its path.

Download File

Download any file from Serverless storage.

Upload from URL

Upload a file from a URL into Serverless storage.

Upload Local File

Upload a local file into Serverless storage.

Requests

List Requests by Endpoint

List recent requests for your serverless endpoints with filtering, sorting, and pagination. Pass expand=billing to include billable_units per request — the per-request building block for cost reporting on your deployed apps.

Billing

Per-request billing data for your serverless apps is available through the expand=billing parameter on List Requests by Endpoint. Each request in the response includes a billable_units field representing the units fal billed for that invocation.
billable_units is the raw unit count for each request. To compute total cost, multiply by your effective per-unit price for the app. For account-level credit balance, see Account Billing.
Example
curl -G "https://api.fal.ai/v1/serverless/requests/by-endpoint" \
  -H "Authorization: Key $FAL_KEY" \
  --data-urlencode "endpoint_id=your-username/your-app" \
  --data-urlencode "expand=billing"
Sample response shape (truncated):
{
  "items": [
    {
      "request_id": "a1b2c3d4-...",
      "endpoint_id": "your-username/your-app",
      "ended_at": "2025-01-01T00:00:08Z",
      "status_code": 200,
      "duration": 7.8,
      "billable_units": 1.5
    }
  ],
  "next_cursor": "Mg==",
  "has_more": true
}
billable_units will be null if a billing event hasn’t been recorded yet for the request (e.g., the request just completed and the billing pipeline hasn’t caught up).

Logs

Logs History

Query paginated logs with powerful label filters, time ranges, and search keywords.

Logs Stream

Stream live logs that match the provided filters using Server-Sent Events.

Analytics

Analytics

Query time-bucketed metrics across all inbound traffic to your apps, including request counts, success/error rates, and latency percentiles. Ideal for exporting to your own observability tools.

Metrics

Queue Size

Read the current queue backlog for your serverless applications.

Metrics

Export app metrics (runners, queue size, concurrent requests, throughput, and latency) in Prometheus format for custom dashboards and monitoring.