GPT-Image2 Prompt Templates: The Two Forms Explained
The awesome-gpt-image-2 repository defines two distinct prompt template formats—a human-readable plain-text form for manual editing and a structured JSON form for programmatic automation—both cataloged in docs/templates.md.
The freestylefly/awesome-gpt-image-2 repository maintains a master collection of GPT-Image2 prompt templates designed to generate high-quality UI screenshots, infographics, and posters. Every template category in the codebase provides dual-format definitions to support both interactive human workflows and deterministic machine processing.
The Two GPT-Image2 Prompt Template Formats
According to the source code in freestylefly/awesome-gpt-image-2, every prompt template is provided in two parallel formats side-by-side within each category (UI, Infographic, Poster, and others). These are referred to as the Plain-Text "常规模板" (Regular Template) and the JSON "进阶模板" (Advanced Template).
Plain-Text "常规模板" (Regular Template)
The plain-text format is a human-readable, free-form text template that describes the desired image in natural language with placeholders. This form uses bracketed variables such as [产品类型], [平台], and [功能点A] to indicate customizable fields.
Key characteristics include:
- Natural language structure optimized for readability
- Placeholder syntax using square brackets (e.g.,
[产品类型],[平台,如 iOS/Android/Web]) - Immediate copy-paste compatibility for direct user interaction
- Manual editing capability without parsing requirements
In the repository's docs/templates.md, the UI category's plain-text template appears at lines 16-22, immediately followed by its JSON counterpart at lines 24-46. The same pattern repeats for the Infographic section (lines 98-105 for plain-text, lines 107-129 for JSON) and the Poster section (lines 51-58 for plain-text, lines 60-68 for JSON).
JSON "进阶模板" (Advanced Template)
The JSON format is a structured object that enumerates each component of the prompt with explicit type fields. This machine-readable structure is optimized for programmatic consumption by agents, automation scripts, and API integrations.
Key characteristics include:
- Strict schema with named fields:
type,platform,product,layout,style,content,constraints - Nested objects for complex properties (e.g.,
style.theme,content.cards) - Deterministic field extraction for batch processing
- Direct compatibility with automation agents and API payloads
The JSON templates in docs/templates.md serve as the canonical reference for the agents/skills/gpt-image-2-style-library/references/style-library.md file, which links directly to these structured definitions for programmatic use.
Source File Locations
The dual-format templates are distributed across three key files in the repository:
docs/templates.md
This file contains the master catalog of all prompt templates, showing both the plain-text and JSON forms for every category. It serves as the primary reference document where both formats appear side-by-side for comparison.
agents/skills/gpt-image-2-style-library/references/style-library.md
This file provides template references used specifically by the gpt-image-2 skill, linking directly to the JSON versions in templates.md. It enables agent-based automation workflows to consume the structured templates programmatically.
README.md
The main documentation file (and its localized variants) links to the template sections and explains the semantic differences between the two forms, guiding users on when to select each format.
Practical Examples: UI Category
The following examples from docs/templates.md demonstrate the identical UI screenshot prompt expressed in both formats.
Plain-Text Template (Lines 16-22):
为[产品类型]生成一张[平台,如 iOS/Android/Web]界面图。
核心功能:[功能点A]、[功能点B]、[功能点C]。
视觉风格:[极简/科技/拟物],主色[颜色],强调色[颜色]。
布局:[顶部导航/双栏/卡片流],信息层级清晰,留白充足。
输出:高保真UI截图,文字清晰可读,比例[9:16/16:9]。
JSON Template (Lines 24-46):
{
"type": "UI Screenshot",
"platform": "iOS",
"product": "Fitness App",
"layout": "Card-based feed with bottom tab bar",
"style": {
"theme": "Dark Mode",
"primary_color": "Neon Green",
"typography": "Clean sans-serif"
},
"content": {
"header": "Today's Activity",
"cards": [
{"title": "Running", "data": "5.2 km", "button": "Start"},
{"title": "Calories", "data": "340 kcal"}
]
},
"constraints": "High fidelity, readable text, 9:16 aspect ratio"
}
When to Use Each Format
Select the appropriate template form based on your workflow requirements:
-
Plain-Text Form: Use when engaging in direct user interaction, quick copy-paste operations, or manual editing scenarios where human readability takes precedence over structure. This format allows rapid iteration without JSON syntax constraints.
-
JSON Form: Use for agent-based automation, batch processing workflows, or API integrations requiring deterministic field extraction. This format enables scripts to generate variations programmatically by modifying specific object properties without parsing natural language.
Summary
- The repository maintains two parallel formats for every GPT-Image2 prompt template: plain-text "常规模板" and JSON "进阶模板".
- Plain-text templates in
docs/templates.mduse bracketed placeholders like[产品类型]for human-readable, editable prompts at lines 16-22 (UI), 51-58 (Poster), and 98-105 (Infographic). - JSON templates provide structured schemas with fields like
type,layout,style, andconstraintsat lines 24-46 (UI), 60-68 (Poster), and 107-129 (Infographic) for machine consumption. - The
agents/skills/gpt-image-2-style-library/references/style-library.mdfile references the JSON templates for programmatic agent use. - Choose plain-text for manual workflows and JSON for automation scripts requiring deterministic data extraction.
Frequently Asked Questions
What is the difference between the plain-text and JSON GPT-Image2 prompt templates?
The plain-text template is a human-readable format using natural language with bracketed placeholders like [产品类型], while the JSON template is a structured object with explicit fields such as type, platform, and style. According to the source code in docs/templates.md, both contain identical semantic information but differ in syntax optimized for human editing versus machine parsing.
Which template format should I use for automation scripts?
Use the JSON "进阶模板" format for automation scripts. This structured format appears in docs/templates.md and is referenced by agents/skills/gpt-image-2-style-library/references/style-library.md specifically for agent consumption. The JSON schema allows deterministic extraction of fields like layout, content, and constraints without natural language parsing.
Where are the GPT-Image2 prompt templates located in the repository?
All templates reside in docs/templates.md, which catalogs both formats for every category (UI, Infographic, Poster). The JSON versions are additionally linked from agents/skills/gpt-image-2-style-library/references/style-library.md for programmatic access, while README.md provides high-level documentation linking to both forms.
Can I convert between the plain-text and JSON formats?
While the repository presents both formats side-by-side (e.g., UI plain-text at lines 16-22 and JSON at lines 24-46), manual conversion requires mapping bracketed placeholders to JSON fields. The plain-text placeholders like [平台,如 iOS/Android/Web] correspond to JSON keys such as "platform", but automated conversion utilities are not provided in the current codebase.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →