json image prompting
Using JSON to structure AI image prompts can enhance clarity and control over the generated visuals. This method is particularly effective with models like GPT-4o, DALL·E, and Midjourney.(glenegrant.com, Medium)
🧠 Benefits of JSON-Structured Prompts
-
Precision: Clearly defines each element of the image.
-
Consistency: Maintains uniformity across multiple prompts.
-
Automation: Facilitates programmatic generation and manipulation of prompts.(DocsBot AI)
🧰 Common JSON Fields for Image Prompts
Field | Description | Example |
---|---|---|
scene |
Overall setting or environment | "a bustling futuristic city at night" |
subjects |
Key elements or characters in the image | [{"type": "robot", "description": "sleek design with neon lights"}] |
style |
Artistic style or genre | "cyberpunk" |
color_palette |
Dominant colors used in the image | ["neon blue", "electric purple", "black"] |
lighting |
Lighting conditions | "glowing neon signs and ambient streetlights" |
mood |
Emotional tone of the image | "energetic and mysterious" |
background |
Details about the background setting | "skyscrapers with animated billboards" |
composition |
Arrangement of elements within the frame | "rule of thirds" |
camera |
Camera angle and focus details | {"angle": "low", "focus": "sharp on subject"} |
medium |
Medium or technique used | "digital illustration" |
textures |
Surface qualities of elements | ["metallic", "glossy"] |
resolution |
Desired resolution or output size | "4K" |
details |
Additional specific attributes | {"weather": "light rain", "accessories": "holographic umbrella"} |
effects |
Special visual effects | ["motion blur", "lens flare"] |
inspirations |
References to artists or styles | ["inspired by Blade Runner aesthetics"] |
🎨 Example JSON Prompt
{
"scene": "a bustling futuristic city at night",
"subjects": [
{
"type": "robot",
"description": "sleek design with neon lights",
"pose": "walking through the crowd",
"position": "foreground"
}
],
"style": "cyberpunk",
"color_palette": ["neon blue", "electric purple", "black"],
"lighting": "glowing neon signs and ambient streetlights",
"mood": "energetic and mysterious",
"background": "skyscrapers with animated billboards",
"composition": "rule of thirds",
"camera": {
"angle": "low",
"focus": "sharp on subject"
},
"medium": "digital illustration",
"textures": ["metallic", "glossy"],
"resolution": "4K",
"details": {
"weather": "light rain",
"accessories": "holographic umbrella"
},
"effects": ["motion blur", "lens flare"],
"inspirations": ["inspired by Blade Runner aesthetics"]
}
🔗 Additional Resources
-
Prompt Gallery by Google Cloud: Explore various prompt examples for generative AI models. (Google Cloud)
-
DocsBot AI Prompt: Generate images or detailed descriptions based on JSON data. (DocsBot AI)(DocsBot AI)
-
Prompt Structuring with JSON: Learn how JSON structuring improves AI creative outputs. (glenegrant.com)(glenegrant.com)