{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fal-text-to-image",
    "name": "Fal Text-to-Image",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/delorenj/fal-text-to-image",
    "canonicalUrl": "https://clawhub.ai/delorenj/fal-text-to-image",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/fal-text-to-image",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fal-text-to-image",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "CHEATSHEET.md",
      "README.md",
      "SKILL.md",
      "pyproject.toml",
      "references/model-comparison.md",
      "references/usage-examples.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/fal-text-to-image"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/fal-text-to-image",
    "agentPageUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "fal.ai Image Generation & Editing Skill",
        "body": "Professional AI-powered image workflows using fal.ai's state-of-the-art models including FLUX, Recraft V3, Imagen4, and more."
      },
      {
        "title": "1. Text-to-Image (fal-text-to-image)",
        "body": "Generate images from scratch using text prompts"
      },
      {
        "title": "2. Image Remix (fal-image-remix)",
        "body": "Transform existing images while preserving composition"
      },
      {
        "title": "3. Image Edit (fal-image-edit)",
        "body": "Targeted inpainting and masked editing"
      },
      {
        "title": "When to Use This Skill",
        "body": "Trigger when user:\n\nRequests image generation from text descriptions\nWants to transform/remix existing images with AI\nNeeds to edit specific regions of images (inpainting)\nWants to create images with specific styles (vector, realistic, typography)\nNeeds high-resolution professional images (up to 2K)\nWants to use a reference image for style transfer\nMentions specific models like FLUX, Recraft, or Imagen\nAsks for logo, poster, or brand-style image generation\nNeeds object removal or targeted modifications"
      },
      {
        "title": "Text-to-Image: Generate from Scratch",
        "body": "# Basic generation\nuv run python fal-text-to-image \"A cyberpunk city at sunset with neon lights\"\n\n# With specific model\nuv run python fal-text-to-image -m flux-pro/v1.1-ultra \"Professional headshot\"\n\n# With style reference\nuv run python fal-text-to-image -i reference.jpg \"Mountain landscape\" -m flux-2/lora/edit"
      },
      {
        "title": "Image Remix: Transform Existing Images",
        "body": "# Transform style while preserving composition\nuv run python fal-image-remix input.jpg \"Transform into oil painting\"\n\n# With strength control (0.0=original, 1.0=full transformation)\nuv run python fal-image-remix photo.jpg \"Anime style character\" --strength 0.6\n\n# Premium quality remix\nuv run python fal-image-remix -m flux-1.1-pro image.jpg \"Professional portrait\""
      },
      {
        "title": "Image Edit: Targeted Modifications",
        "body": "# Edit with mask image (white=edit area, black=preserve)\nuv run python fal-image-edit input.jpg mask.png \"Replace with flowers\"\n\n# Auto-generate mask from text\nuv run python fal-image-edit input.jpg --mask-prompt \"sky\" \"Make it sunset\"\n\n# Remove objects\nuv run python fal-image-edit photo.jpg mask.png \"Remove object\" --strength 1.0\n\n# General editing (no mask)\nuv run python fal-image-edit photo.jpg \"Enhance lighting and colors\""
      },
      {
        "title": "Model Selection Guide",
        "body": "The script intelligently selects the best model based on task context:"
      },
      {
        "title": "flux-pro/v1.1-ultra (Default for High-Res)",
        "body": "Best for: Professional photography, high-resolution outputs (up to 2K)\nStrengths: Photo realism, professional quality\nUse when: User needs publication-ready images\nEndpoint: fal-ai/flux-pro/v1.1-ultra"
      },
      {
        "title": "recraft/v3/text-to-image (SOTA Quality)",
        "body": "Best for: Typography, vector art, brand-style images, long text\nStrengths: Industry-leading benchmark scores, precise text rendering\nUse when: Creating logos, posters, or text-heavy designs\nEndpoint: fal-ai/recraft/v3/text-to-image"
      },
      {
        "title": "flux-2 (Best Balance)",
        "body": "Best for: General-purpose image generation\nStrengths: Enhanced realism, crisp text, native editing\nUse when: Standard image generation needs\nEndpoint: fal-ai/flux-2"
      },
      {
        "title": "flux-2/lora (Custom Styles)",
        "body": "Best for: Domain-specific styles, fine-tuned variations\nStrengths: Custom style adaptation\nUse when: User wants specific artistic styles\nEndpoint: fal-ai/flux-2/lora"
      },
      {
        "title": "flux-2/lora/edit (Style Transfer)",
        "body": "Best for: Image-to-image editing with style references\nStrengths: Specialized style transfer\nUse when: User provides reference image with -i flag\nEndpoint: fal-ai/flux-2/lora/edit"
      },
      {
        "title": "imagen4/preview (Google Quality)",
        "body": "Best for: High-quality general images\nStrengths: Google's highest quality model\nUse when: User specifically requests Imagen or Google models\nEndpoint: fal-ai/imagen4/preview"
      },
      {
        "title": "stable-diffusion-v35-large (Typography & Style)",
        "body": "Best for: Complex prompts, typography, style control\nStrengths: Advanced prompt understanding, resource efficiency\nUse when: Complex multi-element compositions\nEndpoint: fal-ai/stable-diffusion-v35-large"
      },
      {
        "title": "ideogram/v2 (Typography Specialist)",
        "body": "Best for: Posters, logos, text-heavy designs\nStrengths: Exceptional typography, realistic outputs\nUse when: Text accuracy is critical\nEndpoint: fal-ai/ideogram/v2"
      },
      {
        "title": "bria/text-to-image/3.2 (Commercial Safe)",
        "body": "Best for: Commercial projects requiring licensed training data\nStrengths: Safe for commercial use, excellent text rendering\nUse when: Legal/licensing concerns matter\nEndpoint: fal-ai/bria/text-to-image/3.2"
      },
      {
        "title": "Command-Line Interface",
        "body": "uv run python fal-text-to-image [OPTIONS] PROMPT\n\nArguments:\n  PROMPT                    Text description of the image to generate\n\nOptions:\n  -m, --model TEXT         Model to use (see model list above)\n  -i, --image TEXT         Path or URL to reference image for style transfer\n  -o, --output TEXT        Output filename (default: generated_image.png)\n  -s, --size TEXT          Image size (e.g., \"1024x1024\", \"landscape_16_9\")\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps (model-dependent)\n  --guidance FLOAT         Guidance scale (higher = more prompt adherence)\n  --help                   Show this message and exit"
      },
      {
        "title": "Authentication Setup",
        "body": "Before first use, set your fal.ai API key:\n\nexport FAL_KEY=\"your-api-key-here\"\n\nOr create a .env file in the skill directory:\n\nFAL_KEY=your-api-key-here\n\nGet your API key from: https://fal.ai/dashboard/keys"
      },
      {
        "title": "High-Resolution Professional Photo",
        "body": "uv run python fal-text-to-image \\\n  -m flux-pro/v1.1-ultra \\\n  \"Professional headshot of a business executive in modern office\" \\\n  -s 2048x2048"
      },
      {
        "title": "Logo/Typography Design",
        "body": "uv run python fal-text-to-image \\\n  -m recraft/v3/text-to-image \\\n  \"Modern tech startup logo with text 'AI Labs' in minimalist style\""
      },
      {
        "title": "Style Transfer from Reference",
        "body": "uv run python fal-text-to-image \\\n  -m flux-2/lora/edit \\\n  -i artistic_style.jpg \\\n  \"Portrait of a woman in a garden\""
      },
      {
        "title": "Reproducible Generation",
        "body": "uv run python fal-text-to-image \\\n  -m flux-2 \\\n  --seed 42 \\\n  \"Futuristic cityscape with flying cars\""
      },
      {
        "title": "Model Selection Logic",
        "body": "The script automatically selects the best model when -m is not specified:\n\nIf -i provided: Uses flux-2/lora/edit for style transfer\nIf prompt contains typography keywords (logo, text, poster, sign): Uses recraft/v3/text-to-image\nIf prompt suggests high-res needs (professional, portrait, headshot): Uses flux-pro/v1.1-ultra\nIf prompt mentions vector/brand: Uses recraft/v3/text-to-image\nDefault: Uses flux-2 for general purpose"
      },
      {
        "title": "Output Format",
        "body": "Generated images are saved with metadata:\n\nFilename includes timestamp and model name\nEXIF data stores prompt, model, and parameters\nConsole displays generation time and cost estimate"
      },
      {
        "title": "Troubleshooting",
        "body": "ProblemSolutionFAL_KEY not setExport FAL_KEY environment variable or create .env fileModel not foundCheck model name against supported listImage reference failsEnsure image path/URL is accessibleGeneration timeoutSome models take longer; wait or try faster modelRate limit errorCheck fal.ai dashboard for usage limits"
      },
      {
        "title": "Cost Optimization",
        "body": "Free tier: FLUX.2 offers 100 free requests (expires Dec 25, 2025)\nPay per use: FLUX Pro charges per megapixel\nBudget option: Use flux-2 or stable-diffusion-v35-large for general use\nPremium: Use flux-pro/v1.1-ultra only when high-res is required"
      },
      {
        "title": "Image Remix: Model Selection Guide",
        "body": "Available models for image-to-image remixing:"
      },
      {
        "title": "flux-2/dev (Default, Free)",
        "body": "Best for: General remixing, style transfer, fast iteration\nStrengths: Balanced quality/speed, 100 free requests\nUse when: Standard remixing needs\nEndpoint: fal-ai/flux/dev/image-to-image"
      },
      {
        "title": "flux-pro (Premium Quality)",
        "body": "Best for: Professional remixing, high-quality outputs\nStrengths: Superior quality, realistic transformations\nUse when: Professional or publication-ready remixes\nEndpoint: fal-ai/flux-pro"
      },
      {
        "title": "flux-1.1-pro (Ultra Premium)",
        "body": "Best for: Highest quality remixing with maximum detail\nStrengths: Ultra-high quality, exceptional detail preservation\nUse when: Premium projects requiring best possible output\nEndpoint: fal-ai/flux-pro/v1.1"
      },
      {
        "title": "recraft/v3 (Vector/Illustration)",
        "body": "Best for: Vector style, brand imagery, illustration remixing\nStrengths: Clean vector outputs, brand-style transformations\nUse when: Converting to illustration or vector style\nEndpoint: fal-ai/recraft/v3/text-to-image"
      },
      {
        "title": "stable-diffusion-v35 (Artistic)",
        "body": "Best for: Artistic styles, painting effects, creative remixing\nStrengths: Strong artistic style application\nUse when: Artistic or stylized transformations\nEndpoint: fal-ai/stable-diffusion-v35-large"
      },
      {
        "title": "Image Remix: Command-Line Interface",
        "body": "uv run python fal-image-remix [OPTIONS] INPUT_IMAGE PROMPT\n\nArguments:\n  INPUT_IMAGE               Path or URL to source image\n  PROMPT                    How to transform the image\n\nOptions:\n  -m, --model TEXT         Model to use (auto-selected if not specified)\n  -o, --output TEXT        Output filename (default: remixed_TIMESTAMP.png)\n  -s, --strength FLOAT     Transformation strength 0.0-1.0 (default: 0.75)\n                           0.0 = preserve original, 1.0 = full transformation\n  --guidance FLOAT         Guidance scale (default: 7.5)\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps\n  --help                   Show help"
      },
      {
        "title": "Remix Strength Guide",
        "body": "The --strength parameter controls transformation intensity:\n\nStrengthEffectUse Case0.3-0.5Subtle changesMinor color adjustments, lighting tweaks0.5-0.7Moderate changesStyle hints while preserving details0.7-0.85Strong changesClear style transfer, significant transformation0.85-1.0Maximum changesComplete style overhaul, dramatic transformation"
      },
      {
        "title": "Remix Examples",
        "body": "# Subtle artistic style (low strength)\nuv run python fal-image-remix photo.jpg \"Oil painting style\" --strength 0.4\n\n# Balanced transformation (default)\nuv run python fal-image-remix input.jpg \"Cyberpunk neon aesthetic\"\n\n# Strong transformation (high strength)\nuv run python fal-image-remix portrait.jpg \"Anime character\" --strength 0.9\n\n# Vector conversion\nuv run python fal-image-remix -m recraft/v3 logo.png \"Clean vector illustration\"\n\n# Premium quality remix\nuv run python fal-image-remix -m flux-1.1-pro photo.jpg \"Professional studio portrait\""
      },
      {
        "title": "Image Edit: Model Selection Guide",
        "body": "Available models for targeted editing and inpainting:"
      },
      {
        "title": "flux-2/redux (General Editing)",
        "body": "Best for: General image editing without masks\nStrengths: Fast, balanced, good for overall adjustments\nUse when: No specific region targeting needed\nEndpoint: fal-ai/flux-2/redux"
      },
      {
        "title": "flux-2/fill (Inpainting, Default)",
        "body": "Best for: Masked region editing, object removal, filling\nStrengths: Seamless inpainting, natural blending\nUse when: Editing specific masked regions\nEndpoint: fal-ai/flux-2/fill"
      },
      {
        "title": "flux-pro-v11/fill (Premium Inpainting)",
        "body": "Best for: Professional inpainting with highest quality\nStrengths: Superior quality, professional results\nUse when: Premium quality inpainting required\nEndpoint: fal-ai/flux-pro-v11/fill"
      },
      {
        "title": "stable-diffusion-v35/inpainting (Artistic Inpainting)",
        "body": "Best for: Artistic edits, creative inpainting\nStrengths: Strong artistic control, detailed generation\nUse when: Artistic or stylized edits\nEndpoint: fal-ai/stable-diffusion-v35-large/inpainting"
      },
      {
        "title": "ideogram/v2/edit (Realistic Editing)",
        "body": "Best for: Realistic modifications, precise edits\nStrengths: High realism, precise control\nUse when: Realistic edits required\nEndpoint: fal-ai/ideogram/v2/edit"
      },
      {
        "title": "recraft/v3/svg (Vector Editing)",
        "body": "Best for: Vector style edits, clean illustrations\nStrengths: Clean vector outputs, illustration style\nUse when: Vector or illustration edits\nEndpoint: fal-ai/recraft/v3/svg"
      },
      {
        "title": "Image Edit: Command-Line Interface",
        "body": "uv run python fal-image-edit [OPTIONS] INPUT_IMAGE [MASK_IMAGE] PROMPT\n\nArguments:\n  INPUT_IMAGE               Path or URL to source image\n  MASK_IMAGE                Path or URL to mask (white=edit, black=preserve) [optional]\n  PROMPT                    How to edit the masked region\n\nOptions:\n  -m, --model TEXT         Model to use (auto-selected if not specified)\n  -o, --output TEXT        Output filename (default: edited_TIMESTAMP.png)\n  --mask-prompt TEXT       Generate mask from text (no mask image needed)\n  -s, --strength FLOAT     Edit strength 0.0-1.0 (default: 0.95)\n  --guidance FLOAT         Guidance scale (default: 7.5)\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps\n  --help                   Show help"
      },
      {
        "title": "Edit Strength Guide",
        "body": "The --strength parameter controls edit intensity:\n\nStrengthEffectUse Case0.5-0.7Subtle editsMinor touch-ups, color adjustments0.7-0.9Moderate editsClear modifications while blending naturally0.9-1.0Strong editsComplete replacement, object removal"
      },
      {
        "title": "Creating Mask Images",
        "body": "Mask images define edit regions:\n\nWhite (255): Areas to edit/modify\nBlack (0): Areas to preserve unchanged\nGray: Partial blending (proportional to brightness)\n\nCreate masks using:\n\nImage editors (GIMP, Photoshop, Krita)\nPaint tools (select and fill with white/black)\nText-based prompts (--mask-prompt flag)"
      },
      {
        "title": "Edit Examples",
        "body": "# Edit with mask image\nuv run python fal-image-edit photo.jpg mask.png \"Replace with beautiful garden\"\n\n# Auto-generate mask from text\nuv run python fal-image-edit landscape.jpg --mask-prompt \"sky\" \"Make it sunset with clouds\"\n\n# Remove objects\nuv run python fal-image-edit photo.jpg object_mask.png \"Remove completely\" --strength 1.0\n\n# Seamless object insertion\nuv run python fal-image-edit room.jpg region_mask.png \"Add modern sofa\" --strength 0.85\n\n# General editing (no mask)\nuv run python fal-image-edit -m flux-2/redux photo.jpg \"Enhance lighting and saturation\"\n\n# Premium quality inpainting\nuv run python fal-image-edit -m flux-pro-v11/fill image.jpg mask.png \"Professional portrait background\"\n\n# Artistic modification\nuv run python fal-image-edit -m stable-diffusion-v35/inpainting photo.jpg mask.png \"Van Gogh style\""
      },
      {
        "title": "File Structure",
        "body": "fal-text-to-image/\n├── SKILL.md                    # This file\n├── README.md                   # Quick reference\n├── pyproject.toml              # Dependencies (uv)\n├── fal-text-to-image           # Text-to-image generation script\n├── fal-image-remix             # Image-to-image remixing script\n├── fal-image-edit              # Image editing/inpainting script\n├── references/\n│   └── model-comparison.md     # Detailed model benchmarks\n└── outputs/                    # Generated images (created on first run)"
      },
      {
        "title": "Dependencies",
        "body": "Managed via uv:\n\nfal-client: Official fal.ai Python SDK\npython-dotenv: Environment variable management\npillow: Image handling and EXIF metadata\nclick: CLI interface"
      },
      {
        "title": "General",
        "body": "Model Selection: Let scripts auto-select unless you have specific needs\nPrompt Engineering: Be specific and descriptive for better outputs\nCost Awareness: Monitor usage on fal.ai dashboard\nReproducibility: Use --seed for consistent results during iteration"
      },
      {
        "title": "Text-to-Image",
        "body": "Reference Images: Use high-quality references for best style transfer results\nSize Selection: Match aspect ratio to intended use (square, landscape, portrait)\nModel Choice: Use recraft/v3 for typography, flux-pro for professional photography"
      },
      {
        "title": "Image Remix",
        "body": "Strength Tuning: Start with default (0.75), adjust based on desired transformation\nSource Quality: Higher quality source images produce better remixes\nIteration: Use --seed to iterate on same generation with different prompts\nBalance: Lower strength preserves more detail, higher creates more dramatic changes"
      },
      {
        "title": "Image Edit",
        "body": "Mask Quality: Clean, well-defined masks produce better results\nMask Creation: Use image editors for precise control, --mask-prompt for quick tests\nBlending: Use gray tones in masks for smooth transitions\nEdit Strength: Use 0.95+ for object removal, 0.7-0.9 for modifications\nTest First: Try --mask-prompt before creating detailed masks\nMultiple Edits: Edit in stages rather than all at once for complex modifications"
      },
      {
        "title": "Resources",
        "body": "fal.ai Documentation: https://docs.fal.ai/\nModel Playground: https://fal.ai/explore/search\nAPI Keys: https://fal.ai/dashboard/keys\nPricing: https://fal.ai/pricing"
      },
      {
        "title": "Complete Image Creation Pipeline",
        "body": "# 1. Generate base image\nuv run python fal-text-to-image -m flux-2 \"Modern office space, minimalist\" -o base.png\n\n# 2. Remix to different style\nuv run python fal-image-remix base.png \"Cyberpunk aesthetic with neon\" -o styled.png\n\n# 3. Edit specific region\nuv run python fal-image-edit styled.png --mask-prompt \"desk\" \"Add holographic display\""
      },
      {
        "title": "Iterative Refinement",
        "body": "# Generate with seed for reproducibility\nuv run python fal-text-to-image \"Mountain landscape\" --seed 42 -o v1.png\n\n# Remix with same seed, different style\nuv run python fal-image-remix v1.png \"Oil painting style\" --seed 42 -o v2.png\n\n# Fine-tune with editing\nuv run python fal-image-edit v2.png --mask-prompt \"sky\" \"Golden hour lighting\" --seed 42"
      },
      {
        "title": "Object Removal and Replacement",
        "body": "# 1. Remove unwanted object\nuv run python fal-image-edit photo.jpg object_mask.png \"Remove\" --strength 1.0 -o removed.png\n\n# 2. Fill with new content\nuv run python fal-image-edit removed.png region_mask.png \"Beautiful flowers\" --strength 0.9"
      },
      {
        "title": "Troubleshooting",
        "body": "ProblemSolutionToolFAL_KEY not setExport FAL_KEY or create .env fileAllModel not foundCheck model name in documentationAllImage upload failsCheck file exists and is readableRemix, EditMask not workingVerify mask is grayscale PNG (white=edit)EditTransformation too strongReduce --strength valueRemix, EditTransformation too weakIncrease --strength valueRemix, EditMask-prompt not preciseCreate manual mask in image editorEditGeneration timeoutTry faster model or wait longerAllRate limit errorCheck fal.ai dashboard usage limitsAll"
      },
      {
        "title": "General",
        "body": "Requires active fal.ai API key\nSubject to fal.ai rate limits and quotas\nInternet connection required\nSome models have usage costs (check pricing)"
      },
      {
        "title": "Text-to-Image",
        "body": "Image reference features limited to specific models\nTypography quality varies by model"
      },
      {
        "title": "Image Remix",
        "body": "Source image quality affects output quality\nExtreme strength values may introduce artifacts\nSome styles work better with specific models"
      },
      {
        "title": "Image Edit",
        "body": "Mask quality critical for seamless results\nAuto-generated masks (--mask-prompt) less precise than manual masks\nComplex edits may require multiple passes\nSome models don't support all editing features"
      }
    ],
    "body": "fal.ai Image Generation & Editing Skill\n\nProfessional AI-powered image workflows using fal.ai's state-of-the-art models including FLUX, Recraft V3, Imagen4, and more.\n\nThree Modes of Operation\n1. Text-to-Image (fal-text-to-image)\n\nGenerate images from scratch using text prompts\n\n2. Image Remix (fal-image-remix)\n\nTransform existing images while preserving composition\n\n3. Image Edit (fal-image-edit)\n\nTargeted inpainting and masked editing\n\nWhen to Use This Skill\n\nTrigger when user:\n\nRequests image generation from text descriptions\nWants to transform/remix existing images with AI\nNeeds to edit specific regions of images (inpainting)\nWants to create images with specific styles (vector, realistic, typography)\nNeeds high-resolution professional images (up to 2K)\nWants to use a reference image for style transfer\nMentions specific models like FLUX, Recraft, or Imagen\nAsks for logo, poster, or brand-style image generation\nNeeds object removal or targeted modifications\nQuick Start\nText-to-Image: Generate from Scratch\n# Basic generation\nuv run python fal-text-to-image \"A cyberpunk city at sunset with neon lights\"\n\n# With specific model\nuv run python fal-text-to-image -m flux-pro/v1.1-ultra \"Professional headshot\"\n\n# With style reference\nuv run python fal-text-to-image -i reference.jpg \"Mountain landscape\" -m flux-2/lora/edit\n\nImage Remix: Transform Existing Images\n# Transform style while preserving composition\nuv run python fal-image-remix input.jpg \"Transform into oil painting\"\n\n# With strength control (0.0=original, 1.0=full transformation)\nuv run python fal-image-remix photo.jpg \"Anime style character\" --strength 0.6\n\n# Premium quality remix\nuv run python fal-image-remix -m flux-1.1-pro image.jpg \"Professional portrait\"\n\nImage Edit: Targeted Modifications\n# Edit with mask image (white=edit area, black=preserve)\nuv run python fal-image-edit input.jpg mask.png \"Replace with flowers\"\n\n# Auto-generate mask from text\nuv run python fal-image-edit input.jpg --mask-prompt \"sky\" \"Make it sunset\"\n\n# Remove objects\nuv run python fal-image-edit photo.jpg mask.png \"Remove object\" --strength 1.0\n\n# General editing (no mask)\nuv run python fal-image-edit photo.jpg \"Enhance lighting and colors\"\n\nModel Selection Guide\n\nThe script intelligently selects the best model based on task context:\n\nflux-pro/v1.1-ultra (Default for High-Res)\nBest for: Professional photography, high-resolution outputs (up to 2K)\nStrengths: Photo realism, professional quality\nUse when: User needs publication-ready images\nEndpoint: fal-ai/flux-pro/v1.1-ultra\nrecraft/v3/text-to-image (SOTA Quality)\nBest for: Typography, vector art, brand-style images, long text\nStrengths: Industry-leading benchmark scores, precise text rendering\nUse when: Creating logos, posters, or text-heavy designs\nEndpoint: fal-ai/recraft/v3/text-to-image\nflux-2 (Best Balance)\nBest for: General-purpose image generation\nStrengths: Enhanced realism, crisp text, native editing\nUse when: Standard image generation needs\nEndpoint: fal-ai/flux-2\nflux-2/lora (Custom Styles)\nBest for: Domain-specific styles, fine-tuned variations\nStrengths: Custom style adaptation\nUse when: User wants specific artistic styles\nEndpoint: fal-ai/flux-2/lora\nflux-2/lora/edit (Style Transfer)\nBest for: Image-to-image editing with style references\nStrengths: Specialized style transfer\nUse when: User provides reference image with -i flag\nEndpoint: fal-ai/flux-2/lora/edit\nimagen4/preview (Google Quality)\nBest for: High-quality general images\nStrengths: Google's highest quality model\nUse when: User specifically requests Imagen or Google models\nEndpoint: fal-ai/imagen4/preview\nstable-diffusion-v35-large (Typography & Style)\nBest for: Complex prompts, typography, style control\nStrengths: Advanced prompt understanding, resource efficiency\nUse when: Complex multi-element compositions\nEndpoint: fal-ai/stable-diffusion-v35-large\nideogram/v2 (Typography Specialist)\nBest for: Posters, logos, text-heavy designs\nStrengths: Exceptional typography, realistic outputs\nUse when: Text accuracy is critical\nEndpoint: fal-ai/ideogram/v2\nbria/text-to-image/3.2 (Commercial Safe)\nBest for: Commercial projects requiring licensed training data\nStrengths: Safe for commercial use, excellent text rendering\nUse when: Legal/licensing concerns matter\nEndpoint: fal-ai/bria/text-to-image/3.2\nCommand-Line Interface\nuv run python fal-text-to-image [OPTIONS] PROMPT\n\nArguments:\n  PROMPT                    Text description of the image to generate\n\nOptions:\n  -m, --model TEXT         Model to use (see model list above)\n  -i, --image TEXT         Path or URL to reference image for style transfer\n  -o, --output TEXT        Output filename (default: generated_image.png)\n  -s, --size TEXT          Image size (e.g., \"1024x1024\", \"landscape_16_9\")\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps (model-dependent)\n  --guidance FLOAT         Guidance scale (higher = more prompt adherence)\n  --help                   Show this message and exit\n\nAuthentication Setup\n\nBefore first use, set your fal.ai API key:\n\nexport FAL_KEY=\"your-api-key-here\"\n\n\nOr create a .env file in the skill directory:\n\nFAL_KEY=your-api-key-here\n\n\nGet your API key from: https://fal.ai/dashboard/keys\n\nAdvanced Examples\nHigh-Resolution Professional Photo\nuv run python fal-text-to-image \\\n  -m flux-pro/v1.1-ultra \\\n  \"Professional headshot of a business executive in modern office\" \\\n  -s 2048x2048\n\nLogo/Typography Design\nuv run python fal-text-to-image \\\n  -m recraft/v3/text-to-image \\\n  \"Modern tech startup logo with text 'AI Labs' in minimalist style\"\n\nStyle Transfer from Reference\nuv run python fal-text-to-image \\\n  -m flux-2/lora/edit \\\n  -i artistic_style.jpg \\\n  \"Portrait of a woman in a garden\"\n\nReproducible Generation\nuv run python fal-text-to-image \\\n  -m flux-2 \\\n  --seed 42 \\\n  \"Futuristic cityscape with flying cars\"\n\nModel Selection Logic\n\nThe script automatically selects the best model when -m is not specified:\n\nIf -i provided: Uses flux-2/lora/edit for style transfer\nIf prompt contains typography keywords (logo, text, poster, sign): Uses recraft/v3/text-to-image\nIf prompt suggests high-res needs (professional, portrait, headshot): Uses flux-pro/v1.1-ultra\nIf prompt mentions vector/brand: Uses recraft/v3/text-to-image\nDefault: Uses flux-2 for general purpose\nOutput Format\n\nGenerated images are saved with metadata:\n\nFilename includes timestamp and model name\nEXIF data stores prompt, model, and parameters\nConsole displays generation time and cost estimate\nTroubleshooting\nProblem\tSolution\nFAL_KEY not set\tExport FAL_KEY environment variable or create .env file\nModel not found\tCheck model name against supported list\nImage reference fails\tEnsure image path/URL is accessible\nGeneration timeout\tSome models take longer; wait or try faster model\nRate limit error\tCheck fal.ai dashboard for usage limits\nCost Optimization\nFree tier: FLUX.2 offers 100 free requests (expires Dec 25, 2025)\nPay per use: FLUX Pro charges per megapixel\nBudget option: Use flux-2 or stable-diffusion-v35-large for general use\nPremium: Use flux-pro/v1.1-ultra only when high-res is required\nImage Remix: Model Selection Guide\n\nAvailable models for image-to-image remixing:\n\nflux-2/dev (Default, Free)\nBest for: General remixing, style transfer, fast iteration\nStrengths: Balanced quality/speed, 100 free requests\nUse when: Standard remixing needs\nEndpoint: fal-ai/flux/dev/image-to-image\nflux-pro (Premium Quality)\nBest for: Professional remixing, high-quality outputs\nStrengths: Superior quality, realistic transformations\nUse when: Professional or publication-ready remixes\nEndpoint: fal-ai/flux-pro\nflux-1.1-pro (Ultra Premium)\nBest for: Highest quality remixing with maximum detail\nStrengths: Ultra-high quality, exceptional detail preservation\nUse when: Premium projects requiring best possible output\nEndpoint: fal-ai/flux-pro/v1.1\nrecraft/v3 (Vector/Illustration)\nBest for: Vector style, brand imagery, illustration remixing\nStrengths: Clean vector outputs, brand-style transformations\nUse when: Converting to illustration or vector style\nEndpoint: fal-ai/recraft/v3/text-to-image\nstable-diffusion-v35 (Artistic)\nBest for: Artistic styles, painting effects, creative remixing\nStrengths: Strong artistic style application\nUse when: Artistic or stylized transformations\nEndpoint: fal-ai/stable-diffusion-v35-large\nImage Remix: Command-Line Interface\nuv run python fal-image-remix [OPTIONS] INPUT_IMAGE PROMPT\n\nArguments:\n  INPUT_IMAGE               Path or URL to source image\n  PROMPT                    How to transform the image\n\nOptions:\n  -m, --model TEXT         Model to use (auto-selected if not specified)\n  -o, --output TEXT        Output filename (default: remixed_TIMESTAMP.png)\n  -s, --strength FLOAT     Transformation strength 0.0-1.0 (default: 0.75)\n                           0.0 = preserve original, 1.0 = full transformation\n  --guidance FLOAT         Guidance scale (default: 7.5)\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps\n  --help                   Show help\n\nRemix Strength Guide\n\nThe --strength parameter controls transformation intensity:\n\nStrength\tEffect\tUse Case\n0.3-0.5\tSubtle changes\tMinor color adjustments, lighting tweaks\n0.5-0.7\tModerate changes\tStyle hints while preserving details\n0.7-0.85\tStrong changes\tClear style transfer, significant transformation\n0.85-1.0\tMaximum changes\tComplete style overhaul, dramatic transformation\nRemix Examples\n# Subtle artistic style (low strength)\nuv run python fal-image-remix photo.jpg \"Oil painting style\" --strength 0.4\n\n# Balanced transformation (default)\nuv run python fal-image-remix input.jpg \"Cyberpunk neon aesthetic\"\n\n# Strong transformation (high strength)\nuv run python fal-image-remix portrait.jpg \"Anime character\" --strength 0.9\n\n# Vector conversion\nuv run python fal-image-remix -m recraft/v3 logo.png \"Clean vector illustration\"\n\n# Premium quality remix\nuv run python fal-image-remix -m flux-1.1-pro photo.jpg \"Professional studio portrait\"\n\nImage Edit: Model Selection Guide\n\nAvailable models for targeted editing and inpainting:\n\nflux-2/redux (General Editing)\nBest for: General image editing without masks\nStrengths: Fast, balanced, good for overall adjustments\nUse when: No specific region targeting needed\nEndpoint: fal-ai/flux-2/redux\nflux-2/fill (Inpainting, Default)\nBest for: Masked region editing, object removal, filling\nStrengths: Seamless inpainting, natural blending\nUse when: Editing specific masked regions\nEndpoint: fal-ai/flux-2/fill\nflux-pro-v11/fill (Premium Inpainting)\nBest for: Professional inpainting with highest quality\nStrengths: Superior quality, professional results\nUse when: Premium quality inpainting required\nEndpoint: fal-ai/flux-pro-v11/fill\nstable-diffusion-v35/inpainting (Artistic Inpainting)\nBest for: Artistic edits, creative inpainting\nStrengths: Strong artistic control, detailed generation\nUse when: Artistic or stylized edits\nEndpoint: fal-ai/stable-diffusion-v35-large/inpainting\nideogram/v2/edit (Realistic Editing)\nBest for: Realistic modifications, precise edits\nStrengths: High realism, precise control\nUse when: Realistic edits required\nEndpoint: fal-ai/ideogram/v2/edit\nrecraft/v3/svg (Vector Editing)\nBest for: Vector style edits, clean illustrations\nStrengths: Clean vector outputs, illustration style\nUse when: Vector or illustration edits\nEndpoint: fal-ai/recraft/v3/svg\nImage Edit: Command-Line Interface\nuv run python fal-image-edit [OPTIONS] INPUT_IMAGE [MASK_IMAGE] PROMPT\n\nArguments:\n  INPUT_IMAGE               Path or URL to source image\n  MASK_IMAGE                Path or URL to mask (white=edit, black=preserve) [optional]\n  PROMPT                    How to edit the masked region\n\nOptions:\n  -m, --model TEXT         Model to use (auto-selected if not specified)\n  -o, --output TEXT        Output filename (default: edited_TIMESTAMP.png)\n  --mask-prompt TEXT       Generate mask from text (no mask image needed)\n  -s, --strength FLOAT     Edit strength 0.0-1.0 (default: 0.95)\n  --guidance FLOAT         Guidance scale (default: 7.5)\n  --seed INTEGER           Random seed for reproducibility\n  --steps INTEGER          Number of inference steps\n  --help                   Show help\n\nEdit Strength Guide\n\nThe --strength parameter controls edit intensity:\n\nStrength\tEffect\tUse Case\n0.5-0.7\tSubtle edits\tMinor touch-ups, color adjustments\n0.7-0.9\tModerate edits\tClear modifications while blending naturally\n0.9-1.0\tStrong edits\tComplete replacement, object removal\nCreating Mask Images\n\nMask images define edit regions:\n\nWhite (255): Areas to edit/modify\nBlack (0): Areas to preserve unchanged\nGray: Partial blending (proportional to brightness)\n\nCreate masks using:\n\nImage editors (GIMP, Photoshop, Krita)\nPaint tools (select and fill with white/black)\nText-based prompts (--mask-prompt flag)\nEdit Examples\n# Edit with mask image\nuv run python fal-image-edit photo.jpg mask.png \"Replace with beautiful garden\"\n\n# Auto-generate mask from text\nuv run python fal-image-edit landscape.jpg --mask-prompt \"sky\" \"Make it sunset with clouds\"\n\n# Remove objects\nuv run python fal-image-edit photo.jpg object_mask.png \"Remove completely\" --strength 1.0\n\n# Seamless object insertion\nuv run python fal-image-edit room.jpg region_mask.png \"Add modern sofa\" --strength 0.85\n\n# General editing (no mask)\nuv run python fal-image-edit -m flux-2/redux photo.jpg \"Enhance lighting and saturation\"\n\n# Premium quality inpainting\nuv run python fal-image-edit -m flux-pro-v11/fill image.jpg mask.png \"Professional portrait background\"\n\n# Artistic modification\nuv run python fal-image-edit -m stable-diffusion-v35/inpainting photo.jpg mask.png \"Van Gogh style\"\n\nFile Structure\nfal-text-to-image/\n├── SKILL.md                    # This file\n├── README.md                   # Quick reference\n├── pyproject.toml              # Dependencies (uv)\n├── fal-text-to-image           # Text-to-image generation script\n├── fal-image-remix             # Image-to-image remixing script\n├── fal-image-edit              # Image editing/inpainting script\n├── references/\n│   └── model-comparison.md     # Detailed model benchmarks\n└── outputs/                    # Generated images (created on first run)\n\nDependencies\n\nManaged via uv:\n\nfal-client: Official fal.ai Python SDK\npython-dotenv: Environment variable management\npillow: Image handling and EXIF metadata\nclick: CLI interface\nBest Practices\nGeneral\nModel Selection: Let scripts auto-select unless you have specific needs\nPrompt Engineering: Be specific and descriptive for better outputs\nCost Awareness: Monitor usage on fal.ai dashboard\nReproducibility: Use --seed for consistent results during iteration\nText-to-Image\nReference Images: Use high-quality references for best style transfer results\nSize Selection: Match aspect ratio to intended use (square, landscape, portrait)\nModel Choice: Use recraft/v3 for typography, flux-pro for professional photography\nImage Remix\nStrength Tuning: Start with default (0.75), adjust based on desired transformation\nSource Quality: Higher quality source images produce better remixes\nIteration: Use --seed to iterate on same generation with different prompts\nBalance: Lower strength preserves more detail, higher creates more dramatic changes\nImage Edit\nMask Quality: Clean, well-defined masks produce better results\nMask Creation: Use image editors for precise control, --mask-prompt for quick tests\nBlending: Use gray tones in masks for smooth transitions\nEdit Strength: Use 0.95+ for object removal, 0.7-0.9 for modifications\nTest First: Try --mask-prompt before creating detailed masks\nMultiple Edits: Edit in stages rather than all at once for complex modifications\nResources\nfal.ai Documentation: https://docs.fal.ai/\nModel Playground: https://fal.ai/explore/search\nAPI Keys: https://fal.ai/dashboard/keys\nPricing: https://fal.ai/pricing\nWorkflow Examples\nComplete Image Creation Pipeline\n# 1. Generate base image\nuv run python fal-text-to-image -m flux-2 \"Modern office space, minimalist\" -o base.png\n\n# 2. Remix to different style\nuv run python fal-image-remix base.png \"Cyberpunk aesthetic with neon\" -o styled.png\n\n# 3. Edit specific region\nuv run python fal-image-edit styled.png --mask-prompt \"desk\" \"Add holographic display\"\n\nIterative Refinement\n# Generate with seed for reproducibility\nuv run python fal-text-to-image \"Mountain landscape\" --seed 42 -o v1.png\n\n# Remix with same seed, different style\nuv run python fal-image-remix v1.png \"Oil painting style\" --seed 42 -o v2.png\n\n# Fine-tune with editing\nuv run python fal-image-edit v2.png --mask-prompt \"sky\" \"Golden hour lighting\" --seed 42\n\nObject Removal and Replacement\n# 1. Remove unwanted object\nuv run python fal-image-edit photo.jpg object_mask.png \"Remove\" --strength 1.0 -o removed.png\n\n# 2. Fill with new content\nuv run python fal-image-edit removed.png region_mask.png \"Beautiful flowers\" --strength 0.9\n\nTroubleshooting\nProblem\tSolution\tTool\nFAL_KEY not set\tExport FAL_KEY or create .env file\tAll\nModel not found\tCheck model name in documentation\tAll\nImage upload fails\tCheck file exists and is readable\tRemix, Edit\nMask not working\tVerify mask is grayscale PNG (white=edit)\tEdit\nTransformation too strong\tReduce --strength value\tRemix, Edit\nTransformation too weak\tIncrease --strength value\tRemix, Edit\nMask-prompt not precise\tCreate manual mask in image editor\tEdit\nGeneration timeout\tTry faster model or wait longer\tAll\nRate limit error\tCheck fal.ai dashboard usage limits\tAll\nLimitations\nGeneral\nRequires active fal.ai API key\nSubject to fal.ai rate limits and quotas\nInternet connection required\nSome models have usage costs (check pricing)\nText-to-Image\nImage reference features limited to specific models\nTypography quality varies by model\nImage Remix\nSource image quality affects output quality\nExtreme strength values may introduce artifacts\nSome styles work better with specific models\nImage Edit\nMask quality critical for seamless results\nAuto-generated masks (--mask-prompt) less precise than manual masks\nComplex edits may require multiple passes\nSome models don't support all editing features"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/delorenj/fal-text-to-image",
    "publisherUrl": "https://clawhub.ai/delorenj/fal-text-to-image",
    "owner": "delorenj",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fal-text-to-image",
    "downloadUrl": "https://openagent3.xyz/downloads/fal-text-to-image",
    "agentUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fal-text-to-image/agent.md"
  }
}