# Fal.ai

The generative media platform for developers with 600+ AI models for image, video, voice, and audio generation

- **Category:** ai models
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 8
- **Triggers:** 0
- **Slug:** `FAL_AI`
- **Version:** 20260312_00

## Tools

### Cancel Queue Request

**Slug:** `FAL_AI_CANCEL_QUEUE_REQUEST`

Tool to cancel a queued or in-progress request in fal.ai's queue system. Use when you need to stop a request before it completes. Note that cancellation only succeeds if the request hasn't started processing; if already completed, returns an error status. Even with successful cancellation, the request may still execute if it was near the front of the queue.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | The model identifier in namespace/name format (e.g., 'fal-ai/flux', 'fal-ai/fast-sdxl') |
| `request_id` | string | Yes | The unique identifier of the queued request to cancel |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Estimate Pricing

**Slug:** `FAL_AI_ESTIMATE_PRICING`

Tool to estimate pricing for fal.ai model endpoints. Use when you need to calculate expected costs for API calls or unit-based usage across one or more endpoints.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `endpoints` | object | Yes | Map of endpoint IDs (e.g., 'fal-ai/flux/dev') to their quantity specifications. Use call_quantity for historical_api_price or unit_quantity for unit_price |
| `estimate_type` | string ("historical_api_price" | "unit_price") | Yes | Estimation method: 'historical_api_price' for call-based estimates or 'unit_price' for unit-based estimates |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get JWKS for Webhook Verification

**Slug:** `FAL_AI_GET_JWKS`

Tool to retrieve public keys for webhook signature verification. Returns a JSON Web Key Set containing ED25519 public keys. Use when you need to verify webhook signatures from fal.ai. The keys are cacheable but should be refreshed at least every 24 hours.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Models

**Slug:** `FAL_AI_GET_MODELS`

Tool to discover and search fal.ai model endpoints. Use when you need to list all models, find specific models by ID, or search by category/query. Supports pagination and optional expansion of OpenAPI schemas.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | No | Free-text search query. Filters models by name, description, or category. Use for broad text-based searches. |
| `limit` | integer | No | Maximum number of items to return. Actual maximum depends on query type. |
| `cursor` | string | No | Pagination cursor from previous response. Encodes page number for fetching next page. |
| `expand` | string | No | Fields to expand in response. Supports 'openapi-3.0' to include full OpenAPI schema for each model. |
| `status` | string ("active" | "deprecated") | No | Filter models by status. Use 'active' for currently supported models or 'deprecated' for outdated ones. Omit to include all statuses. |
| `category` | string | No | Filter models by specific category. Use exact category names like 'text-to-image', 'image-to-video', etc. |
| `endpoint_id` | string | No | Specific endpoint ID(s) to retrieve. Accepts a single string or array of strings (1-50 models). Use to filter models by their unique identifiers. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Model Pricing

**Slug:** `FAL_AI_GET_PRICING`

Tool to retrieve unit pricing for model endpoints. Returns pricing information including unit price, billing unit, and currency. Use when you need to check costs for specific fal.ai models.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `endpoint_id` | string | Yes | Filter by specific endpoint ID(s). Accepts 1-50 endpoint IDs. Can be a single endpoint ID string or a list of endpoint IDs. Examples: 'fal-ai/flux/dev' or ['fal-ai/flux/dev', 'fal-ai/flux/pro'] |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Queue Request Result

**Slug:** `FAL_AI_GET_QUEUE_REQUEST_RESULT`

Tool to retrieve the final result of a completed queue request. Use when you need to get the output of a model request that was submitted to the queue and has finished processing. Only works after request status transitions to COMPLETED.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model_id` | string | Yes | The model identifier in namespace/name format (e.g., 'fal-ai/flux', 'fal-ai/fast-sdxl') |
| `request_id` | string | Yes | The unique identifier of the queued request to retrieve results for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check Queue Request Status

**Slug:** `FAL_AI_QUEUE_GET_STATUS`

Tool to check the status of a queued request in fal.ai. Use when you need to monitor the progress of an async request. Returns different information based on status: queue position when IN_QUEUE, logs when IN_PROGRESS or COMPLETED.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `logs` | integer | No | Set to 1 to enable log retrieval in the response; disabled by default for performance |
| `model_id` | string | Yes | Model identifier in namespace/name format (e.g., 'fal-ai/fast-sdxl') |
| `request_id` | string | Yes | Unique identifier returned after submitting a request |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stream Request Status Updates

**Slug:** `FAL_AI_QUEUE_GET_STATUS_STREAM`

Tool to stream request status updates via SSE. Use when you need real-time updates on a queued request's processing state.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `logs` | integer | No | Set to 1 to include detailed logging information in the stream, 0 or omit to exclude logs |
| `model_id` | string | Yes | The model identifier (e.g., 'fal-ai/fast-lightning-sdxl') |
| `request_id` | string | Yes | The unique identifier returned when submitting a request |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
