# Fal.ai — how to use (mcp.ai)

Connect your Fal.ai account and use 12 tools for AI models straight from your AI agent. Connect with your own API key. The generative media platform for developers with 600+ AI models for image, video, voice, and audio generation.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_fal_ai?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `fal_ai_cancel_queue_request`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/fal_ai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/fal_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/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 pro
  - body: { model_id: string, request_id: string }
- `POST https://api.mcp.ai/api/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.
  - body: { endpoints: object, estimate_type: string }
- `POST https://api.mcp.ai/api/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 cac
- `POST https://api.mcp.ai/api/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
  - body: { q?: string, limit?: integer, cursor?: string, expand?: string|string[], status?: string, category?: string, endpoint_id?: string|string[] }
- `POST https://api.mcp.ai/api/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.
  - body: { endpoint_id: string|string[] }
- `POST https://api.mcp.ai/api/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 req
  - body: { model_id: string, request_id: string }
- `POST https://api.mcp.ai/api/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
  - body: { logs?: integer, model_id: string, request_id: string }
- `POST https://api.mcp.ai/api/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.
  - body: { logs?: integer, model_id: string, request_id: string }
- `POST https://api.mcp.ai/api/fal_ai/run/model/sync` — Tool to invoke a fal.ai model synchronously via fal.run, generating new content (images, audio, video, or other model outputs) hosted at fal.ai CDN URLs in the response. Each call executes paid infere
  - body: { input: object, model_id: string, runner_hint?: string, timeout_seconds?: integer }
- `POST https://api.mcp.ai/api/fal_ai/submit/async/job` — Tool to submit an asynchronous inference job to fal.ai's queue (queue.fal.run). Use when you want to run a model without blocking — fal.ai persists the request, auto-scales runners, and you fetch the 
  - body: { input: object, model_id: string, no_retry?: boolean, priority?: string, runner_hint?: string, webhook_url?: string, timeout_seconds?: integer }
- `POST https://api.mcp.ai/api/fal_ai/subscribe/async/job` — Tool to submit a fal.ai inference job to the async queue and block until it completes (or a deadline is reached), returning the model's final result. Mirrors fal-js's `subscribe()` ergonomics: SUBMIT_
  - body: { input: object, model_id: string, priority?: string, runner_hint?: string, include_logs?: boolean, timeout_seconds?: integer, max_wait_seconds?: number, poll_interval_seconds?: number }
- `POST https://api.mcp.ai/api/fal_ai/upload/file` — Tool to upload an input media file (image, audio, or video) to fal.ai's CDN and return a public access_url that can be passed as a model input. Many fal.ai models accept a URL for inputs like 'image_u
  - body: { file: object }

## Example prompts
- "What can I do in Fal.ai?"
- "Show me a summary of my Fal.ai account"

## More
- Page: https://mcp.ai/fal_ai
- Agent spec (llms.txt): https://mcp.ai/fal_ai/llms.txt
- Postman collection: https://mcp.ai/fal_ai/postman.json
