π¦ ClawHub
falimagegen
by @xxmzdxxxm
Call fal.ai model APIs for image generation (text-to-image and image-to-image). Use when a user asks to integrate fal, construct requests, run jobs, handle auth, or return image URLs from fal model APIs.
TERMINAL
clawhub install falimagegenπ About This Skill
name: fal-image-gen description: "Call fal.ai model APIs for image generation (text-to-image and image-to-image). Use when a user asks to integrate fal, construct requests, run jobs, handle auth, or return image URLs from fal model APIs."
Fal Image Gen
Overview
Use this skill to implement text-to-image or image-to-image calls against fal model APIs. Prioritize correctness by checking the current docs for the selected modelβs required inputs/outputs and authentication requirements.Quick Start
1. Identify the target model ID from the fal model API docs. 2. Collect inputs from the user.prompt, optional negative_prompt, size/aspect, steps, seed, safety options.Workflow: Text-to-Image
1. Resolve the model ID and schema.run/submit method with an input object.Workflow: Image-to-Image
1. Resolve the model ID and schema. 2. Validate inputs.SDK vs REST Guidance
Minimal Examples (Fill From Docs)
Use these as templates only. Replace placeholders after checking the docs.Python (SDK)
# Pseudocode: replace with the exact fal SDK import + call pattern from docs
import os
from fal import client # or the current SDK import
MODEL_ID = ""
input_data = {
"prompt": "a cinematic photo of a red fox",
# "image_url": "https://..." # for image-to-image
# "negative_prompt": "...",
# "width": 1024,
# "height": 1024,
}
result = client.run(MODEL_ID, input=input_data)
urls = extract_urls(result)
JavaScript (SDK)
// Pseudocode: replace with the exact fal SDK import + call pattern from docs
// import { client } from "@fal-ai/client";const MODEL_ID = "";
const input = {
prompt: "a cinematic photo of a red fox",
// image_url: "https://..." // for image-to-image
};
// const result = await client.run(MODEL_ID, { input });
// const urls = extractUrls(result);
REST (curl)
# Pseudocode: replace endpoint, headers, and payload schema from docs
curl -X POST "https:///" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"prompt": "a cinematic photo of a red fox"
}'
Resources
references/fal-model-api-checklist.md: Checklist for gathering inputs and validating responses.references/fal-model-examples.md: Example templates for text-to-image, image-to-image, and REST usage.π‘ Examples
1. Identify the target model ID from the fal model API docs. 2. Collect inputs from the user.
prompt, optional negative_prompt, size/aspect, steps, seed, safety options.