image-create
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseimage-create
image-create
Use this skill for all pure text-to-image generation requests on Starchild.
Covers: logo design, poster design, illustration, meme creation, game assets, social media content, 3D rendering, educational illustrations, fashion design, food photography, pet illustrations, wedding design, holiday marketing, and artistic style creation.
Core principle: call the provided script. Do not re-implement proxy/billing plumbing.
When to use image-create vs image-portrait:
- image-create → user wants to CREATE something from a text description (no face/identity needed)
- image-portrait → user wants a portrait with their face/identity preserved from a reference photo
在Starchild上,所有纯text-to-image生成请求都可使用此技能。
涵盖场景:标志设计、海报设计、插画、表情包制作、游戏资产、社交媒体内容、3D渲染、教育插画、时尚设计、美食摄影、宠物插画、婚礼设计、节日营销以及艺术风格创作。
核心原则: 调用提供的脚本,不要重新实现代理/计费相关逻辑。
何时使用image-create vs image-portrait:
- image-create → 用户希望通过文本描述创作内容(无需人脸/身份信息)
- image-portrait → 用户希望基于参考照片生成保留其人脸/身份的肖像
1. Quick start — basic generation (most common)
1. 快速入门——基础生成(最常用)
python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
prompt="a futuristic city skyline at sunset with flying cars",
)python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
prompt="a futuristic city skyline at sunset with flying cars",
)result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}
result -> {"success": True, "images": [{"local_path": "output/images/..."}], ...}
undefinedundefined2. Quick start — with category preset
2. 快速入门——使用分类预设
python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
prompt="StarChild AI platform",
category="logo",
style="tech",
)python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
prompt="StarChild AI platform",
category="logo",
style="tech",
)3. Quick start — category only (no custom prompt)
3. 快速入门——仅使用分类(无自定义提示词)
python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
category="3d",
style="diorama",
)python
exec(open('skills/image-create/generate_image.py').read())
result = generate_image(
category="3d",
style="diorama",
)Uses the built-in style template as the full prompt
Uses the built-in style template as the full prompt
undefinedundefinedDelivering the result to the user — IMPORTANT
向用户交付结果——重要提示
Never hand the user the raw fal.media URL. fal serves files with restrictive CSP headers. The only reliable delivery path is the already-downloaded local file:
- Use each image's (e.g.
local_path) — the script always downloads on success.output/images/xxx.png - Tell the user the files are saved to and viewable in the workspace file panel.
output/images/ - On Web channel, embed inline so the user can preview in chat:
markdown
 - On Telegram / WeChat: send via or
send_to_telegram(file_path="output/images/...", message_type="image").send_to_wechat(file_path="output/images/...", message_type="image")
绝不要直接给用户原始的fal.media链接。 fal提供的文件带有严格的CSP头部,唯一可靠的交付方式是已下载的本地文件:
- 使用每个图像的(例如
local_path)——脚本在生成成功后总会自动下载文件。output/images/xxx.png - 告知用户文件已保存至,可在工作区文件面板中查看。
output/images/ - 在Web渠道中,将图像嵌入聊天内容以便用户预览:
markdown
 - 在Telegram/微信渠道:通过或
send_to_telegram(file_path="output/images/...", message_type="image")发送。send_to_wechat(file_path="output/images/...", message_type="image")
4. Parameters
4. 参数
| Parameter | Required | Default | Description |
|---|---|---|---|
| yes* | — | Text description of the desired image |
| yes* | — | Preset category (see §5) |
| no | | Sub-style within the category (see §5) |
| no | | Model: |
| no | | Number of images to generate (1–4) |
| no | auto | Output ratio: |
| no | — | Optional local file path for reference/inspiration image |
| no | — | Optional public URL for reference/inspiration image |
*At least one of or must be provided.
promptcategoryPrompt priority: (enhanced) > only > > default.
prompt + category/stylepromptcategory + stylecategoryAspect ratio auto-selection: When not explicitly set, the script picks the best ratio for the category (e.g., for logos, for posters, for banners).
1:13:416:9| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
| 是* | — | 所需图像的文本描述 |
| 是* | — | 预设分类(见第5节) |
| 否 | | 分类下的子风格(见第5节) |
| 否 | | 模型选项: |
| 否 | | 生成图像的数量(1–4) |
| 否 | auto | 输出比例: |
| 否 | — | 用于参考/灵感的可选本地文件路径 |
| 否 | — | 用于参考/灵感的可选公共URL |
*必须提供或中的至少一个。
promptcategory提示词优先级: (增强版) > 仅 > > 默认值。
prompt + category/stylepromptcategory + stylecategory比例自动选择规则: 若未明确设置,脚本会为分类选择最佳比例(例如标志用,海报用,横幅用)。
1:13:416:95. Category and style presets
5. 分类与风格预设
E: Design — Logo (category="logo"
)
category="logo"E: 设计——标志(category="logo"
)
category="logo"⚠️ AI cannot reliably render text. Generate the icon/symbol only; add text/wordmark in a design tool (Figma, Canva, Illustrator).
| Style | Key | Best for |
|---|---|---|
| Abstract geometric | | Tech, conceptual brands (Nike swoosh style) |
| Pictorial icon | | Universal brands, works without text (Apple style) |
| Mascot character | | Friendly brands, food, sports (KFC style) |
| Tech company | | SaaS, AI, fintech startups |
| Food brand | | Restaurant, bakery, organic |
| Fashion brand | | Luxury, apparel, beauty |
| Gaming | | Esports, game studio |
| General | | Any professional logo |
Logo prompt anti-patterns (avoid):
- ❌ — text will be garbled
"logo with text 'Company Name'" - ❌ — logos aren't photos
"photorealistic logo" - ❌ — too complex, won't scale down
"3D rendered logo" - ✅
"flat vector logo of [subject], minimal geometric style, single color, white background"
⚠️ AI无法可靠渲染文字。 仅生成图标/符号;文字/标志名称需在设计工具(Figma、Canva、Illustrator)中添加。
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 抽象几何 | | 科技类、概念品牌(类似Nike swoosh风格) |
| 具象图标 | | 通用品牌,无需文字即可识别(类似Apple风格) |
| 吉祥物角色 | | 友好型品牌、美食、运动类(类似KFC风格) |
| 科技公司 | | SaaS、AI、金融科技初创企业 |
| 美食品牌 | | 餐厅、烘焙店、有机食品品牌 |
| 时尚品牌 | | 奢侈品、服饰、美妆品牌 |
| 游戏类 | | 电竞、游戏工作室 |
| 通用风格 | | 任何专业标志 |
标志提示词反模式(需避免):
- ❌ ——文字会出现错乱
"logo with text 'Company Name'" - ❌ ——标志并非照片
"photorealistic logo" - ❌ ——过于复杂,无法缩小使用
"3D rendered logo" - ✅
"flat vector logo of [subject], minimal geometric style, single color, white background"
E: Design — Poster (category="poster"
)
category="poster"E: 设计——海报(category="poster"
)
category="poster"| Style | Key | Best for | Recommended ratio |
|---|---|---|---|
| Movie poster | | Film promotion, cinematic | 3:4 |
| Music festival | | Concerts, festivals | 3:4 |
| Tech conference | | Tech events, hackathons | 3:4 |
| Travel destination | | Tourism, wanderlust | 3:4 |
| Product launch | | Product announcements | 3:4 |
| Minimalist art | | Home decor, gallery | 3:4 |
| Sports event | | Athletic events | 3:4 |
| General | | Any poster | 3:4 |
| 风格 | 标识 | 适用场景 | 推荐比例 |
|---|---|---|---|
| 电影海报 | | 电影宣传、影视风格 | 3:4 |
| 音乐节海报 | | 演唱会、音乐节 | 3:4 |
| 科技会议海报 | | 科技活动、黑客松 | 3:4 |
| 旅游目的地海报 | | 旅游推广、旅行主题 | 3:4 |
| 产品发布海报 | | 产品发布公告 | 3:4 |
| 极简艺术海报 | | 家居装饰、画廊展示 | 3:4 |
| 体育赛事海报 | | 体育活动 | 3:4 |
| 通用风格 | | 任何海报 | 3:4 |
E: Design — Illustration (category="illustration"
)
category="illustration"E: 设计——插画(category="illustration"
)
category="illustration"| Style | Key | Best for |
|---|---|---|
| Fantasy | | Fantasy worlds, magic, dragons |
| Sci-fi | | Futuristic scenes, space |
| Children's book | | Kids content, storybooks (ages 3-5) |
| Editorial | | Magazine, article headers |
| Botanical | | Scientific plant illustrations |
| General | | Any illustration |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 奇幻风格 | | 奇幻世界、魔法、龙类主题 |
| 科幻风格 | | 未来场景、太空主题 |
| 儿童绘本风格 | | 儿童内容、故事书(适合3-5岁) |
| 社论插画 | | 杂志、文章标题配图 |
| 植物插画 | | 科学类植物插画 |
| 通用风格 | | 任何插画 |
E: Design — Meme (category="meme"
)
category="meme"E: 设计——表情包(category="meme"
)
category="meme"| Style | Key | Best for |
|---|---|---|
| Animal meme | | Cute/funny animal memes |
| Reaction | | Reaction templates |
| Surreal | | Absurdist internet humor |
| General | | Any meme |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 动物表情包 | | 可爱/搞笑动物表情包 |
| 反应类表情包 | | 反应模板类 |
| 超现实风格 | | 荒诞网络幽默风格 |
| 通用风格 | | 任何表情包 |
K: Game Assets (category="game_asset"
)
category="game_asset"K: 游戏资产(category="game_asset"
)
category="game_asset"| Style | Key | Best for | Common sizes |
|---|---|---|---|
| Character concept | | RPG characters, heroes | 1024x1024 |
| Environment | | Game worlds, levels | 1920x1080 |
| Weapon/prop | | Items, weapons, artifacts | 1024x1024 |
| UI icon | | Game UI, mobile icons | 32x32 to 128x128 |
| Pixel sprite | | Retro game characters | 32x32 to 64x64 |
| Tileset | | Seamless environment tiles | 256x256 to 512x512 |
| General | | Any game asset | 1024x1024 |
| 风格 | 标识 | 适用场景 | 常见尺寸 |
|---|---|---|---|
| 角色概念设计 | | RPG角色、英雄 | 1024x1024 |
| 游戏环境 | | 游戏世界、关卡 | 1920x1080 |
| 武器/道具 | | 物品、武器、艺术品 | 1024x1024 |
| UI图标 | | 游戏UI、移动应用图标 | 32x32至128x128 |
| 像素精灵 | | 复古游戏角色 | 32x32至64x64 |
| 瓦片集 | | 无缝环境瓦片 | 256x256至512x512 |
| 通用风格 | | 任何游戏资产 | 1024x1024 |
M: Social Media (category="social_media"
)
category="social_media"M: 社交媒体(category="social_media"
)
category="social_media"| Style | Key | Best for | Recommended ratio | Resolution |
|---|---|---|---|---|
| Instagram post | | IG feed posts | 1:1 | 1080x1080 |
| 小红书 | | Xiaohongshu posts | 3:4 | 1080x1440 |
| TikTok cover | | TikTok thumbnails | 9:16 | 1080x1920 |
| YouTube thumbnail | | YT thumbnails | 16:9 | 1280x720 |
| Banner | | Twitter/YouTube banners | 16:9 | 1920x1080 |
| Story | | IG/FB stories | 9:16 | 1080x1920 |
| General | | Any social content | 1:1 | 1024x1024 |
| 风格 | 标识 | 适用场景 | 推荐比例 | 分辨率 |
|---|---|---|---|---|
| Instagram帖子 | | IG动态帖子 | 1:1 | 1080x1080 |
| 小红书 | | 小红书帖子 | 3:4 | 1080x1440 |
| TikTok封面 | | TikTok缩略图 | 9:16 | 1080x1920 |
| YouTube缩略图 | | YT缩略图 | 16:9 | 1280x720 |
| 横幅 | | Twitter/YouTube横幅 | 16:9 | 1920x1080 |
| 故事模板 | | IG/FB故事 | 9:16 | 1080x1920 |
| 通用风格 | | 任何社交媒体内容 | 1:1 | 1024x1024 |
N: 3D (category="3d"
)
category="3d"N: 3D(category="3d"
)
category="3d"| Style | Key | Best for |
|---|---|---|
| 3D character | | Pixar-style characters |
| Product render | | Product visualization |
| Diorama | | Miniature scenes, isometric |
| App icon | | iOS/Android app icons |
| 3D text | | Chrome/metallic text |
| 3D scene | | Low-poly environments |
| General | | Any 3D render |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 3D角色 | | 皮克斯风格角色 |
| 产品渲染 | | 产品可视化 |
| 微缩场景 | | 迷你场景、等距视角 |
| 应用图标 | | iOS/Android应用图标 |
| 3D文字 | | 镀铬/金属质感文字 |
| 3D场景 | | 低多边形环境 |
| 通用风格 | | 任何3D渲染 |
P: Education (category="education"
)
category="education"P: 教育(category="education"
)
category="education"| Style | Key | Best for |
|---|---|---|
| Textbook | | Textbook illustrations |
| Infographic | | Data visualization |
| Science | | Scientific diagrams, anatomy |
| History | | Historical scene reconstruction |
| Diagram | | Technical process diagrams |
| General | | Any educational content |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 教材插画 | | 教材配图 |
| 信息图 | | 数据可视化 |
| 科学类 | | 科学图表、解剖图 |
| 历史类 | | 历史场景还原 |
| 流程图 | | 技术流程图表 |
| 通用风格 | | 任何教育内容 |
Q: Fashion (category="fashion"
)
category="fashion"Q: 时尚(category="fashion"
)
category="fashion"| Style | Key | Best for |
|---|---|---|
| Clothing design | | Garment sketches, fashion plates |
| Accessory | | Jewelry, bags, shoes |
| Nail art | | Nail designs |
| Textile pattern | | Fabric patterns, surface design |
| General | | Any fashion design |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 服装设计 | | 服装草图、时尚版型图 |
| 配饰设计 | | 珠宝、包袋、鞋履 |
| 美甲设计 | | 美甲样式 |
| 纺织图案 | | 面料图案、表面设计 |
| 通用风格 | | 任何时尚设计 |
R: Food (category="food"
)
category="food"R: 美食(category="food"
)
category="food"| Style | Key | Best for |
|---|---|---|
| Dish photo | | Food photography, editorial |
| Menu design | | Restaurant menus |
| Packaging | | Food packaging design |
| Recipe card | | Recipe illustrations |
| General | | Any food content |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 菜品摄影 | | 美食摄影、社论配图 |
| 菜单设计 | | 餐厅菜单 |
| 包装设计 | | 食品包装设计 |
| 食谱卡片 | | 食谱插画 |
| 通用风格 | | 任何美食内容 |
S: Pet (category="pet"
)
category="pet"S: 宠物(category="pet"
)
category="pet"| Style | Key | Best for |
|---|---|---|
| Humanized pet | | Pets in human clothes |
| Renaissance | | Royal/regal pet portraits |
| Cartoon | | Disney/Pixar style pets |
| Merchandise | | Pet-themed product patterns |
| Memorial | | Pet tribute artwork |
| General | | Cute pet illustrations |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 拟人化宠物 | | 穿着人类服装的宠物 |
| 文艺复兴风格 | | 皇家/贵族风格宠物肖像 |
| 卡通风格 | | 迪士尼/皮克斯风格宠物 |
| 宠物周边图案 | | 宠物主题产品图案 |
| 纪念风格 | | 宠物纪念艺术作品 |
| 通用风格 | | 可爱宠物插画 |
I: Product Photography (category="product"
)
category="product"I: 产品摄影(category="product"
)
category="product"Derived from product-photography skill best practices.
| Style | Key | Best for |
|---|---|---|
| Hero shot | | Primary product image, magazine ads |
| Packshot | | E-commerce listings, Amazon (pure white bg) |
| Lifestyle | | Product in context, editorial |
| Flat lay | | Instagram, top-down arrangement |
| General | | Any product photo |
Product photography tips:
- Hero shot: product fills 80% of frame, slight 15-30° angle for dimension
- Packshot (Amazon): pure white background, product fills 85%+, no props/text/watermarks
- Always specify lighting: "soft studio lighting", "dramatic rim lighting"
- For e-commerce: "sharp focus", "no shadows" or "subtle shadow only"
源自产品摄影技能的最佳实践。
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 主图拍摄 | | 产品主图、杂志广告 |
| 包装图拍摄 | | 电商列表、亚马逊平台(纯白背景) |
| 场景化拍摄 | | 产品实景展示、社论配图 |
| 平铺拍摄 | | Instagram、俯视构图 |
| 通用风格 | | 任何产品摄影 |
产品摄影技巧:
- 主图:产品占据画面80%,轻微15-30°角度以体现立体感
- 包装图(亚马逊):纯白背景,产品占据画面85%以上,无道具/文字/水印
- 务必指定光线:"柔和工作室光线"、"戏剧性轮廓光"
- 电商场景:"清晰对焦"、"无阴影"或"仅轻微阴影"
Y: Wedding (category="wedding"
)
category="wedding"Y: 婚礼(category="wedding"
)
category="wedding"| Style | Key | Best for | Format |
|---|---|---|---|
| Classic invitation | | Floral elegant invitations | 5x7 inches |
| Modern invitation | | Minimalist invitations | 5x7 inches |
| Rustic invitation | | Bohemian invitations | 5x7 inches |
| Venue preview | | Venue decoration preview | — |
| Save the date | | Pre-announcement cards | 4x6 inches |
| General | | Any wedding design | — |
| 风格 | 标识 | 适用场景 | 格式 |
|---|---|---|---|
| 经典请柬 | | 花卉风格优雅请柬 | 5x7英寸 |
| 现代请柬 | | 极简风格请柬 | 5x7英寸 |
| 乡村风格请柬 | | 波西米亚风格请柬 | 5x7英寸 |
| 场地预览 | | 婚礼场地布置预览 | — |
| 日期预告卡 | | 婚礼预告卡 | 4x6英寸 |
| 通用风格 | | 任何婚礼设计 | — |
Z: Holiday Marketing (category="holiday"
)
category="holiday"Z: 节日营销(category="holiday"
)
category="holiday"| Style | Key | Best for |
|---|---|---|
| Christmas card | | Christmas greetings |
| Chinese New Year | | 春节 designs |
| New Year | | New Year celebrations |
| Valentine's | | Valentine's Day |
| Halloween | | Halloween designs |
| Promotional | | Sale banners, promos |
| Mid-Autumn | | 中秋节 designs |
| General | | Any holiday content |
Major holiday calendar for campaign planning:
| Holiday | Timing | Best for |
|---|---|---|
| Chinese New Year | Jan-Feb | Gifts, family, food |
| Valentine's Day | Feb 14 | Romance, gifts |
| Women's Day | Mar 8 | Empowerment, gifts |
| 520 (5/20) | May 20 | Romance (Chinese Valentine's) |
| 618 Shopping | June | E-commerce sales |
| Qixi (七夕) | Jul-Aug | Romance |
| Mid-Autumn | Sept | Family, mooncakes |
| National Day | Oct 1 | Travel, shopping |
| 11.11 Singles' Day | Nov 11 | Major sales |
| 12.12 Double 12 | Dec 12 | Year-end sales |
| Christmas | Dec 25 | Gifts, winter |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 圣诞贺卡 | | 圣诞祝福 |
| 春节 | | 春节设计 |
| 新年 | | 新年庆祝 |
| 情人节 | | 情人节 |
| 万圣节 | | 万圣节设计 |
| 促销风格 | | 促销横幅、推广内容 |
| 中秋节 | | 中秋节设计 |
| 通用风格 | | 任何节日内容 |
营销活动规划主要节日日历:
| 节日 | 时间 | 适用场景 |
|---|---|---|
| 春节 | 1-2月 | 礼品、家庭、美食 |
| 情人节 | 2月14日 | 浪漫、礼品 |
| 妇女节 | 3月8日 | 女性赋能、礼品 |
| 520 | 5月20日 | 浪漫(中国情人节) |
| 618购物节 | 6月 | 电商促销 |
| 七夕 | 7-8月 | 浪漫 |
| 中秋节 | 9月 | 家庭、月饼 |
| 国庆节 | 10月1日 | 旅游、购物 |
| 双11光棍节 | 11月11日 | 大型促销 |
| 双12 | 12月12日 | 年终促销 |
| 圣诞节 | 12月25日 | 礼品、冬季主题 |
C: Art Style (category="art_style"
)
category="art_style"C: 艺术风格(category="art_style"
)
category="art_style"| Style | Key | Best for |
|---|---|---|
| Studio Ghibli | | Ghibli-style scenes |
| American comic | | Marvel/DC style |
| Japanese manga | | Manga illustrations |
| Pixel art | | Retro game style |
| Pencil sketch | | Hand-drawn look |
| 3D cartoon | | Pixar/Disney style |
| Steampunk | | Victorian sci-fi |
| Fantasy magic | | Magical scenes |
| Wuxia/Xianxia | | Chinese martial arts |
| Sci-fi space | | Space scenes |
| Pop art | | Warhol style |
| Ukiyo-e | | Japanese woodblock |
| Impressionist | | Monet/Renoir style |
| Art Nouveau | | Mucha style |
| General | | Any artistic style |
| 风格 | 标识 | 适用场景 |
|---|---|---|
| 吉卜力风格 | | 吉卜力风格场景 |
| 美式漫画 | | 漫威/DC风格 |
| 日本漫画 | | 漫画插画 |
| 像素艺术 | | 复古游戏风格 |
| 铅笔素描 | | 手绘风格 |
| 3D卡通 | | 皮克斯/迪士尼风格 |
| 蒸汽朋克 | | 维多利亚科幻风格 |
| 奇幻魔法 | | 魔法场景 |
| 武侠/仙侠 | | 中国武侠风格 |
| 科幻太空 | | 太空场景 |
| 波普艺术 | | 沃霍尔风格 |
| 浮世绘 | | 日本浮世绘风格 |
| 印象派 | | 莫奈/雷诺阿风格 |
| 新艺术风格 | | 穆夏风格 |
| 通用风格 | | 任何艺术风格 |
6. Model selection guide
6. 模型选择指南
| Model | Key | Speed | Quality | Best for |
|---|---|---|---|---|
| NanoPro | | ~25s | Good | Default for all requests. Fast iteration. |
| GPT Image 2 | | ~150s | Best | When user explicitly asks for "highest quality" or "best quality". Text-heavy designs. |
Decision rules:
- Default: always use unless the user explicitly requests higher quality.
nanopro - Use when: user says "highest quality", "best quality", "premium", or the design requires precise text rendering (logos with specific text, posters with typography).
gpt - Use when: user wants fast results, is iterating on designs, or generating multiple variants.
nanopro
python
undefined| 模型 | 标识 | 速度 | 质量 | 适用场景 |
|---|---|---|---|---|
| NanoPro | | ~25秒 | 良好 | 所有请求的默认选项,迭代速度快。 |
| GPT Image 2 | | ~150秒 | 最佳 | 用户明确要求“最高质量”或“最佳质量”时使用,适用于文字密集型设计。 |
决策规则:
- 默认设置: 除非用户明确要求更高质量,否则始终使用。
nanopro - 使用的场景: 用户提及“最高质量”、“最佳质量”、“premium”,或设计需要精确文字渲染(带有特定文字的标志、含排版的海报)。
gpt - 使用的场景: 用户需要快速结果、正在迭代设计,或生成多个变体。
nanopro
python
undefinedDefault (fast)
默认设置(快速)
result = generate_image(prompt="cute cat logo", category="logo")
result = generate_image(prompt="cute cat logo", category="logo")
High quality (user requested)
高质量(用户要求)
result = generate_image(prompt="cute cat logo", category="logo", model="gpt")
---result = generate_image(prompt="cute cat logo", category="logo", model="gpt")
---7. Aspect ratio guide
7. 比例指南
| Category | Default ratio | Notes |
|---|---|---|
| Logo | 1:1 | Square, scalable |
| Poster | 3:4 | Portrait orientation |
| Illustration | 4:3 | Landscape, wide scene |
| Meme | 1:1 | Square, shareable |
| Game asset | 1:1 | Square, consistent |
| Social media | 1:1 | Varies by platform |
| 3D | 1:1 | Square render |
| Education | 4:3 | Landscape, readable |
| Fashion | 3:4 | Portrait, full garment |
| Food | 4:3 | Landscape, appetizing |
| Pet | 1:1 | Square, cute |
| Product | 1:1 | Square, e-commerce |
| Wedding | 3:4 | Portrait, elegant |
| Holiday | 4:3 | Landscape, festive |
| Art style | 4:3 | Landscape, scenic |
Platform-specific overrides (auto-applied):
- TikTok cover → (1080x1920)
9:16 - Instagram story → (1080x1920)
9:16 - YouTube thumbnail → (1280x720)
16:9 - Social media banner → (1920x1080)
16:9 - 小红书 → (1080x1440)
3:4
The script auto-selects the best ratio when is not explicitly set.
aspect_ratio| 分类 | 默认比例 | 说明 |
|---|---|---|
| 标志 | 1:1 | 方形,可缩放 |
| 海报 | 3:4 | 竖版 |
| 插画 | 4:3 | 横版,宽场景 |
| 表情包 | 1:1 | 方形,便于分享 |
| 游戏资产 | 1:1 | 方形,保持一致 |
| 社交媒体 | 1:1 | 因平台而异 |
| 3D | 1:1 | 方形渲染 |
| 教育 | 4:3 | 横版,易读 |
| 时尚 | 3:4 | 竖版,展示完整服装 |
| 美食 | 4:3 | 横版,更有食欲 |
| 宠物 | 1:1 | 方形,可爱风格 |
| 产品 | 1:1 | 方形,电商场景 |
| 婚礼 | 3:4 | 竖版,优雅风格 |
| 节日 | 4:3 | 横版,节日氛围 |
| 艺术风格 | 4:3 | 横版,风景场景 |
平台特定覆盖规则(自动应用):
- TikTok封面 → (1080x1920)
9:16 - Instagram故事 → (1080x1920)
9:16 - YouTube缩略图 → (1280x720)
16:9 - 社交媒体横幅 → (1920x1080)
16:9 - 小红书 → (1080x1440)
3:4
当未明确设置时,脚本会自动选择最佳比例。
aspect_ratio8. Prompt engineering best practices
8. 提示词工程最佳实践
The 5-element prompt structure
五要素提示词结构
Every effective image prompt should include:
[subject/content], [style/aesthetic], [composition/layout], [lighting/atmosphere], [quality modifiers]每个有效的图像提示词应包含以下要素:
[主体/内容], [风格/美学], [构图/布局], [光线/氛围], [质量修饰词]Key principles
核心原则
-
Be specific about the subject:
- ❌ "a logo"
- ✅ "a minimalist cat silhouette logo for a pet grooming business, clean vector style"
-
Specify the visual style:
- "flat design", "3D render", "watercolor painting", "photorealistic"
- "minimalist", "detailed", "abstract", "geometric"
-
Include composition guidance:
- "centered composition", "rule of thirds", "symmetrical layout"
- "close-up", "wide shot", "isometric view", "bird's eye view"
-
Lighting matters:
- Studio: "soft diffused studio lighting", "Rembrandt chiaroscuro"
- Natural: "golden hour warm light", "dappled sunlight through trees"
- Dramatic: "dramatic rim lighting", "volumetric light beams", "neon glow"
- Flat: "even flat lighting with no shadows" (for icons/diagrams)
-
Quality anchors:
- "professional quality", "print-ready", "4K resolution"
- "octane render", "Unreal Engine quality", "magazine quality"
-
For text in images (usemodel):
gpt- Explicitly state the text:
text reading "SALE 50% OFF" - Specify font style: "bold sans-serif typography", "elegant script font"
- GPT model handles text rendering much better than nanopro
- Explicitly state the text:
-
明确主体:
- ❌ "a logo"
- ✅ "a minimalist cat silhouette logo for a pet grooming business, clean vector style"
-
指定视觉风格:
- "flat design"、"3D render"、"watercolor painting"、"photorealistic"
- "minimalist"、"detailed"、"abstract"、"geometric"
-
包含构图指导:
- "centered composition"、"rule of thirds"、"symmetrical layout"
- "close-up"、"wide shot"、"isometric view"、"bird's eye view"
-
光线很重要:
- 工作室光线:"soft diffused studio lighting"、"Rembrandt chiaroscuro"
- 自然光:"golden hour warm light"、"dappled sunlight through trees"
- 戏剧性光线:"dramatic rim lighting"、"volumetric light beams"、"neon glow"
- 平光:"even flat lighting with no shadows"(适用于图标/图表)
-
质量锚点:
- "professional quality"、"print-ready"、"4K resolution"
- "octane render"、"Unreal Engine quality"、"magazine quality"
-
图像中的文字(使用模型):
gpt- 明确说明文字内容:
text reading "SALE 50% OFF" - 指定字体风格:"bold sans-serif typography"、"elegant script font"
- GPT模型处理文字渲染的效果远优于nanopro
- 明确说明文字内容:
Logo-specific prompt tips (from logo-design-guide)
标志专属提示词技巧(来自标志设计指南)
Keywords that work:
flat vector logo, simple minimal icon, single color silhouette,
geometric logo mark, clean lines, negative space design,
line art logo, flat design icon, minimalist symbolKeywords that fail:
❌ photorealistic logo (contradiction — logos aren't photos)
❌ 3D rendered logo (too complex, won't scale down)
❌ gradient logo (inconsistent results, hard to reproduce)
❌ logo with text "Company Name" (text rendering fails)Prompt structure for logos:
flat vector logo of [subject], [style], [color constraint], [background], [additional detail]有效关键词:
flat vector logo, simple minimal icon, single color silhouette,
geometric logo mark, clean lines, negative space design,
line art logo, flat design icon, minimalist symbol无效关键词:
❌ photorealistic logo(矛盾——标志并非照片)
❌ 3D rendered logo(过于复杂,无法缩小使用)
❌ gradient logo(结果不一致,难以复刻)
❌ logo with text "Company Name"(文字渲染失败)标志提示词结构:
flat vector logo of [subject], [style], [color constraint], [background], [additional detail]Children's illustration tips (from book-illustrator)
儿童插画技巧(来自书籍插画师指南)
- Ages 0-2: Simple, bold, high-contrast, clear shapes
- Ages 3-5: Colorful, expressive, engaging characters with movement
- Ages 6-8: More detailed scenes with visual storytelling
- Ages 9-12: Sophisticated illustrations supporting text
- The 3-Color Rule: Limit each character to 3-4 primary colors for visual clarity
- 0-2岁: 简洁、醒目、高对比度、清晰形状
- 3-5岁: 色彩丰富、富有表现力、角色生动有动感
- 6-8岁: 场景更详细,包含视觉叙事
- 9-12岁: 插画更精致,辅助文字内容
- 三色原则: 每个角色限制使用3-4种主色调,保证视觉清晰
Game asset tips (from game-asset-generation)
游戏资产技巧(来自游戏资产生成指南)
- Always specify pixel dimensions for sprites: "32x32", "64x64", "128x128"
- For seamless textures: "must tile perfectly with no visible seams when repeated"
- For sprite sheets: specify grid layout "4x2 grid (256x64 total)"
- For icons: "clear silhouette readable at 32x32 pixels"
- 务必为精灵指定像素尺寸:"32x32"、"64x64"、"128x128"
- 无缝纹理:"must tile perfectly with no visible seams when repeated"
- 精灵图:指定网格布局"4x2 grid (256x64 total)"
- 图标:"clear silhouette readable at 32x32 pixels"
Example: building a custom prompt
示例:构建自定义提示词
User: "Design a logo for my coffee shop called Bean Dream"
python
result = generate_image(
prompt=(
"flat vector logo of a coffee bean morphing into a crescent moon, "
"minimalist design, warm brown and cream color palette, "
"clean lines, white background, "
"professional branding quality, works at any size"
),
category="logo",
model="gpt", # GPT for better detail
)用户:"为我的咖啡店Bean Dream设计一个标志"
python
result = generate_image(
prompt=(
"flat vector logo of a coffee bean morphing into a crescent moon, "
"minimalist design, warm brown and cream color palette, "
"clean lines, white background, "
"professional branding quality, works at any size"
),
category="logo",
model="gpt", # GPT模型细节更出色
)Example: game character concept
示例:游戏角色概念设计
User: "Create a warrior character for my RPG game"
python
result = generate_image(
prompt=(
"female warrior character, ornate golden armor with dragon motifs, "
"flowing red cape, wielding a glowing enchanted sword, "
"determined fierce expression, battle-ready stance, "
"front view T-pose, clean white background"
),
category="game_asset",
style="character",
)用户:"为我的RPG游戏创建一个战士角色"
python
result = generate_image(
prompt=(
"female warrior character, ornate golden armor with dragon motifs, "
"flowing red cape, wielding a glowing enchanted sword, "
"determined fierce expression, battle-ready stance, "
"front view T-pose, clean white background"
),
category="game_asset",
style="character",
)Example: social media content
示例:社交媒体内容
User: "Make a TikTok cover about cooking tips"
python
result = generate_image(
prompt=(
"cooking tips video thumbnail, colorful kitchen scene, "
"fresh ingredients flying in the air, chef's hands visible, "
"fun energetic vibe, bold visual impact"
),
category="social_media",
style="tiktok_cover",
# aspect_ratio auto-set to 9:16
)用户:"制作一个关于烹饪技巧的TikTok封面"
python
result = generate_image(
prompt=(
"cooking tips video thumbnail, colorful kitchen scene, "
"fresh ingredients flying in the air, chef's hands visible, "
"fun energetic vibe, bold visual impact"
),
category="social_media",
style="tiktok_cover",
# 比例自动设置为9:16
)9. Intent recognition guide
9. 意图识别指南
Use this table to map user requests to the correct category/style/parameters:
| User says | Category | Style | Notes |
|---|---|---|---|
| "design a logo", "make a logo" | | auto-detect | Ask about industry for style |
| "create a poster", "event poster" | | auto-detect | |
| "draw an illustration", "illustrate" | | auto-detect | |
| "make a meme", "funny image" | | auto-detect | |
| "game character", "RPG asset" | | | |
| "game environment", "level design" | | | |
| "weapon design", "sword/shield" | | | |
| "game icon", "UI icon" | | | |
| "pixel art sprite" | | | |
| "tileable texture", "seamless tile" | | | |
| "Instagram post", "IG content" | | | |
| "小红书", "xiaohongshu" | | | |
| "TikTok cover", "抖音封面" | | | 9:16 |
| "YouTube thumbnail" | | | 16:9 |
| "banner", "cover image" | | | 16:9 |
| "story template" | | | 9:16 |
| "3D character", "Pixar style" | | | |
| "product render", "3D product" | | | |
| "diorama", "miniature scene" | | | |
| "app icon", "3D icon" | | | |
| "3D text", "chrome text" | | | |
| "textbook illustration" | | | |
| "infographic", "data viz" | | | |
| "scientific diagram" | | | |
| "historical scene" | | | |
| "fashion sketch", "clothing design" | | | |
| "accessory design", "jewelry" | | | |
| "nail art", "nail design" | | | |
| "textile pattern", "fabric design" | | | |
| "food photo", "dish" | | | |
| "menu design" | | | |
| "food packaging" | | | |
| "recipe card" | | | |
| "product photo", "product shot" | | | |
| "Amazon listing", "e-commerce photo" | | | White bg |
| "lifestyle product", "product in context" | | | |
| "flat lay", "top-down product" | | | |
| "pet in clothes", "humanized pet" | | | |
| "royal pet", "renaissance pet" | | | |
| "cartoon pet", "Disney pet" | | | |
| "pet merchandise", "pet pattern" | | | |
| "pet memorial", "rainbow bridge" | | | |
| "wedding invitation", "请柬" | | | |
| "modern invitation" | | | |
| "rustic invitation" | | | |
| "wedding venue", "婚礼布置" | | | |
| "save the date" | | | |
| "Christmas card", "圣诞贺卡" | | | |
| "春节", "Chinese New Year" | | | |
| "New Year design", "新年" | | | |
| "Valentine's card", "情人节" | | | |
| "Halloween", "万圣节" | | | |
| "sale banner", "promotional" | | | |
| "中秋节", "Mid-Autumn" | | | |
| "Ghibli style", "吉卜力" | | | |
| "comic style", "漫画风" | | | |
| "pixel art", "像素风" | | | |
| "pencil sketch", "素描" | | | |
| "steampunk", "蒸汽朋克" | | | |
| "fantasy", "魔法" | | | |
| "wuxia", "武侠", "仙侠" | | | |
| "space", "太空", "sci-fi" | | | |
| "pop art", "波普" | | | |
| "ukiyo-e", "浮世绘" | | | |
| "impressionist", "印象派" | | | |
| "Art Nouveau", "新艺术" | | | |
| "highest quality", "best quality" | any | any + | |
| Custom description not in presets | — | — | Use |
使用下表将用户请求映射到正确的分类/风格/参数:
| 用户表述 | 分类 | 风格 | 说明 |
|---|---|---|---|
| "design a logo"、"make a logo" | | 自动检测 | 询问行业以确定风格 |
| "create a poster"、"event poster" | | 自动检测 | |
| "draw an illustration"、"illustrate" | | 自动检测 | |
| "make a meme"、"funny image" | | 自动检测 | |
| "game character"、"RPG asset" | | | |
| "game environment"、"level design" | | | |
| "weapon design"、"sword/shield" | | | |
| "game icon"、"UI icon" | | | |
| "pixel art sprite" | | | |
| "tileable texture"、"seamless tile" | | | |
| "Instagram post"、"IG content" | | | |
| "小红书"、"xiaohongshu" | | | |
| "TikTok cover"、"抖音封面" | | | 9:16 |
| "YouTube thumbnail" | | | 16:9 |
| "banner"、"cover image" | | | 16:9 |
| "story template" | | | 9:16 |
| "3D character"、"Pixar style" | | | |
| "product render"、"3D product" | | | |
| "diorama"、"miniature scene" | | | |
| "app icon"、"3D icon" | | | |
| "3D text"、"chrome text" | | | |
| "textbook illustration" | | | |
| "infographic"、"data viz" | | | |
| "scientific diagram" | | | |
| "historical scene" | | | |
| "fashion sketch"、"clothing design" | | | |
| "accessory design"、"jewelry" | | | |
| "nail art"、"nail design" | | | |
| "textile pattern"、"fabric design" | | | |
| "food photo"、"dish" | | | |
| "menu design" | | | |
| "food packaging" | | | |
| "recipe card" | | | |
| "product photo"、"product shot" | | | |
| "Amazon listing"、"e-commerce photo" | | | 纯白背景 |
| "lifestyle product"、"product in context" | | | |
| "flat lay"、"top-down product" | | | |
| "pet in clothes"、"humanized pet" | | | |
| "royal pet"、"renaissance pet" | | | |
| "cartoon pet"、"Disney pet" | | | |
| "pet merchandise"、"pet pattern" | | | |
| "pet memorial"、"rainbow bridge" | | | |
| "wedding invitation"、"请柬" | | | |
| "modern invitation" | | | |
| "rustic invitation" | | | |
| "wedding venue"、"婚礼布置" | | | |
| "save the date" | | | |
| "Christmas card"、"圣诞贺卡" | | | |
| "春节"、"Chinese New Year" | | | |
| "New Year design"、"新年" | | | |
| "Valentine's card"、"情人节" | | | |
| "Halloween"、"万圣节" | | | |
| "sale banner"、"promotional" | | | |
| "中秋节"、"Mid-Autumn" | | | |
| "Ghibli style"、"吉卜力" | | | |
| "comic style"、"漫画风" | | | |
| "pixel art"、"像素风" | | | |
| "pencil sketch"、"素描" | | | |
| "steampunk"、"蒸汽朋克" | | | |
| "fantasy"、"魔法" | | | |
| "wuxia"、"武侠"、"仙侠" | | | |
| "space"、"太空"、"sci-fi" | | | |
| "pop art"、"波普" | | | |
| "ukiyo-e"、"浮世绘" | | | |
| "impressionist"、"印象派" | | | |
| "Art Nouveau"、"新艺术" | | | |
| "highest quality"、"best quality" | 任意 | 任意 + | |
| 不在预设中的自定义描述 | — | — | 直接使用 |
10. Using with a reference image (optional)
10. 使用参考图像(可选)
While this skill is primarily text-to-image, you can provide a reference image for design inspiration:
python
undefined虽然此技能主要用于text-to-image,但你也可以提供参考图像作为设计灵感:
python
undefinedReference image for design guidance
参考图像用于设计指导
result = generate_image(
prompt="redesign this logo in a modern minimalist style",
category="logo",
image_path="uploads/old_logo.png",
)
result = generate_image(
prompt="redesign this logo in a modern minimalist style",
category="logo",
image_path="uploads/old_logo.png",
)
Reference URL
参考URL
result = generate_image(
prompt="create a similar style illustration but with a forest theme",
image_url="https://example.com/reference.jpg",
)
When a reference image is provided, the script uses the `/edit` endpoint instead of the generate endpoint.
---result = generate_image(
prompt="create a similar style illustration but with a forest theme",
image_url="https://example.com/reference.jpg",
)
当提供参考图像时,脚本会使用`/edit`端点而非生成端点。
---11. Multiple images
11. 生成多张图像
python
undefinedpython
undefinedGenerate 4 logo variants
生成4个标志变体
result = generate_image(
prompt="minimalist mountain logo for outdoor brand",
category="logo",
count=4,
)
result = generate_image(
prompt="minimalist mountain logo for outdoor brand",
category="logo",
count=4,
)
result["images"] -> list of 4 image dicts
result["images"] -> 包含4个图像字典的列表
---
---12. Anti-patterns (avoid these)
12. 反模式(需避免)
| Avoid | Why | Instead |
|---|---|---|
| AI garbles text | Generate icon only, add text in Figma/Canva |
| Logos aren't photos | Use "flat vector logo" |
| Won't scale to favicon | Use "flat minimal icon" |
| Vague prompts like "nice image" | Poor results | Be specific: subject, style, colors, lighting |
| Too many concepts in one prompt | Confused output | Focus on one clear concept |
| Requesting exact pixel dimensions | Not supported | Use |
Using | Text rendering poor | Use |
| 需避免的操作 | 原因 | 替代方案 |
|---|---|---|
| AI会使文字错乱 | 仅生成图标,在Figma/Canva中添加文字 |
| 标志并非照片 | 使用"flat vector logo" |
| 无法缩小为网站图标 | 使用"flat minimal icon" |
| 模糊提示词如"nice image" | 结果质量差 | 明确说明:主体、风格、颜色、光线 |
| 一个提示词包含过多概念 | 输出混乱 | 聚焦一个清晰的概念 |
| 请求精确像素尺寸 | 不支持该功能 | 使用 |
对文字密集型设计使用 | 文字渲染效果差 | 对文字内容使用 |
13. Provided scripts
13. 提供的脚本
| File | Purpose |
|---|---|
| Core script: prompt building → submit → poll → download. Handles all categories, styles, two models. |
| Re-exports |
| Cost tracking helper — records per-call costs via sc-proxy headers. Self-contained, no external dependencies. |
| 文件 | 用途 |
|---|---|
| 核心脚本:提示词构建 → 提交 → 轮询 → 下载。支持所有分类、风格及两种模型。 |
| 重新导出 |
| 成本跟踪辅助工具——通过sc-proxy头部记录每次调用的成本。独立封装,无外部依赖。 |
14. Local testing
14. 本地测试
Set env var to call fal.ai directly (bypasses sc-proxy):
FAL_KEYbash
undefined设置环境变量以直接调用fal.ai(绕过sc-proxy):
FAL_KEYbash
undefinedBasic generation
基础生成
FAL_KEY=your-fal-key python3 skills/image-create/generate_image.py "a cute robot" illustration fantasy 1 nanopro
FAL_KEY=your-fal-key python3 skills/image-create/generate_image.py "a cute robot" illustration fantasy 1 nanopro
Args: <prompt> [category] [style] [count] [model]
参数:<prompt> [category] [style] [count] [model]
---
---15. Troubleshooting
15. 故障排除
| Problem | Fix |
|---|---|
| Provide at least a prompt or category |
| Check the workspace path for reference image |
| Use |
| Resize reference image to under 10 MB |
| Top up balance; cost is pre-charged on submit |
| sc-proxy only allows approved fal endpoints; contact admin |
Generation | Simplify prompt, retry |
Job stuck | Save |
| Text not rendering well | Switch to |
| Switch to |
| Logo too complex to scale | Use "flat vector", "minimal", "single color" in prompt |
| Seamless texture has visible seams | Add "must tile perfectly with no visible seams" to prompt |
| 问题 | 解决方法 |
|---|---|
| 至少提供一个提示词或分类 |
| 检查参考图像的工作区路径 |
| 使用 |
| 将参考图像调整至10MB以下 |
| 充值余额;提交时会预先扣费 |
| sc-proxy仅允许已批准的fal端点;联系管理员 |
上游生成 | 简化提示词,重试 |
任务卡在 | 保存 |
| 文字渲染效果差 | 切换至 |
| 切换至 |
| 标志过于复杂无法缩放 | 在提示词中使用"flat vector"、"minimal"、"single color" |
| 无缝纹理有可见接缝 | 在提示词中添加"must tile perfectly with no visible seams" |
16. Infrastructure (reference)
16. 基础设施(参考)
- Caller → →
sc-proxy→ fal model providersqueue.fal.run/{model} - All requests must include (proxy injects the real
Authorization: Key fake-falai-key-12345)FAL_KEY - Pre-charge happens at submit. Poll/result calls are free.
- Final images live at — public CDN, no auth needed for download.
https://*.fal.media/... - Cost tracking via — records
_cost_track.pyfrom sc-proxy response headers.X-Credits-Used - Each skill contains its own copy (skills are independently deployed).
_cost_track.py
- 调用者 → →
sc-proxy→ fal模型提供商queue.fal.run/{model} - 所有请求必须包含(代理会注入真实的
Authorization: Key fake-falai-key-12345)FAL_KEY - 提交时预先扣费,轮询/结果查询免费。
- 最终图像存储在——公共CDN,下载无需认证。
https://*.fal.media/... - 通过跟踪成本——记录sc-proxy响应头部中的
_cost_track.py。X-Credits-Used - 每个技能包含独立的副本(技能独立部署)。
_cost_track.py
Model endpoints
模型端点
| Model | Generate (text only) | Edit (with ref image) |
|---|---|---|
| nanopro | | |
| gpt | | |
| 模型 | 生成(仅文本) | 编辑(带参考图像) |
|---|---|---|
| nanopro | | |
| gpt | | |