Back to Skills

fal-api-reference

verified

Complete fal.ai API reference system. PROACTIVELY activate for: (1) @fal-ai/client JavaScript setup, (2) fal_client Python setup, (3) fal.subscribe/run/stream methods, (4) Queue management (submit/status/result), (5) Webhook configuration, (6) File upload to fal.media, (7) REST API endpoints, (8) Real-time WebSocket connections, (9) Error handling patterns. Provides: Client configuration, method signatures, queue workflow, webhook payloads, common parameters. Ensures correct API usage with proper authentication and error handling.

View on GitHub

Marketplace

claude-plugin-marketplace

JosiahSiegel/claude-plugin-marketplace

Plugin

fal-ai-master

Repository

JosiahSiegel/claude-plugin-marketplace
7stars

plugins/fal-ai-master/skills/fal-api-reference/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/JosiahSiegel/claude-plugin-marketplace/blob/main/plugins/fal-ai-master/skills/fal-api-reference/SKILL.md -a claude-code --skill fal-api-reference

Installation paths:

Claude
.claude/skills/fal-api-reference/
Powered by add-skill CLI

Instructions

## Quick Reference

| Method | Use Case | Code |
|--------|----------|------|
| `fal.subscribe()` | Queue-based (recommended) | `await fal.subscribe("model", { input })` |
| `fal.run()` | Fast endpoints (<30s) | `await fal.run("model", { input })` |
| `fal.stream()` | Progressive output | `for await (const event of stream) {}` |
| `fal.realtime.connect()` | WebSocket interactive | `fal.realtime.connect("model", callbacks)` |

| Queue Method | Purpose |
|--------------|---------|
| `fal.queue.submit()` | Submit job, get request_id |
| `fal.queue.status()` | Check job status |
| `fal.queue.result()` | Get completed result |
| `fal.queue.cancel()` | Cancel pending job |

| Auth | Header | Format |
|------|--------|--------|
| API Key | `Authorization` | `Key YOUR_FAL_KEY` |

## When to Use This Skill

Use for **API integration fundamentals**:
- Setting up fal.ai client in JavaScript/TypeScript
- Setting up fal_client in Python
- Choosing between subscribe, run, and stream methods
- Implementing webhook callbacks
- Uploading files to fal.media CDN

**Related skills:**
- For model selection: see `fal-model-guide`
- For performance optimization: see `fal-optimization`
- For custom model deployment: see `fal-serverless-guide`

---

# fal.ai API Reference

Complete API reference for fal.ai client libraries and REST endpoints.

## Client Libraries

### JavaScript/TypeScript (@fal-ai/client)

```bash
npm install @fal-ai/client
```

#### Configuration

```typescript
import { fal } from "@fal-ai/client";

// Configure credentials (reads FAL_KEY from environment by default)
fal.config({
  credentials: process.env.FAL_KEY,
  // Optional: custom proxy URL for browser apps
  proxyUrl: "https://your-server.com/api/fal-proxy"
});
```

#### Core Methods

**fal.subscribe(endpoint, options)**
Queue-based execution with automatic polling. Recommended for most use cases.

```typescript
const result = await fal.subscribe("fal-ai/flux/dev", {
  input: {
    prompt: "A beautiful landscape"
 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10548 chars