复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "master_prompt": { "global_settings": { "resolution": "8K ultra high definition", "aspect_ratio": "3:4 vertical", "image_quality": "extreme sharpness, high dynamic range, professional studio lighting", "style": "AI-edited hyperreal food photography", "focus": "crisp textures, frozen motion, liquid dynamics, surface details", "background_quality": "clean, controlled, noise-free" }, "module_1": { "identity": "Image 1 – Ice Cream Cone with Purple Splash", "subject": { "main_object": "waffle cone ice cream", "cone": "light brown waffle cone with diamond grid texture, matte finish", "ice_cream_scoops": [ { "color": "off-white / vanilla", "texture": "creamy with visible scoop ridges" }, { "color": "off-white / vanilla", "texture": "slightly uneven surface, melting edges" } ], "toppings": [ "raspberries", "blackberries" ], "sauce": { "color": "glossy purple", "behavior": "thick liquid splashing outward and downward", "coverage": "dripping over scoops and cone" } }, "motion": { "action": "frozen splash moment", "details": "liquid droplets suspended mid-air, see-through splash edges" }, "background": { "color": "deep dark maroon / black", "style": "studio backdrop with subtle gradient" }, "lighting": { "type": "high-contrast studio lighting", "effects": "specular highlights on sauce and ice cream, shadow depth under cone" } }, "module_2": { "identity": "Image 2 – Chocolate Ice Cream Bar with Bite", "subject": { "main_object": "chocolate-coated ice cream bar on wooden stick", "coating": { "exploded_view": false, "surface": "milk chocolate coating with embedded nut pieces", "texture": "rough, uneven, crunchy appearance" }, "bite_detail": { "location": "top edge", "interior_layers": [ "chocolate ice cream", "thin darker chocolate layer" ], "edges": "jagged bite marks" }, "stick": { "material": "light wood", "finish": "smooth, rounded end" } }, "motion": { "elements": "small chocolate fragments floating in air", "behavior": "scattered outward from the bar" }, "background": { "color": "warm brown gradient", "style": "clean studio environment" }, "lighting": { "type": "directional studio lighting", "effects": "strong highlights on chocolate bumps, soft shadows" } }, "module_3": { "identity": "Image 3 –Purple Berry Popsicle with Fruits", "subject": { "main_object": "rectangular red popsicle", "surface": { "texture": "frosted, icy crystals visible", "shape": "rounded corners, vertical grooves" }, "stick": { "material": "light wooden stick", "visible": true }, "surroundings": [ "whole strawberries with green tops", "blueberries", "raspberries", "mint leaves", "crushed ice pieces" ] }, "color_palette": [ "bright red", "deep blue", "fresh green", "clear ice" ], "background": { "composition": "entire frame filled with fruits and ice", "style": "top-down macro food arrangement" }, "lighting": { "type": "even bright lighting", "effects": "wet shine on fruit skins, crystalline ice reflections" } },"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "master_prompt": { "global_settings": { "resolution": "8K ultra high definition", "aspect_ratio": "3:4 vertical", "image_quality": "extreme sharpness, high dynamic range, professional studio lighting", "style": "AI-edited hyperreal food photography", "focus": "crisp textures, frozen motion, liquid dynamics, surface details", "background_quality": "clean, controlled, noise-free" }, "module_1": { "identity": "Image 1 – Ice Cream Cone with Purple Splash", "subject": { "main_object": "waffle cone ice cream", "cone": "light brown waffle cone with diamond grid texture, matte finish", "ice_cream_scoops": [ { "color": "off-white / vanilla", "texture": "creamy with visible scoop ridges" }, { "color": "off-white / vanilla", "texture": "slightly uneven surface, melting edges" } ], "toppings": [ "raspberries", "blackberries" ], "sauce": { "color": "glossy purple", "behavior": "thick liquid splashing outward and downward", "coverage": "dripping over scoops and cone" } }, "motion": { "action": "frozen splash moment", "details": "liquid droplets suspended mid-air, see-through splash edges" }, "background": { "color": "deep dark maroon / black", "style": "studio backdrop with subtle gradient" }, "lighting": { "type": "high-contrast studio lighting", "effects": "specular highlights on sauce and ice cream, shadow depth under cone" } }, "module_2": { "identity": "Image 2 – Chocolate Ice Cream Bar with Bite", "subject": { "main_object": "chocolate-coated ice cream bar on wooden stick", "coating": { "exploded_view": false, "surface": "milk chocolate coating with embedded nut pieces", "texture": "rough, uneven, crunchy appearance" }, "bite_detail": { "location": "top edge", "interior_layers": [ "chocolate ice cream", "thin darker chocolate layer" ], "edges": "jagged bite marks" }, "stick": { "material": "light wood", "finish": "smooth, rounded end" } }, "motion": { "elements": "small chocolate fragments floating in air", "behavior": "scattered outward from the bar" }, "background": { "color": "warm brown gradient", "style": "clean studio environment" }, "lighting": { "type": "directional studio lighting", "effects": "strong highlights on chocolate bumps, soft shadows" } }, "module_3": { "identity": "Image 3 –Purple Berry Popsicle with Fruits", "subject": { "main_object": "rectangular red popsicle", "surface": { "texture": "frosted, icy crystals visible", "shape": "rounded corners, vertical grooves" }, "stick": { "material": "light wooden stick", "visible": true }, "surroundings": [ "whole strawberries with green tops", "blueberries", "raspberries", "mint leaves", "crushed ice pieces" ] }, "color_palette": [ "bright red", "deep blue", "fresh green", "clear ice" ], "background": { "composition": "entire frame filled with fruits and ice", "style": "top-down macro food arrangement" }, "lighting": { "type": "even bright lighting", "effects": "wet shine on fruit skins, crystalline ice reflections" } },"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "master_prompt": { "global_settings": { "resolution": "8K ultra high definition", "aspect_ratio": "3:4 vertical", "image_quality": "extreme sharpness, high dynamic range, professional studio lighting", "style": "AI-edited hyperreal food photography", "focus": "crisp textures, frozen motion, liquid dynamics, surface details", "background_quality": "clean, controlled, noise-free" }, "module_1": { "identity": "Image 1 – Ice Cream Cone with Purple Splash", "subject": { "main_object": "waffle cone ice cream", "cone": "light brown waffle cone with diamond grid texture, matte finish", "ice_cream_scoops": [ { "color": "off-white / vanilla", "texture": "creamy with visible scoop ridges" }, { "color": "off-white / vanilla", "texture": "slightly uneven surface, melting edges" } ], "toppings": [ "raspberries", "blackberries" ], "sauce": { "color": "glossy purple", "behavior": "thick liquid splashing outward and downward", "coverage": "dripping over scoops and cone" } }, "motion": { "action": "frozen splash moment", "details": "liquid droplets suspended mid-air, see-through splash edges" }, "background": { "color": "deep dark maroon / black", "style": "studio backdrop with subtle gradient" }, "lighting": { "type": "high-contrast studio lighting", "effects": "specular highlights on sauce and ice cream, shadow depth under cone" } }, "module_2": { "identity": "Image 2 – Chocolate Ice Cream Bar with Bite", "subject": { "main_object": "chocolate-coated ice cream bar on wooden stick", "coating": { "exploded_view": false, "surface": "milk chocolate coating with embedded nut pieces", "texture": "rough, uneven, crunchy appearance" }, "bite_detail": { "location": "top edge", "interior_layers": [ "chocolate ice cream", "thin darker chocolate layer" ], "edges": "jagged bite marks" }, "stick": { "material": "light wood", "finish": "smooth, rounded end" } }, "motion": { "elements": "small chocolate fragments floating in air", "behavior": "scattered outward from the bar" }, "background": { "color": "warm brown gradient", "style": "clean studio environment" }, "lighting": { "type": "directional studio lighting", "effects": "strong highlights on chocolate bumps, soft shadows" } }, "module_3": { "identity": "Image 3 –Purple Berry Popsicle with Fruits", "subject": { "main_object": "rectangular red popsicle", "surface": { "texture": "frosted, icy crystals visible", "shape": "rounded corners, vertical grooves" }, "stick": { "material": "light wooden stick", "visible": true }, "surroundings": [ "whole strawberries with green tops", "blueberries", "raspberries", "mint leaves", "crushed ice pieces" ] }, "color_palette": [ "bright red", "deep blue", "fresh green", "clear ice" ], "background": { "composition": "entire frame filled with fruits and ice", "style": "top-down macro food arrangement" }, "lighting": { "type": "even bright lighting", "effects": "wet shine on fruit skins, crystalline ice reflections" } },"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "master_prompt": { "global_settings": { "resolution": "8K ultra high definition", "aspect_ratio": "3:4 vertical", "image_quality": "extreme sharpness, high dynamic range, professional studio lighting", "style": "AI-edited hyperreal food photography", "focus": "crisp textures, frozen motion, liquid dynamics, surface details", "background_quality": "clean, controlled, noise-free" }, "module_1": { "identity": "Image 1 – Ice Cream Cone with Purple Splash", "subject": { "main_object": "waffle cone ice cream", "cone": "light brown waffle cone with diamond grid texture, matte finish", "ice_cream_scoops": [ { "color": "off-white / vanilla", "texture": "creamy with visible scoop ridges" }, { "color": "off-white / vanilla", "texture": "slightly uneven surface, melting edges" } ], "toppings": [ "raspberries", "blackberries" ], "sauce": { "color": "glossy purple", "behavior": "thick liquid splashing outward and downward", "coverage": "dripping over scoops and cone" } }, "motion": { "action": "frozen splash moment", "details": "liquid droplets suspended mid-air, see-through splash edges" }, "background": { "color": "deep dark maroon / black", "style": "studio backdrop with subtle gradient" }, "lighting": { "type": "high-contrast studio lighting", "effects": "specular highlights on sauce and ice cream, shadow depth under cone" } }, "module_2": { "identity": "Image 2 – Chocolate Ice Cream Bar with Bite", "subject": { "main_object": "chocolate-coated ice cream bar on wooden stick", "coating": { "exploded_view": false, "surface": "milk chocolate coating with embedded nut pieces", "texture": "rough, uneven, crunchy appearance" }, "bite_detail": { "location": "top edge", "interior_layers": [ "chocolate ice cream", "thin darker chocolate layer" ], "edges": "jagged bite marks" }, "stick": { "material": "light wood", "finish": "smooth, rounded end" } }, "motion": { "elements": "small chocolate fragments floating in air", "behavior": "scattered outward from the bar" }, "background": { "color": "warm brown gradient", "style": "clean studio environment" }, "lighting": { "type": "directional studio lighting", "effects": "strong highlights on chocolate bumps, soft shadows" } }, "module_3": { "identity": "Image 3 –Purple Berry Popsicle with Fruits", "subject": { "main_object": "rectangular red popsicle", "surface": { "texture": "frosted, icy crystals visible", "shape": "rounded corners, vertical grooves" }, "stick": { "material": "light wooden stick", "visible": true }, "surroundings": [ "whole strawberries with green tops", "blueberries", "raspberries", "mint leaves", "crushed ice pieces" ] }, "color_palette": [ "bright red", "deep blue", "fresh green", "clear ice" ], "background": { "composition": "entire frame filled with fruits and ice", "style": "top-down macro food arrangement" }, "lighting": { "type": "even bright lighting", "effects": "wet shine on fruit skins, crystalline ice reflections" } },"
curl
Node.js
Ruby
Go
复制
curl -X POST https://runapi.ai/api/v1/gpt_image_2/text_to_image \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "gpt-image-2",
"prompt": "{ \"master_prompt\": { \"global_settings\": { \"resolution\": \"8K ultra high definition\", \"aspect_ratio\": \"3:4 vertical\", \"image_quality\": \"extreme sharpness, high dynamic range, professional studio lighting\", \"style\": \"AI-edited hyperreal food photography\", \"focus\": \"crisp textures, frozen motion, liquid dynamics, surface details\", \"background_quality\": \"clean, controlled, noise-free\" }, \"module_1\": { \"identity\": \"Image 1 – Ice Cream Cone with Purple Splash\", \"subject\": { \"main_object\": \"waffle cone ice cream\", \"cone\": \"light brown waffle cone with diamond grid texture, matte finish\", \"ice_cream_scoops\": [ { \"color\": \"off-white / vanilla\", \"texture\": \"creamy with visible scoop ridges\" }, { \"color\": \"off-white / vanilla\", \"texture\": \"slightly uneven surface, melting edges\" } ], \"toppings\": [ \"raspberries\", \"blackberries\" ], \"sauce\": { \"color\": \"glossy purple\", \"behavior\": \"thick liquid splashing outward and downward\", \"coverage\": \"dripping over scoops and cone\" } }, \"motion\": { \"action\": \"frozen splash moment\", \"details\": \"liquid droplets suspended mid-air, see-through splash edges\" }, \"background\": { \"color\": \"deep dark maroon / black\", \"style\": \"studio backdrop with subtle gradient\" }, \"lighting\": { \"type\": \"high-contrast studio lighting\", \"effects\": \"specular highlights on sauce and ice cream, shadow depth under cone\" } }, \"module_2\": { \"identity\": \"Image 2 – Chocolate Ice Cream Bar with Bite\", \"subject\": { \"main_object\": \"chocolate-coated ice cream bar on wooden stick\", \"coating\": { \"exploded_view\": false, \"surface\": \"milk chocolate coating with embedded nut pieces\", \"texture\": \"rough, uneven, crunchy appearance\" }, \"bite_detail\": { \"location\": \"top edge\", \"interior_layers\": [ \"chocolate ice cream\", \"thin darker chocolate layer\" ], \"edges\": \"jagged bite marks\" }, \"stick\": { \"material\": \"light wood\", \"finish\": \"smooth, rounded end\" } }, \"motion\": { \"elements\": \"small chocolate fragments floating in air\", \"behavior\": \"scattered outward from the bar\" }, \"background\": { \"color\": \"warm brown gradient\", \"style\": \"clean studio environment\" }, \"lighting\": { \"type\": \"directional studio lighting\", \"effects\": \"strong highlights on chocolate bumps, soft shadows\" } }, \"module_3\": { \"identity\": \"Image 3 –Purple Berry Popsicle with Fruits\", \"subject\": { \"main_object\": \"rectangular red popsicle\", \"surface\": { \"texture\": \"frosted, icy crystals visible\", \"shape\": \"rounded corners, vertical grooves\" }, \"stick\": { \"material\": \"light wooden stick\", \"visible\": true }, \"surroundings\": [ \"whole strawberries with green tops\", \"blueberries\", \"raspberries\", \"mint leaves\", \"crushed ice pieces\" ] }, \"color_palette\": [ \"bright red\", \"deep blue\", \"fresh green\", \"clear ice\" ], \"background\": { \"composition\": \"entire frame filled with fruits and ice\", \"style\": \"top-down macro food arrangement\" }, \"lighting\": { \"type\": \"even bright lighting\", \"effects\": \"wet shine on fruit skins, crystalline ice reflections\" } },"
}
JSON
复制
import { GptImage2Client } from "@runapi.ai/gpt-image-2";
const client = new GptImage2Client({
apiKey: process.env.RUNAPI_API_KEY,
});
const result = await client.textToImage.run({
"model": "gpt-image-2",
"prompt": "{ \"master_prompt\": { \"global_settings\": { \"resolution\": \"8K ultra high definition\", \"aspect_ratio\": \"3:4 vertical\", \"image_quality\": \"extreme sharpness, high dynamic range, professional studio lighting\", \"style\": \"AI-edited hyperreal food photography\", \"focus\": \"crisp textures, frozen motion, liquid dynamics, surface details\", \"background_quality\": \"clean, controlled, noise-free\" }, \"module_1\": { \"identity\": \"Image 1 – Ice Cream Cone with Purple Splash\", \"subject\": { \"main_object\": \"waffle cone ice cream\", \"cone\": \"light brown waffle cone with diamond grid texture, matte finish\", \"ice_cream_scoops\": [ { \"color\": \"off-white / vanilla\", \"texture\": \"creamy with visible scoop ridges\" }, { \"color\": \"off-white / vanilla\", \"texture\": \"slightly uneven surface, melting edges\" } ], \"toppings\": [ \"raspberries\", \"blackberries\" ], \"sauce\": { \"color\": \"glossy purple\", \"behavior\": \"thick liquid splashing outward and downward\", \"coverage\": \"dripping over scoops and cone\" } }, \"motion\": { \"action\": \"frozen splash moment\", \"details\": \"liquid droplets suspended mid-air, see-through splash edges\" }, \"background\": { \"color\": \"deep dark maroon / black\", \"style\": \"studio backdrop with subtle gradient\" }, \"lighting\": { \"type\": \"high-contrast studio lighting\", \"effects\": \"specular highlights on sauce and ice cream, shadow depth under cone\" } }, \"module_2\": { \"identity\": \"Image 2 – Chocolate Ice Cream Bar with Bite\", \"subject\": { \"main_object\": \"chocolate-coated ice cream bar on wooden stick\", \"coating\": { \"exploded_view\": false, \"surface\": \"milk chocolate coating with embedded nut pieces\", \"texture\": \"rough, uneven, crunchy appearance\" }, \"bite_detail\": { \"location\": \"top edge\", \"interior_layers\": [ \"chocolate ice cream\", \"thin darker chocolate layer\" ], \"edges\": \"jagged bite marks\" }, \"stick\": { \"material\": \"light wood\", \"finish\": \"smooth, rounded end\" } }, \"motion\": { \"elements\": \"small chocolate fragments floating in air\", \"behavior\": \"scattered outward from the bar\" }, \"background\": { \"color\": \"warm brown gradient\", \"style\": \"clean studio environment\" }, \"lighting\": { \"type\": \"directional studio lighting\", \"effects\": \"strong highlights on chocolate bumps, soft shadows\" } }, \"module_3\": { \"identity\": \"Image 3 –Purple Berry Popsicle with Fruits\", \"subject\": { \"main_object\": \"rectangular red popsicle\", \"surface\": { \"texture\": \"frosted, icy crystals visible\", \"shape\": \"rounded corners, vertical grooves\" }, \"stick\": { \"material\": \"light wooden stick\", \"visible\": true }, \"surroundings\": [ \"whole strawberries with green tops\", \"blueberries\", \"raspberries\", \"mint leaves\", \"crushed ice pieces\" ] }, \"color_palette\": [ \"bright red\", \"deep blue\", \"fresh green\", \"clear ice\" ], \"background\": { \"composition\": \"entire frame filled with fruits and ice\", \"style\": \"top-down macro food arrangement\" }, \"lighting\": { \"type\": \"even bright lighting\", \"effects\": \"wet shine on fruit skins, crystalline ice reflections\" } },"
});
console.log(result.id);
复制
require "runapi/gpt_image_2"
client = RunApi::GptImage2::Client.new
result = client.text_to_image.run(
model: "gpt-image-2",
prompt: "{ \"master_prompt\": { \"global_settings\": { \"resolution\": \"8K ultra high definition\", \"aspect_ratio\": \"3:4 vertical\", \"image_quality\": \"extreme sharpness, high dynamic range, professional studio lighting\", \"style\": \"AI-edited hyperreal food photography\", \"focus\": \"crisp textures, frozen motion, liquid dynamics, surface details\", \"background_quality\": \"clean, controlled, noise-free\" }, \"module_1\": { \"identity\": \"Image 1 – Ice Cream Cone with Purple Splash\", \"subject\": { \"main_object\": \"waffle cone ice cream\", \"cone\": \"light brown waffle cone with diamond grid texture, matte finish\", \"ice_cream_scoops\": [ { \"color\": \"off-white / vanilla\", \"texture\": \"creamy with visible scoop ridges\" }, { \"color\": \"off-white / vanilla\", \"texture\": \"slightly uneven surface, melting edges\" } ], \"toppings\": [ \"raspberries\", \"blackberries\" ], \"sauce\": { \"color\": \"glossy purple\", \"behavior\": \"thick liquid splashing outward and downward\", \"coverage\": \"dripping over scoops and cone\" } }, \"motion\": { \"action\": \"frozen splash moment\", \"details\": \"liquid droplets suspended mid-air, see-through splash edges\" }, \"background\": { \"color\": \"deep dark maroon / black\", \"style\": \"studio backdrop with subtle gradient\" }, \"lighting\": { \"type\": \"high-contrast studio lighting\", \"effects\": \"specular highlights on sauce and ice cream, shadow depth under cone\" } }, \"module_2\": { \"identity\": \"Image 2 – Chocolate Ice Cream Bar with Bite\", \"subject\": { \"main_object\": \"chocolate-coated ice cream bar on wooden stick\", \"coating\": { \"exploded_view\": false, \"surface\": \"milk chocolate coating with embedded nut pieces\", \"texture\": \"rough, uneven, crunchy appearance\" }, \"bite_detail\": { \"location\": \"top edge\", \"interior_layers\": [ \"chocolate ice cream\", \"thin darker chocolate layer\" ], \"edges\": \"jagged bite marks\" }, \"stick\": { \"material\": \"light wood\", \"finish\": \"smooth, rounded end\" } }, \"motion\": { \"elements\": \"small chocolate fragments floating in air\", \"behavior\": \"scattered outward from the bar\" }, \"background\": { \"color\": \"warm brown gradient\", \"style\": \"clean studio environment\" }, \"lighting\": { \"type\": \"directional studio lighting\", \"effects\": \"strong highlights on chocolate bumps, soft shadows\" } }, \"module_3\": { \"identity\": \"Image 3 –Purple Berry Popsicle with Fruits\", \"subject\": { \"main_object\": \"rectangular red popsicle\", \"surface\": { \"texture\": \"frosted, icy crystals visible\", \"shape\": \"rounded corners, vertical grooves\" }, \"stick\": { \"material\": \"light wooden stick\", \"visible\": true }, \"surroundings\": [ \"whole strawberries with green tops\", \"blueberries\", \"raspberries\", \"mint leaves\", \"crushed ice pieces\" ] }, \"color_palette\": [ \"bright red\", \"deep blue\", \"fresh green\", \"clear ice\" ], \"background\": { \"composition\": \"entire frame filled with fruits and ice\", \"style\": \"top-down macro food arrangement\" }, \"lighting\": { \"type\": \"even bright lighting\", \"effects\": \"wet shine on fruit skins, crystalline ice reflections\" } },"
)
puts result.id
复制
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"gpt-image-2\",\"prompt\":\"{ \\\"master_prompt\\\": { \\\"global_settings\\\": { \\\"resolution\\\": \\\"8K ultra high definition\\\", \\\"aspect_ratio\\\": \\\"3:4 vertical\\\", \\\"image_quality\\\": \\\"extreme sharpness, high dynamic range, professional studio lighting\\\", \\\"style\\\": \\\"AI-edited hyperreal food photography\\\", \\\"focus\\\": \\\"crisp textures, frozen motion, liquid dynamics, surface details\\\", \\\"background_quality\\\": \\\"clean, controlled, noise-free\\\" }, \\\"module_1\\\": { \\\"identity\\\": \\\"Image 1 – Ice Cream Cone with Purple Splash\\\", \\\"subject\\\": { \\\"main_object\\\": \\\"waffle cone ice cream\\\", \\\"cone\\\": \\\"light brown waffle cone with diamond grid texture, matte finish\\\", \\\"ice_cream_scoops\\\": [ { \\\"color\\\": \\\"off-white / vanilla\\\", \\\"texture\\\": \\\"creamy with visible scoop ridges\\\" }, { \\\"color\\\": \\\"off-white / vanilla\\\", \\\"texture\\\": \\\"slightly uneven surface, melting edges\\\" } ], \\\"toppings\\\": [ \\\"raspberries\\\", \\\"blackberries\\\" ], \\\"sauce\\\": { \\\"color\\\": \\\"glossy purple\\\", \\\"behavior\\\": \\\"thick liquid splashing outward and downward\\\", \\\"coverage\\\": \\\"dripping over scoops and cone\\\" } }, \\\"motion\\\": { \\\"action\\\": \\\"frozen splash moment\\\", \\\"details\\\": \\\"liquid droplets suspended mid-air, see-through splash edges\\\" }, \\\"background\\\": { \\\"color\\\": \\\"deep dark maroon / black\\\", \\\"style\\\": \\\"studio backdrop with subtle gradient\\\" }, \\\"lighting\\\": { \\\"type\\\": \\\"high-contrast studio lighting\\\", \\\"effects\\\": \\\"specular highlights on sauce and ice cream, shadow depth under cone\\\" } }, \\\"module_2\\\": { \\\"identity\\\": \\\"Image 2 – Chocolate Ice Cream Bar with Bite\\\", \\\"subject\\\": { \\\"main_object\\\": \\\"chocolate-coated ice cream bar on wooden stick\\\", \\\"coating\\\": { \\\"exploded_view\\\": false, \\\"surface\\\": \\\"milk chocolate coating with embedded nut pieces\\\", \\\"texture\\\": \\\"rough, uneven, crunchy appearance\\\" }, \\\"bite_detail\\\": { \\\"location\\\": \\\"top edge\\\", \\\"interior_layers\\\": [ \\\"chocolate ice cream\\\", \\\"thin darker chocolate layer\\\" ], \\\"edges\\\": \\\"jagged bite marks\\\" }, \\\"stick\\\": { \\\"material\\\": \\\"light wood\\\", \\\"finish\\\": \\\"smooth, rounded end\\\" } }, \\\"motion\\\": { \\\"elements\\\": \\\"small chocolate fragments floating in air\\\", \\\"behavior\\\": \\\"scattered outward from the bar\\\" }, \\\"background\\\": { \\\"color\\\": \\\"warm brown gradient\\\", \\\"style\\\": \\\"clean studio environment\\\" }, \\\"lighting\\\": { \\\"type\\\": \\\"directional studio lighting\\\", \\\"effects\\\": \\\"strong highlights on chocolate bumps, soft shadows\\\" } }, \\\"module_3\\\": { \\\"identity\\\": \\\"Image 3 –Purple Berry Popsicle with Fruits\\\", \\\"subject\\\": { \\\"main_object\\\": \\\"rectangular red popsicle\\\", \\\"surface\\\": { \\\"texture\\\": \\\"frosted, icy crystals visible\\\", \\\"shape\\\": \\\"rounded corners, vertical grooves\\\" }, \\\"stick\\\": { \\\"material\\\": \\\"light wooden stick\\\", \\\"visible\\\": true }, \\\"surroundings\\\": [ \\\"whole strawberries with green tops\\\", \\\"blueberries\\\", \\\"raspberries\\\", \\\"mint leaves\\\", \\\"crushed ice pieces\\\" ] }, \\\"color_palette\\\": [ \\\"bright red\\\", \\\"deep blue\\\", \\\"fresh green\\\", \\\"clear ice\\\" ], \\\"background\\\": { \\\"composition\\\": \\\"entire frame filled with fruits and ice\\\", \\\"style\\\": \\\"top-down macro food arrangement\\\" }, \\\"lighting\\\": { \\\"type\\\": \\\"even bright lighting\\\", \\\"effects\\\": \\\"wet shine on fruit skins, crystalline ice reflections\\\" } },\"}")
req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, "https://runapi.ai/api/v1/gpt_image_2/text_to_image", body)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("RUNAPI_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
fmt.Println(resp.Status)
}