← 返回
未分类

gpt-image-prompting-guide

Generate professional GPT Image 2 prompts based on OpenAI's official prompting guide. Use this skill when the user wants to create AI-generated images, needs help writing image prompts, asks about GPT Image / DALL-E prompting techniques, or wants to generate/edit images using OpenAI's image models. Supports both generate (text→image) and edit (text+image→image) modes with structured, production-quality prompt output.
基于 OpenAI 官方《GPT Image Generation Models Prompting Guide》的专业提示词生成技能。帮助用户按照官方最佳实践创建高质量、可控的 GPT Image 2 提示词。
瞧越
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 88
下载
💾 0
安装
1
版本
#latest

概述

GPT Image Prompt Generator

基于 OpenAI 官方《GPT Image Generation Models Prompting Guide》的专业提示词生成技能。帮助用户按照官方最佳实践创建高质量、可控的 GPT Image 2 提示词。

Purpose

This skill guides users through creating professional-grade prompts for OpenAI's GPT Image 2 model. It follows the official prompting guide's methodology — structured prompts, explicit constraints, and mode-specific techniques — to produce reliable, production-quality results.

When to Use This Skill

Use this skill when the user:

  • Wants to generate AI images using GPT Image 2 / DALL-E
  • Needs help writing or improving image prompts
  • Asks about image prompting best practices
  • Wants to create specific types of images (logos, ads, UI mockups, infographics, etc.)
  • Needs to edit existing images (style transfer, object removal, background change, etc.)
  • Wants to add text to images
  • Asks about quality, input_fidelity, size, or other GPT Image API parameters
  • Mentions keywords like "提示词", "prompt", "出图", "AI绘画", "图像生成"

Workflow

Step 1: Understand the User's Need

Ask the user (or infer from context) the following:

  1. Mode: Generate (text → image) or Edit (text + image → image)?
  2. Scene/Use Case: What type of image? (See Scene Catalog below)
  3. Subject: What is the main subject/content?
  4. Style: Any specific visual style? (photorealistic, illustration, flat design, etc.)
  5. Constraints: Text to include? Things to avoid? Specific requirements?
  6. Output Size: Portrait, landscape, square, or custom?

If the user's request is vague, use AskUserQuestion to clarify the mode and scene type before proceeding.

Step 2: Select the Appropriate Template

Based on the user's scene type, select the matching template from resources/prompt-templates.md. Each template includes:

  • Structured prompt format (Scene / Style / Mood / Constraints)
  • Key parameters recommendation
  • Common pitfalls to avoid

Step 3: Generate the Prompt

Follow these principles when constructing the prompt:

For Generate Mode (text → image):

  1. Structure the prompt in this order:
    • Background/Environment → Subject → Key Details → Constraints
  2. Be specific about materials, textures, lighting, and atmosphere
  3. Specify composition: camera angle, lens, depth of field, lighting direction
  4. Add explicit constraints: "No watermarks", "No extra text", "No logos"
  5. For text in images: use quotes, specify "EXACT, verbatim", define font style

For Edit Mode (text + image → image):

  1. Clearly separate what should CHANGE vs. what must STAY THE SAME
  2. Lock identity features when editing people (face, body, pose, hairstyle)
  3. Recommend input_fidelity="high" for precision edits
  4. Use "ONLY" to restrict changes to specific elements
  5. Reiterate constraints in every iteration to prevent drift

Step 4: Recommend API Parameters

Based on the scene type, recommend appropriate parameters:

Scenequalityinput_fidelitysizebackgroundn
-----------------------------------------------------
Infographicshigh-1536x1024-1
Photorealistichigh-1024x1536-1
Logomedium-1024x1024opaque4
Adshigh-1536x1024-1
UI Mockupshigh-1024x1536-1
Scientific/Eduhigh-1536x1024-1
Slides/Chartshigh-1536x1024-1
Style Transfermedium-1024x1536-1
Virtual Try-Onmediumhigh1024x1536-1
Drawing→Imagehighhigh1536x1024-1
Product Mockupmediumhigh1024x1024opaque1
Marketing Texthigh-1536x1024-1
Lighting/Weathermediumhigh1536x1024-1
Object Removalmediumhigh1024x1536-1
Person Inserthighhigh1536x1024-1
Multi-Imagemediumhigh1024x1536-1
Interior Swapmediumhigh1536x1024-1

Step 5: Output Format

Present the final result to the user in this format:

## 📋 提示词 / Prompt

\```english
[Complete English prompt]
\```

### 中文翻译

\```
[Chinese translation]
\```

## ⚙️ 推荐参数

| 参数 | 值 | 说明 |
|------|-----|------|
| model | gpt-image-2 | 最新模型 |
| quality | [value] | [reason] |
| input_fidelity | [value] | [reason] |
| size | [value] | [reason] |
| [other params] | [value] | [reason] |

## 💡 关键技巧

- [Tip 1]
- [Tip 2]
- [Tip 3]

## 🐍 Python 代码

\```python
from openai import OpenAI
import base64, os

client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))

result = client.images.[generate|edit](
    model="gpt-image-2",
    prompt="""[prompt]""",
    [image=[...],]  # edit mode only
    [input_fidelity="[value]",]  # edit mode only
    size="[size]",
    quality="[quality]",
    [n=[value],]
    [background="[value]",]
)

# Save image
image_bytes = base64.b64decode(result.data[0].b64_json)
with open("output.png", "wb") as f:
    f.write(image_bytes)
\```

Scene Catalog

Generate Mode (text → image)

#SceneDescriptionKey Technique
--------------------------------------
G1信息图表Technical diagrams, flowcharts, process illustrationsList all components, use quality="high"
G2图片翻译Translate text within images to another language"Do not change any other aspect"
G3照片级写实Photorealistic photographs with natural feel"photorealistic" + material textures + camera specs
G4世界知识Historical/scientific scenes using GPT's knowledgeSpecific time, place, "period-accurate"
G5Logo生成Brand logos, icons, visual identity"original, non-infringing", flat design, n=4
G6广告生成Brand ads, fashion shots, marketing visualsCreative brief style, tagline in quotes
G7故事转漫画Comic strips, storyboards, visual narrativesNumbered panels, action-oriented descriptions
G8UI模型App interfaces, web mockups, product screens"Like it already exists", layout + spacing
G9科学/教育Educational diagrams, classroom materialsAudience + objectives + visual format
G10幻灯片/图表Pitch decks, data visualization, presentationsProduct spec style, exact numbers

Edit Mode (text + image → image)

#SceneDescriptionKey Technique
--------------------------------------
E1风格迁移Apply style from reference image to new content"Use the same style" + hard constraints
E2虚拟试穿Dress a person in provided clothingLock ALL identity features, multi-image input
E3素描转图像Render sketches into photorealistic images"Preserve layout" + "Do not add new elements"
E4产品模型Extract product onto clean backgroundbackground="opaque", "crisp silhouette"
E5营销创意Create ads with real readable text"EXACT, verbatim" + font specification
E6光照天气Transform lighting/weather of a sceneOnly change environmental conditions
E7物品移除Remove specific objects from images"Do not change anything else" + input_fidelity="high"
E8人物插入Place a person into a new sceneGrounded photography, avoid cinematic
E9多图合成Combine elements from multiple images"from image X" + "into image Y" references

Prompt Structure Patterns

Pattern A: Structured Prompt (for complex scenes)

[Scene description]

Subject:
[Detailed subject description]

Style:
[Visual style, medium, reference]

Mood:
[Atmosphere, emotion, tone]

Constraints:
- [Constraint 1]
- [Constraint 2]
- No watermarks, no logos

Pattern B: Creative Brief (for ads/marketing)

[Brand/Client]: [name]
[Target audience]: [description]
[Concept]: [idea]
[Tagline]: "[exact text]"
[Visual direction]: [style, composition, color]
[Constraints]: [what to avoid]

Pattern C: Specification (for UI/slides/charts)

Create a [deliverable type] for [product].

Include:
- [Element 1]: [details]
- [Element 2]: [details]
- [Element 3]: [details]

Design requirements:
- [Layout spec]
- [Color scheme]
- [Typography]
- [What to avoid]

Pattern D: Precision Edit (for image editing)

[Action verb] [target] [from/in] [location].

Preserve:
- [Element 1]
- [Element 2]
- [Element 3]

Do not change anything else.

Best Practices

  1. Always write prompts in English — GPT Image 2 understands English best
  2. Structure over length — A well-organized short prompt beats a rambling long one
  3. Explicit constraints — Always state what NOT to do, not just what to do
  4. Iterate with small changes — Don't rewrite the entire prompt; tweak one element at a time
  5. Separate change from constancy — In edit mode, clearly distinguish what changes vs. what stays
  6. Use "ONLY" for surgical edits — "replace ONLY X" is stronger than "replace X"
  7. Quote exact text — For text-in-image, always use quotes and "EXACT, verbatim"
  8. Specify font for text — "bold sans-serif, high contrast, centered, clean kerning"
  9. Lock identity in edits — List every feature that must not change when editing people
  10. Match lighting in composites — When combining images, explicitly request matched lighting/shadows

Limitations

  • This skill generates prompts for GPT Image 2; other models may need adjustments
  • Text rendering in images may not be perfect on first try — iterate
  • Complex multi-image workflows may require multiple API calls
  • The skill provides prompt guidance, not actual image generation (requires OpenAI API access)

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-01 01:06 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 330 📥 93,321
design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 133 📥 52,736
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 216 📥 46,902