GPT Image 2 JSON Prompts: The Prompt-as-Code Guide Inspired by Top GitHub Repos

Learn how top GitHub repos use JSON and Prompt-as-Code templates for GPT Image 2 to lock lighting, typography, and layout. Copy 5 templates and run on ClipLumi.

GPT Image 2 JSON Prompts: Prompt-as-Code Guide (2026)

Top GitHub libraries like freestylefly/awesome-gpt-image-2 (36k+ stars) and youart-open-source (25 JSON cases) use JSON prompts to lock lighting, layout, and exact text across campaigns.

No code required — paste any JSON block below directly into ClipLumi GPT Image 2.

Why Use JSON Prompts?

JSON Key Controls Example
scene_type Format & medium "ecommerce_packshot", "swiss_poster"
subject Object, material & surface "matte black travel mug on dark limestone"
typography Exact quoted copy & placement [{"text": "NORTHBOUND", "location": "lower cylinder"}]
camera Lens, aperture & ratio "85mm, f/5.6, 4:5"
lighting Light direction & white balance "overhead softbox, neutral 5600K, zero yellow tint"
constraints Hard guardrails ["no watermarks", "no extra text"]

5 Ready-to-Use JSON Prompt Templates

1. E-Commerce Product Packshot

{
  "scene_type": "luxury_ecommerce_product_photo",
  "subject": {
    "item": "matte black stainless insulated travel mug with brushed brass rim",
    "surface": "honed dark limestone slab",
    "props": ["two whole roasted coffee beans near base right"]
  },
  "typography": [
    { "text": "NORTHBOUND", "location": "laser-etched along lower cylinder", "style": "clean geometric sans-serif" }
  ],
  "camera": { "lens": "85mm", "aperture": "f/5.6", "aspect_ratio": "4:5" },
  "lighting": { "setup": "overhead softbox + right rim light", "color_balance": "neutral white, zero warm tint" },
  "constraints": ["no watermarks", "clean background", "sharp edge highlights"]
}

2. Swiss Typographic Event Poster

{
  "scene_type": "editorial_poster",
  "style": "Swiss International Typographic Style, matte print grain",
  "palette": ["#102542 cobalt", "#F6F1E7 cream paper", "#E63946 vermilion"],
  "typography": [
    { "text": "KYOTO TYPE", "location": "top-left headline", "style": "bold uppercase sans" },
    { "text": "BIENNALE 2026", "location": "below headline", "style": "medium weight, wide tracking" },
    { "text": "NOV 14–22 · MUSEUM OF DESIGN", "location": "bottom-left footer", "style": "small monospace caps" }
  ],
  "visual_motif": "translucent geometric circles with sharp diagonal shadow",
  "aspect_ratio": "2:3",
  "constraints": ["exact spelling", "no filler subtext", "flat frontal view"]
}

3. Editorial Street Portrait

{
  "scene_type": "candid_editorial_portrait",
  "subject": "30-year-old East Asian architect in charcoal wool overcoat and wire-rim glasses outside a concrete gallery at dusk",
  "camera": { "lens": "50mm f/1.8", "look": "medium format digital, authentic skin pores, neutral skin tones", "aspect_ratio": "2:3" },
  "lighting": "cool twilight ambient sky with warm gallery spill from behind",
  "constraints": ["no plastic skin", "no orange tint", "natural hands"]
}

4. Paid Social Ad Creative (Meta / TikTok)

{
  "scene_type": "social_ad_creative",
  "layout": "product hero in lower two-thirds, clean negative space across top third",
  "subject": "vitamin C glass serum bottle on sliced blood orange over white tiles with water droplets",
  "typography": [
    { "text": "BRIGHTER SKIN IN 7 DAYS", "location": "top-center safe zone", "style": "bold charcoal sans" },
    { "text": "20% PURE VITAMIN C", "location": "pill badge below headline", "style": "crisp uppercase" }
  ],
  "lighting": "bright morning sunlight with crisp glass caustics",
  "aspect_ratio": "4:5",
  "constraints": ["no distorted letters", "clean ad margins", "no fake UI buttons"]
}

5. Dark-Mode SaaS UI Mockup

{
  "scene_type": "product_ui_showcase",
  "subject": "matte black laptop at 3/4 angle on walnut desk displaying a dark-mode revenue dashboard",
  "screen_typography": [
    { "text": "Monthly Recurring Revenue", "location": "top-left KPI card" },
    { "text": "$148,920", "location": "large bold KPI metric" },
    { "text": "+24.8%", "location": "emerald trend badge" }
  ],
  "lighting": "warm desk lamp from left, zero harsh glare",
  "camera": "50mm, f/2.8, 16:9 widescreen",
  "constraints": ["readable numbers", "no warped charts"]
}

👉 Paste any JSON template into ClipLumi GPT Image 2 →

3 Rules for Reliable JSON Output

  1. Replace every placeholder before generating — literal strings render as-is.
  2. Stay under ~200 words — lock only subject, typography, camera, lighting, and constraints.
  3. Iterate fast, render high — test layout first, then switch to high quality for final posters or UI.

More guides: Best GitHub Prompt Repos · Sprite Sheets & Infographics · API Guide

Run Any JSON Prompt on ClipLumi in Seconds

Copy any JSON template above and paste it straight into ClipLumi to render with GPT Image 2.