AgentSkillsCN

Fal Flux Prompting

Fal Flux 提示词设计

SKILL.md

fal.ai Flux Image Generation

How to generate high-quality images using fal.ai's Flux model.

API Basics

bash
curl -X POST "https://fal.run/fal-ai/flux/dev" \
  -H "Authorization: Key $FAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "...", "image_size": "portrait_4_3", "num_images": 1}'

Standard Size Presets

Use standard presets for best quality (model trained on these ratios):

PresetDimensionsUse Case
square1024×1024Versatile, safe default
square_hd1024×1024High quality square
portrait_4_3768×1024Character portraits
portrait_16_9576×1024Tall/narrow scenes
landscape_4_31024×768Locations, wide scenes
landscape_16_91024×576Panoramic views

Avoid custom dimensions - the model performs best on standard aspect ratios.

Prompting Best Practices

Structure: Subject First

Flux weighs earlier information more heavily. Put the most important element first.

Weak: "Create an image with dramatic lighting featuring an elven warrior" Strong: "Elven warrior in ornate silver armor, dramatic side lighting, forest background"

Layered Approach

  1. Subject (most important): "A dwarf blacksmith with braided red beard"
  2. Setting: "...in a stone forge with glowing coals"
  3. Lighting/Perspective: "...warm firelight, low angle view"
  4. Style: "...oil painting style, fantasy illustration"

For Card Portraits

Use framing keywords to control composition and avoid cropping issues:

  • "head and shoulders portrait" - upper body focus
  • "bust portrait" - chest up
  • "centered composition" - subject in middle
  • "facing forward" or "three-quarter view" - orientation

Example NPC prompt:

code
head and shoulders portrait of a gnome inventor with brass goggles,
wild white hair, soot-stained face, warm workshop lighting,
oil painting style, fantasy illustration, centered composition

Style Consistency

For a cohesive card set, use consistent style tags. Avoid vague descriptors like "fantasy illustration" or "oil painting" - Flux flattens these to generic output.

Recommended styles (actually produce distinct results):

  • ink drawing with watercolor wash, pen and ink linework - Best for whimsical/fun campaigns
  • watercolor painting, soft edges, flowing colors - Softer, more painterly
  • renaissance portrait, chiaroscuro lighting, dark background - Serious/dramatic campaigns

Avoid (collapse to same generic output):

  • "oil painting style"
  • "fantasy illustration"
  • "in the style of classic D&D art"
  • "storybook illustration"

Avoid

  • Contradictory descriptors ("bright sunny day with moody shadows")
  • Negative prompts (Flux doesn't support them well - describe what you want instead)
  • Vague terms ("nice", "cool", "interesting")

API Parameters

ParameterDefaultDescription
promptrequiredImage description
image_sizelandscape_4_3Size preset or {width, height}
num_inference_steps28More steps = higher quality, slower
guidance_scale3.5How closely to follow prompt (1-20)
seedrandomFor reproducible results
num_images1Batch generation

Cost

Roughly $0.01-0.02 per image depending on size and steps.

References