Screenshot-Specific Templates for GPT-Image2: A Complete Guide to Realistic UI Mockup Generation

The awesome‑gpt‑image‑2 repository provides structured prompt templates in docs/templates.md that enable deterministic generation of realistic screenshot‑style images for social media and live streaming platforms.

The awesome‑gpt‑image‑2 repository offers specialized screenshot‑specific templates for GPT‑Image2 that transform generic image generation into precise UI mockup creation. These templates, located in the docs/templates.md file under the UI 与界面 (UI & Layout) section, provide deterministic skeletons for generating platform‑specific screenshots with accurate text rendering and consistent aspect ratios.

Overview of Screenshot Templates in docs/templates.md

The repository organizes screenshot generation capabilities into two primary template categories within [docs/templates.md](https://github.com/freestylefly/awesome-gpt-image-2/blob/main/docs/templates.md). Each template functions as a prompt skeleton with explicit placeholders and constraint clauses that guide the model toward high‑fidelity screenshot production.

The Two Core Screenshot Template Types

Generic Social Media Screenshot Template (普通截图模板)

The 普通截图模板 (Generic Screenshot Template) generates realistic social‑media‑style screenshots for platforms including WeChat, TikTok (抖音), Xiaohongshu, and X.

This template enforces a specific structural hierarchy:

  • Platform Specification: Placeholder [平台,如 X/抖音/小红书/微信朋友圈] defines the target interface
  • Visual Mode: [深色/浅色] selects dark or light mode
  • Aspect Ratio: Fixed proportions (9:16, 3:4, or 1:1) ensure mobile authenticity
  • Content Zones:
    • Account information (avatar, username, verification badge)
    • Body text (mandatory Chinese character accuracy)
    • Engagement metrics (likes, comments, shares, favorites)
  • UI Elements: Status bars, navigation bars, tab bars, and floating components like gift effects or shopping carts

The template includes strict constraint clauses: 文字必须准确显示指定的中文,禁止乱码和占位文本 (Text must accurately display the specified Chinese content, prohibiting garbled or placeholder text).

Live Stream Interface Template (直播界面模板)

The 直播界面模板 produces live‑streaming screenshots for platforms like Douyin, Kuaishou, and Bilibili (B站), incorporating dynamic overlay elements.

Key structural components include:

  • Host Configuration: [人物描述/名称] for avatar/name, [坐姿/站立/动作] for posture, and [服装描述] for clothing
  • Environmental Controls: [直播间背景描述] for background and [暖色/冷色/混合] for lighting temperature
  • Overlay UI Layers:
    • Top: Host avatar, follow button, active viewer count, and heat rank
    • Lower‑left: Bullet comment list with sample entries
    • Lower‑right/Center: Product cards, gift effects, or PK progress bars
    • Bottom: Input field with function icons (share, like, gift, cart)

The template mandates 文字清晰可读,弹幕内容合理,界面元素不遮挡主播面部 (Text must be clear and readable, bullet comments must be reasonable, and UI elements must not obscure the host's face).

Template Architecture and Design Principles

Placeholder-Driven Structure

Each template utilizes a plaintext skeleton where variables wrap in square brackets […]. According to the source code in docs/templates.md, this design allows the same base template to serve multiple platforms by swapping platform‑specific cues while maintaining consistent layout enforcement.

Constraint Enforcement Mechanisms

The templates implement explicit avoid‑pitfall clauses that force the model to honor exact text rendering. This architectural decision addresses the critical requirement for legibility in screenshot generation, preventing the common failure mode of hallucinated or garbled text in generated images.

Modular UI Component Design

By separating common UI sections (顶部/top, 底部/bottom, 附加/additional) from platform‑specific parameters, the repository achieves template reusability. This modularity reduces prompt duplication and simplifies maintenance across the docs/templates.md file.

Practical Implementation Examples

Node.js API Integration

// Example: Calling the API with the screenshot template (Node.js)
import fetch from 'node-fetch';

const prompt = `
生成一张微信朋友圈内容截图,浅色模式。整体比例:9:16,手机截图风格。
账号信息:头像为圆形,用户名 "Alice",认证标识 ✔。
正文内容:"今天的烘焙成果,薰衣草蛋糕超好吃!"
互动数据:点赞 842,评论 27,转发 5,收藏 12。`;

const response = await fetch('https://api.your-gpt-image2.com/generate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ prompt })
});
const result = await response.json();
console.log(result.imageUrl);

cURL Command for Live Streams


# Example: Using the live‑stream template with curl

curl -X POST https://api.your-gpt-image2.com/generate \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "生成一张抖音直播界面截图。主播:昵称 \"小星\", 坐姿, 穿白色 T 恤。背景:粉色灯光。顶部显示主播头像、关注按钮、在线人数 1.5 万、热度 4321。左下弹幕示例 3 条,右下商品卡片显示 \"新品口红\"。底部输入框带点赞、分享、礼物图标。"
      }' | jq .

Summary

  • The awesome‑gpt‑image‑2 repository provides screenshot‑specific templates for GPT‑Image2 in docs/templates.md, specifically within the UI 与界面 section
  • Two primary templates exist: the 普通截图模板 for social media screenshots and the 直播界面模板 for live streaming interfaces
  • Each template employs a placeholder‑driven architecture with strict constraint enforcement to ensure accurate Chinese text rendering and proper aspect ratios
  • The modular design separates common UI components from platform‑specific variables, enabling reuse across WeChat, TikTok, Bilibili, and other platforms

Frequently Asked Questions

Where are the screenshot templates located in the repository?

The screenshot‑specific templates reside in the docs/templates.md file under the UI 与界面 (UI & Layout) section, specifically within the 截图生成模板 (Screenshot Generation Template) block.

How do these templates ensure text legibility in generated images?

The templates include explicit constraint clauses such as 文字必须准确显示指定的中文,禁止乱码和占位文本 that prohibit garbled or placeholder text, forcing the model to render specified Chinese characters with high accuracy and readability.

Can these templates generate screenshots for multiple platforms?

Yes. The modular architecture uses platform‑agnostic UI sections combined with [平台] placeholders, allowing the same base template to generate screenshots for WeChat, TikTok (抖音), Xiaohongshu, X, Bilibili, and Kuaishou by adjusting specific variables.

What aspect ratios do the templates support?

The templates explicitly support mobile‑standard aspect ratios including 9:16 (vertical video), 3:4, and 1:1, ensuring generated screenshots match authentic mobile device proportions.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →