Communitygithub.com

fal-ai-media

fal.ai MCPによる統合メディア生成 — 画像、動画、音声。テキストからの画像生成(Nano Banana)、テキスト/画像からの動画生成(Seedance、Kling、Veo 3)、テキスト読み上げ(CSM-1B)、動画からの音声生成(ThinkSound)。ユーザーがAIで画像、動画、音声を生成したい場合に使用します。

fal-ai-media とは?

このスキルは、fal.aiのMCPサーバーを通じて、画像、動画、音声の生成を統合的に行うためのツールです。テキストからの画像生成(Nano Banana 2 / Pro)、テキストや画像からの動画生成(Seedance、Kling、Veo 3)、自然な会話音声の合成(CSM-1B)、動画に合わせた音声効果の生成(ThinkSound)など、多彩なメディア生成機能を提供します。各モデルの入力パラメータ(プロンプト、画像サイズ、継続時間、アスペクト比、シード値など)を細かく指定でき、生成コストの事前見積もりにも対応しています。生成結果の再現性を高めるためのシード指定や、低コストモデルでの試作後に高品質モデルで最終生成を行うといったワークフローも推奨されています。Claude Code、Cursor、CodexなどのAIエージェントが、ユーザーの指示に応じて適切なモデルとパラメータを選択し、メディアを生成する際に威力を発揮します。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/fal-ai-media

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

fal.ai メディア生成

仕様変更が多いスキルです。 fal.aiのモデルID、料金、入力パラメータ、MCPツール名は頻繁に変更されます。特定のモデル、パラメータ、出力形式、コストを約束する前に、現在のモデルメタデータを検索または取得してください。

MCPを介してfal.aiモデルを使用し、画像、動画、音声を生成します。

有効タイミング

  • ユーザーがテキストプロンプトから画像を生成したい場合
  • テキストや画像から動画を作成する場合
  • 音声、音楽、効果音を生成する場合
  • メディア生成に関するあらゆるタスク
  • ユーザーが「画像生成」「動画作成」「テキスト読み上げ」「サムネイル作成」などと発言した場合

MCP要件

fal.ai MCPサーバーが設定されている必要があります。~/.claude.json に以下を追加してください:

"fal-ai": {
  "command": "npx",
  "args": ["-y", "fal-ai-mcp-server"],
  "env": { "FAL_KEY": "YOUR_FAL_KEY_HERE" }
}

APIキーは fal.ai で取得してください。

MCPツール

fal.ai MCPは以下のツールを提供します:

  • search — キーワードで利用可能なモデルを検索
  • find — モデルの詳細とパラメータを取得
  • generate — パラメータを指定してモデルを実行
  • result — 非同期生成のステータスを確認
  • status — ジョブの状態を確認
  • cancel — 実行中のジョブをキャンセル
  • estimate_cost — 生成コストを見積もる
  • models — 人気モデルを一覧表示
  • upload — 入力として使用するファイルをアップロード

画像生成

Nano Banana 2 (高速)

最適: 素早い反復、下書き、テキストからの画像生成、画像編集。

generate(
  app_id: "fal-ai/nano-banana-2",
  input_data: {
    "prompt": "a futuristic cityscape at sunset, cyberpunk style",
    "image_size": "landscape_16_9",
    "num_images": 1,
    "seed": 42
  }
)

Nano Banana Pro (高忠実度)

最適: プロダクション画像、リアリズム、文字表示、詳細なプロンプト。

generate(
  app_id: "fal-ai/nano-banana-pro",
  input_data: {
    "prompt": "professional product photo of wireless headphones on marble surface, studio lighting",
    "image_size": "square",
    "num_images": 1,
    "guidance_scale": 7.5
  }
)

共通画像パラメータ

パラメータ型オプション備考
promptstring必須生成したい内容を記述
image_sizestringsquare, portrait_4_3, landscape_16_9, portrait_16_9, landscape_4_3アスペクト比
num_imagesnumber1-4生成枚数
seednumber任意の整数再現性
guidance_scalenumber1-20プロンプトへの忠実度(高いほど忠実)

画像編集

入力画像を使用してインペインティング、アウトペインティング、スタイル変換を行うには、Nano Banana 2を使用:

# まずソース画像をアップロード
upload(file_path: "/path/to/image.png")

# 次に画像入力で生成
generate(
  app_id: "fal-ai/nano-banana-2",
  input_data: {
    "prompt": "same scene but in watercolor style",
    "image_url": "<uploaded_url>",
    "image_size": "landscape_16_9"
  }
)

動画生成

Seedance 1.0 Pro (ByteDance)

最適: テキストからの動画生成、高モーションクオリティの画像からの動画生成。

generate(
  app_id: "fal-ai/seedance-1-0-pro",
  input_data: {
    "prompt": "a drone flyover of a mountain lake at golden hour, cinematic",
    "duration": "5s",
    "aspect_ratio": "16:9",
    "seed": 42
  }
)

Kling Video v3 Pro

最適: ネイティブ音声生成を伴うテキスト/画像からの動画生成。

generate(
  app_id: "fal-ai/kling-video/v3/pro",
  input_data: {
    "prompt": "ocean waves crashing on a rocky coast, dramatic clouds",
    "duration": "5s",
    "aspect_ratio": "16:9"
  }
)

Veo 3 (Google DeepMind)

最適: 生成音声付き動画、高画質。

generate(
  app_id: "fal-ai/veo-3",
  input_data: {
    "prompt": "a bustling Tokyo street market at night, neon signs, crowd noise",
    "aspect_ratio": "16:9"
  }
)

画像から動画へ

既存の画像から開始:

generate(
  app_id: "fal-ai/seedance-1-0-pro",
  input_data: {
    "prompt": "camera slowly zooms out, gentle wind moves the trees",
    "image_url": "<uploaded_image_url>",
    "duration": "5s"
  }
)

動画パラメータ

パラメータ型オプション備考
promptstring必須動画の内容を記述
durationstring"5s", "10s"動画の長さ
aspect_ratiostring"16:9", "9:16", "1:1"フレーム比率
seednumber任意の整数再現性
image_urlstringURL画像から動画生成の際のソース画像

音声生成

CSM-1B (会話音声)

自然で会話のような品質のテキスト読み上げ。

generate(
  app_id: "fal-ai/csm-1b",
  input_data: {
    "text": "Hello, welcome to the demo. Let me show you how this works.",
    "speaker_id": 0
  }
)

ThinkSound (動画から音声へ)

動画コンテンツからマッチする音声を生成。

generate(
  app_id: "fal-ai/thinksound",
  input_data: {
    "video_url": "<video_url>",
    "prompt": "ambient forest sounds with birds chirping"
  }
)

ElevenLabs (API経由、MCPなし)

プロフェッショナルな音声合成には、ElevenLabsを直接使用:

import os
import requests

resp = requests.post(
    "https://api.elevenlabs.io/v1/text-to-speech/<voice_id>",
    headers={
        "xi-api-key": os.environ["ELEVENLABS_API_KEY"],
        "Content-Type": "application/json"
    },
    json={
        "text": "Your text here",
        "model_id": "eleven_turbo_v2_5",
        "voice_settings": {"stability": 0.5, "similarity_boost": 0.75}
    }
)
with open("output.mp3", "wb") as f:
    f.write(resp.content)

VideoDB 生成音声

VideoDBが設定されている場合、その生成音声機能を使用:

# 音声生成
audio = coll.generate_voice(text="Your narration here", voice="alloy")

# 音楽生成
music = coll.generate_music(prompt="upbeat electronic background music", duration=30)

# 効果音
sfx = coll.generate_sound_effect(prompt="thunder crack followed by rain")

コスト見積もり

生成前に、推定コストを確認:

estimate_cost(
  estimate_type: "unit_price",
  endpoints: {
    "fal-ai/nano-banana-pro": {
      "unit_quantity": 1
    }
  }
)

モデル検索

特定のタスクに適したモデルを検索:

search(query: "text to video")
find(endpoint_ids: ["fal-ai/seedance-1-0-pro"])
models()

ヒント

  • プロンプトの反復時には seed を使用して再現可能な結果を得る
  • プロンプトの試行には低コストのモデル(Nano Banana 2)を使用し、最終版ではProに切り替える
  • 動画の場合、プロンプトは説明的でありながら簡潔に — 動きやシーンに焦点を当てる
  • 画像から動画への変換は、テキストのみの動画生成よりも制御された結果が得られる
  • 高額な動画生成を実行する前に estimate_cost でコストを確認する

関連スキル

  • tasteforge-video — オフラインのテイスト蒸留とモダリティ計画。そのエンドポイント候補とリクエストマニフェストは参照のみであり、送信されたジョブや保存されたFalワークフローではありません。TasteForgeの引き継ぎはアップロードや生成を許可しません。実行前に、個別に認可されたプロバイダーワークフローを使用し、その現在のエンドポイントスキーマを確認してください。
  • videodb — 動画処理、編集、ストリーミング
  • video-editing — AIを活用した動画編集ワークフロー
  • content-engine — ソーシャルプラットフォーム向けコンテンツ作成

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル