复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K UHD", "quality": "ultra-high", "render_style": "AI-edited hyper-realistic food photography", "sharpness": "extreme micro-detail", "noise": "none", "compression": "lossless", "lighting_quality": "studio-controlled, cinematic", "color_accuracy": "true-to-image", "focus": "selective shallow depth of field", "texture_emphasis": "maximum" }, "camera_profile": { "camera_type": "full-frame DSLR / mirrorless equivalent", "lens": "macro prime", "focal_length": "85mm–105mm", "aperture": "f/2.8", "iso": "low ISO", "shutter": "studio synchronized", "white_balance": "neutral, image-matched" }, "module_1_image_1_style": { "subject": "square matcha cheesecake slice", "composition": { "orientation": "portrait", "angle": "three-quarter front view", "placement": "centered on dark ceramic plate", "crop": "tight food-focused crop" }, "layers": { "top_layer": "glossy matcha glaze with visible drip trails", "middle_layer": "smooth pale-green cheesecake body", "bottom_layer": "thin golden biscuit crust" }, "surface_details": { "glaze": "highly reflective, thick, slow-dripping matcha glaze", "powder": "matcha powder dusted on top and plate", "crumbs": "fine crumbs near base" }, "garnish": { "top": ["round green confection", "fresh mint leaves", "single raspberry"], "plate": ["extra raspberry", "mint leaves", "matcha powder"] }, "background": { "color": "dark charcoal / black", "elements": ["black bowl containing green sauce"], "blur": "strong background blur" }, "lighting": { "key_light": "soft directional from upper left", "highlights": "strong specular highlights on glaze", "shadows": "soft, natural falloff" }, "mood": "luxurious, modern, minimal, gourmet" }, "module_2_image_2_style": { "subject": "blue and white layered cake slice", "composition": { "orientation": "portrait", "angle": "slightly elevated front angle", "placement": "centered on white decorative plate" }, "layers": { "cake_layers": "soft white sponge layers", "filling_layers": "translucent blue jelly layers with sparkle", "top_layer": "smooth pastel blue glaze" }, "surface_details": { "drip": "single vertical glossy blue drip down front", "sparkle": "tiny reflective particles embedded in jelly", "top_decor": "glass-like blue spheres" }, "garnish": { "top": ["dark glossy cherry with long stem", "three transparent blue spheres", "tiny star-shaped sprinkles"], "plate": ["subtle sugar-like sparkles"] }, "background": { "color": "light icy blue", "effect": "soft bokeh dots", "props": ["white ribbon partially visible"] }, "lighting": { "key_light": "soft frontal light", "fill": "even illumination", "highlights": "glass reflections on spheres" }, "mood": "dreamy, delicate, whimsical, clean" },"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K UHD", "quality": "ultra-high", "render_style": "AI-edited hyper-realistic food photography", "sharpness": "extreme micro-detail", "noise": "none", "compression": "lossless", "lighting_quality": "studio-controlled, cinematic", "color_accuracy": "true-to-image", "focus": "selective shallow depth of field", "texture_emphasis": "maximum" }, "camera_profile": { "camera_type": "full-frame DSLR / mirrorless equivalent", "lens": "macro prime", "focal_length": "85mm–105mm", "aperture": "f/2.8", "iso": "low ISO", "shutter": "studio synchronized", "white_balance": "neutral, image-matched" }, "module_1_image_1_style": { "subject": "square matcha cheesecake slice", "composition": { "orientation": "portrait", "angle": "three-quarter front view", "placement": "centered on dark ceramic plate", "crop": "tight food-focused crop" }, "layers": { "top_layer": "glossy matcha glaze with visible drip trails", "middle_layer": "smooth pale-green cheesecake body", "bottom_layer": "thin golden biscuit crust" }, "surface_details": { "glaze": "highly reflective, thick, slow-dripping matcha glaze", "powder": "matcha powder dusted on top and plate", "crumbs": "fine crumbs near base" }, "garnish": { "top": ["round green confection", "fresh mint leaves", "single raspberry"], "plate": ["extra raspberry", "mint leaves", "matcha powder"] }, "background": { "color": "dark charcoal / black", "elements": ["black bowl containing green sauce"], "blur": "strong background blur" }, "lighting": { "key_light": "soft directional from upper left", "highlights": "strong specular highlights on glaze", "shadows": "soft, natural falloff" }, "mood": "luxurious, modern, minimal, gourmet" }, "module_2_image_2_style": { "subject": "blue and white layered cake slice", "composition": { "orientation": "portrait", "angle": "slightly elevated front angle", "placement": "centered on white decorative plate" }, "layers": { "cake_layers": "soft white sponge layers", "filling_layers": "translucent blue jelly layers with sparkle", "top_layer": "smooth pastel blue glaze" }, "surface_details": { "drip": "single vertical glossy blue drip down front", "sparkle": "tiny reflective particles embedded in jelly", "top_decor": "glass-like blue spheres" }, "garnish": { "top": ["dark glossy cherry with long stem", "three transparent blue spheres", "tiny star-shaped sprinkles"], "plate": ["subtle sugar-like sparkles"] }, "background": { "color": "light icy blue", "effect": "soft bokeh dots", "props": ["white ribbon partially visible"] }, "lighting": { "key_light": "soft frontal light", "fill": "even illumination", "highlights": "glass reflections on spheres" }, "mood": "dreamy, delicate, whimsical, clean" },"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K UHD", "quality": "ultra-high", "render_style": "AI-edited hyper-realistic food photography", "sharpness": "extreme micro-detail", "noise": "none", "compression": "lossless", "lighting_quality": "studio-controlled, cinematic", "color_accuracy": "true-to-image", "focus": "selective shallow depth of field", "texture_emphasis": "maximum" }, "camera_profile": { "camera_type": "full-frame DSLR / mirrorless equivalent", "lens": "macro prime", "focal_length": "85mm–105mm", "aperture": "f/2.8", "iso": "low ISO", "shutter": "studio synchronized", "white_balance": "neutral, image-matched" }, "module_1_image_1_style": { "subject": "square matcha cheesecake slice", "composition": { "orientation": "portrait", "angle": "three-quarter front view", "placement": "centered on dark ceramic plate", "crop": "tight food-focused crop" }, "layers": { "top_layer": "glossy matcha glaze with visible drip trails", "middle_layer": "smooth pale-green cheesecake body", "bottom_layer": "thin golden biscuit crust" }, "surface_details": { "glaze": "highly reflective, thick, slow-dripping matcha glaze", "powder": "matcha powder dusted on top and plate", "crumbs": "fine crumbs near base" }, "garnish": { "top": ["round green confection", "fresh mint leaves", "single raspberry"], "plate": ["extra raspberry", "mint leaves", "matcha powder"] }, "background": { "color": "dark charcoal / black", "elements": ["black bowl containing green sauce"], "blur": "strong background blur" }, "lighting": { "key_light": "soft directional from upper left", "highlights": "strong specular highlights on glaze", "shadows": "soft, natural falloff" }, "mood": "luxurious, modern, minimal, gourmet" }, "module_2_image_2_style": { "subject": "blue and white layered cake slice", "composition": { "orientation": "portrait", "angle": "slightly elevated front angle", "placement": "centered on white decorative plate" }, "layers": { "cake_layers": "soft white sponge layers", "filling_layers": "translucent blue jelly layers with sparkle", "top_layer": "smooth pastel blue glaze" }, "surface_details": { "drip": "single vertical glossy blue drip down front", "sparkle": "tiny reflective particles embedded in jelly", "top_decor": "glass-like blue spheres" }, "garnish": { "top": ["dark glossy cherry with long stem", "three transparent blue spheres", "tiny star-shaped sprinkles"], "plate": ["subtle sugar-like sparkles"] }, "background": { "color": "light icy blue", "effect": "soft bokeh dots", "props": ["white ribbon partially visible"] }, "lighting": { "key_light": "soft frontal light", "fill": "even illumination", "highlights": "glass reflections on spheres" }, "mood": "dreamy, delicate, whimsical, clean" },"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K UHD", "quality": "ultra-high", "render_style": "AI-edited hyper-realistic food photography", "sharpness": "extreme micro-detail", "noise": "none", "compression": "lossless", "lighting_quality": "studio-controlled, cinematic", "color_accuracy": "true-to-image", "focus": "selective shallow depth of field", "texture_emphasis": "maximum" }, "camera_profile": { "camera_type": "full-frame DSLR / mirrorless equivalent", "lens": "macro prime", "focal_length": "85mm–105mm", "aperture": "f/2.8", "iso": "low ISO", "shutter": "studio synchronized", "white_balance": "neutral, image-matched" }, "module_1_image_1_style": { "subject": "square matcha cheesecake slice", "composition": { "orientation": "portrait", "angle": "three-quarter front view", "placement": "centered on dark ceramic plate", "crop": "tight food-focused crop" }, "layers": { "top_layer": "glossy matcha glaze with visible drip trails", "middle_layer": "smooth pale-green cheesecake body", "bottom_layer": "thin golden biscuit crust" }, "surface_details": { "glaze": "highly reflective, thick, slow-dripping matcha glaze", "powder": "matcha powder dusted on top and plate", "crumbs": "fine crumbs near base" }, "garnish": { "top": ["round green confection", "fresh mint leaves", "single raspberry"], "plate": ["extra raspberry", "mint leaves", "matcha powder"] }, "background": { "color": "dark charcoal / black", "elements": ["black bowl containing green sauce"], "blur": "strong background blur" }, "lighting": { "key_light": "soft directional from upper left", "highlights": "strong specular highlights on glaze", "shadows": "soft, natural falloff" }, "mood": "luxurious, modern, minimal, gourmet" }, "module_2_image_2_style": { "subject": "blue and white layered cake slice", "composition": { "orientation": "portrait", "angle": "slightly elevated front angle", "placement": "centered on white decorative plate" }, "layers": { "cake_layers": "soft white sponge layers", "filling_layers": "translucent blue jelly layers with sparkle", "top_layer": "smooth pastel blue glaze" }, "surface_details": { "drip": "single vertical glossy blue drip down front", "sparkle": "tiny reflective particles embedded in jelly", "top_decor": "glass-like blue spheres" }, "garnish": { "top": ["dark glossy cherry with long stem", "three transparent blue spheres", "tiny star-shaped sprinkles"], "plate": ["subtle sugar-like sparkles"] }, "background": { "color": "light icy blue", "effect": "soft bokeh dots", "props": ["white ribbon partially visible"] }, "lighting": { "key_light": "soft frontal light", "fill": "even illumination", "highlights": "glass reflections on spheres" }, "mood": "dreamy, delicate, whimsical, clean" },"
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": "{ \"global_settings\": { \"resolution\": \"8K UHD\", \"quality\": \"ultra-high\", \"render_style\": \"AI-edited hyper-realistic food photography\", \"sharpness\": \"extreme micro-detail\", \"noise\": \"none\", \"compression\": \"lossless\", \"lighting_quality\": \"studio-controlled, cinematic\", \"color_accuracy\": \"true-to-image\", \"focus\": \"selective shallow depth of field\", \"texture_emphasis\": \"maximum\" }, \"camera_profile\": { \"camera_type\": \"full-frame DSLR / mirrorless equivalent\", \"lens\": \"macro prime\", \"focal_length\": \"85mm–105mm\", \"aperture\": \"f/2.8\", \"iso\": \"low ISO\", \"shutter\": \"studio synchronized\", \"white_balance\": \"neutral, image-matched\" }, \"module_1_image_1_style\": { \"subject\": \"square matcha cheesecake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"three-quarter front view\", \"placement\": \"centered on dark ceramic plate\", \"crop\": \"tight food-focused crop\" }, \"layers\": { \"top_layer\": \"glossy matcha glaze with visible drip trails\", \"middle_layer\": \"smooth pale-green cheesecake body\", \"bottom_layer\": \"thin golden biscuit crust\" }, \"surface_details\": { \"glaze\": \"highly reflective, thick, slow-dripping matcha glaze\", \"powder\": \"matcha powder dusted on top and plate\", \"crumbs\": \"fine crumbs near base\" }, \"garnish\": { \"top\": [\"round green confection\", \"fresh mint leaves\", \"single raspberry\"], \"plate\": [\"extra raspberry\", \"mint leaves\", \"matcha powder\"] }, \"background\": { \"color\": \"dark charcoal / black\", \"elements\": [\"black bowl containing green sauce\"], \"blur\": \"strong background blur\" }, \"lighting\": { \"key_light\": \"soft directional from upper left\", \"highlights\": \"strong specular highlights on glaze\", \"shadows\": \"soft, natural falloff\" }, \"mood\": \"luxurious, modern, minimal, gourmet\" }, \"module_2_image_2_style\": { \"subject\": \"blue and white layered cake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"slightly elevated front angle\", \"placement\": \"centered on white decorative plate\" }, \"layers\": { \"cake_layers\": \"soft white sponge layers\", \"filling_layers\": \"translucent blue jelly layers with sparkle\", \"top_layer\": \"smooth pastel blue glaze\" }, \"surface_details\": { \"drip\": \"single vertical glossy blue drip down front\", \"sparkle\": \"tiny reflective particles embedded in jelly\", \"top_decor\": \"glass-like blue spheres\" }, \"garnish\": { \"top\": [\"dark glossy cherry with long stem\", \"three transparent blue spheres\", \"tiny star-shaped sprinkles\"], \"plate\": [\"subtle sugar-like sparkles\"] }, \"background\": { \"color\": \"light icy blue\", \"effect\": \"soft bokeh dots\", \"props\": [\"white ribbon partially visible\"] }, \"lighting\": { \"key_light\": \"soft frontal light\", \"fill\": \"even illumination\", \"highlights\": \"glass reflections on spheres\" }, \"mood\": \"dreamy, delicate, whimsical, clean\" },"
}
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": "{ \"global_settings\": { \"resolution\": \"8K UHD\", \"quality\": \"ultra-high\", \"render_style\": \"AI-edited hyper-realistic food photography\", \"sharpness\": \"extreme micro-detail\", \"noise\": \"none\", \"compression\": \"lossless\", \"lighting_quality\": \"studio-controlled, cinematic\", \"color_accuracy\": \"true-to-image\", \"focus\": \"selective shallow depth of field\", \"texture_emphasis\": \"maximum\" }, \"camera_profile\": { \"camera_type\": \"full-frame DSLR / mirrorless equivalent\", \"lens\": \"macro prime\", \"focal_length\": \"85mm–105mm\", \"aperture\": \"f/2.8\", \"iso\": \"low ISO\", \"shutter\": \"studio synchronized\", \"white_balance\": \"neutral, image-matched\" }, \"module_1_image_1_style\": { \"subject\": \"square matcha cheesecake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"three-quarter front view\", \"placement\": \"centered on dark ceramic plate\", \"crop\": \"tight food-focused crop\" }, \"layers\": { \"top_layer\": \"glossy matcha glaze with visible drip trails\", \"middle_layer\": \"smooth pale-green cheesecake body\", \"bottom_layer\": \"thin golden biscuit crust\" }, \"surface_details\": { \"glaze\": \"highly reflective, thick, slow-dripping matcha glaze\", \"powder\": \"matcha powder dusted on top and plate\", \"crumbs\": \"fine crumbs near base\" }, \"garnish\": { \"top\": [\"round green confection\", \"fresh mint leaves\", \"single raspberry\"], \"plate\": [\"extra raspberry\", \"mint leaves\", \"matcha powder\"] }, \"background\": { \"color\": \"dark charcoal / black\", \"elements\": [\"black bowl containing green sauce\"], \"blur\": \"strong background blur\" }, \"lighting\": { \"key_light\": \"soft directional from upper left\", \"highlights\": \"strong specular highlights on glaze\", \"shadows\": \"soft, natural falloff\" }, \"mood\": \"luxurious, modern, minimal, gourmet\" }, \"module_2_image_2_style\": { \"subject\": \"blue and white layered cake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"slightly elevated front angle\", \"placement\": \"centered on white decorative plate\" }, \"layers\": { \"cake_layers\": \"soft white sponge layers\", \"filling_layers\": \"translucent blue jelly layers with sparkle\", \"top_layer\": \"smooth pastel blue glaze\" }, \"surface_details\": { \"drip\": \"single vertical glossy blue drip down front\", \"sparkle\": \"tiny reflective particles embedded in jelly\", \"top_decor\": \"glass-like blue spheres\" }, \"garnish\": { \"top\": [\"dark glossy cherry with long stem\", \"three transparent blue spheres\", \"tiny star-shaped sprinkles\"], \"plate\": [\"subtle sugar-like sparkles\"] }, \"background\": { \"color\": \"light icy blue\", \"effect\": \"soft bokeh dots\", \"props\": [\"white ribbon partially visible\"] }, \"lighting\": { \"key_light\": \"soft frontal light\", \"fill\": \"even illumination\", \"highlights\": \"glass reflections on spheres\" }, \"mood\": \"dreamy, delicate, whimsical, clean\" },"
});
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: "{ \"global_settings\": { \"resolution\": \"8K UHD\", \"quality\": \"ultra-high\", \"render_style\": \"AI-edited hyper-realistic food photography\", \"sharpness\": \"extreme micro-detail\", \"noise\": \"none\", \"compression\": \"lossless\", \"lighting_quality\": \"studio-controlled, cinematic\", \"color_accuracy\": \"true-to-image\", \"focus\": \"selective shallow depth of field\", \"texture_emphasis\": \"maximum\" }, \"camera_profile\": { \"camera_type\": \"full-frame DSLR / mirrorless equivalent\", \"lens\": \"macro prime\", \"focal_length\": \"85mm–105mm\", \"aperture\": \"f/2.8\", \"iso\": \"low ISO\", \"shutter\": \"studio synchronized\", \"white_balance\": \"neutral, image-matched\" }, \"module_1_image_1_style\": { \"subject\": \"square matcha cheesecake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"three-quarter front view\", \"placement\": \"centered on dark ceramic plate\", \"crop\": \"tight food-focused crop\" }, \"layers\": { \"top_layer\": \"glossy matcha glaze with visible drip trails\", \"middle_layer\": \"smooth pale-green cheesecake body\", \"bottom_layer\": \"thin golden biscuit crust\" }, \"surface_details\": { \"glaze\": \"highly reflective, thick, slow-dripping matcha glaze\", \"powder\": \"matcha powder dusted on top and plate\", \"crumbs\": \"fine crumbs near base\" }, \"garnish\": { \"top\": [\"round green confection\", \"fresh mint leaves\", \"single raspberry\"], \"plate\": [\"extra raspberry\", \"mint leaves\", \"matcha powder\"] }, \"background\": { \"color\": \"dark charcoal / black\", \"elements\": [\"black bowl containing green sauce\"], \"blur\": \"strong background blur\" }, \"lighting\": { \"key_light\": \"soft directional from upper left\", \"highlights\": \"strong specular highlights on glaze\", \"shadows\": \"soft, natural falloff\" }, \"mood\": \"luxurious, modern, minimal, gourmet\" }, \"module_2_image_2_style\": { \"subject\": \"blue and white layered cake slice\", \"composition\": { \"orientation\": \"portrait\", \"angle\": \"slightly elevated front angle\", \"placement\": \"centered on white decorative plate\" }, \"layers\": { \"cake_layers\": \"soft white sponge layers\", \"filling_layers\": \"translucent blue jelly layers with sparkle\", \"top_layer\": \"smooth pastel blue glaze\" }, \"surface_details\": { \"drip\": \"single vertical glossy blue drip down front\", \"sparkle\": \"tiny reflective particles embedded in jelly\", \"top_decor\": \"glass-like blue spheres\" }, \"garnish\": { \"top\": [\"dark glossy cherry with long stem\", \"three transparent blue spheres\", \"tiny star-shaped sprinkles\"], \"plate\": [\"subtle sugar-like sparkles\"] }, \"background\": { \"color\": \"light icy blue\", \"effect\": \"soft bokeh dots\", \"props\": [\"white ribbon partially visible\"] }, \"lighting\": { \"key_light\": \"soft frontal light\", \"fill\": \"even illumination\", \"highlights\": \"glass reflections on spheres\" }, \"mood\": \"dreamy, delicate, whimsical, clean\" },"
)
puts result.id
复制
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"gpt-image-2\",\"prompt\":\"{ \\\"global_settings\\\": { \\\"resolution\\\": \\\"8K UHD\\\", \\\"quality\\\": \\\"ultra-high\\\", \\\"render_style\\\": \\\"AI-edited hyper-realistic food photography\\\", \\\"sharpness\\\": \\\"extreme micro-detail\\\", \\\"noise\\\": \\\"none\\\", \\\"compression\\\": \\\"lossless\\\", \\\"lighting_quality\\\": \\\"studio-controlled, cinematic\\\", \\\"color_accuracy\\\": \\\"true-to-image\\\", \\\"focus\\\": \\\"selective shallow depth of field\\\", \\\"texture_emphasis\\\": \\\"maximum\\\" }, \\\"camera_profile\\\": { \\\"camera_type\\\": \\\"full-frame DSLR / mirrorless equivalent\\\", \\\"lens\\\": \\\"macro prime\\\", \\\"focal_length\\\": \\\"85mm–105mm\\\", \\\"aperture\\\": \\\"f/2.8\\\", \\\"iso\\\": \\\"low ISO\\\", \\\"shutter\\\": \\\"studio synchronized\\\", \\\"white_balance\\\": \\\"neutral, image-matched\\\" }, \\\"module_1_image_1_style\\\": { \\\"subject\\\": \\\"square matcha cheesecake slice\\\", \\\"composition\\\": { \\\"orientation\\\": \\\"portrait\\\", \\\"angle\\\": \\\"three-quarter front view\\\", \\\"placement\\\": \\\"centered on dark ceramic plate\\\", \\\"crop\\\": \\\"tight food-focused crop\\\" }, \\\"layers\\\": { \\\"top_layer\\\": \\\"glossy matcha glaze with visible drip trails\\\", \\\"middle_layer\\\": \\\"smooth pale-green cheesecake body\\\", \\\"bottom_layer\\\": \\\"thin golden biscuit crust\\\" }, \\\"surface_details\\\": { \\\"glaze\\\": \\\"highly reflective, thick, slow-dripping matcha glaze\\\", \\\"powder\\\": \\\"matcha powder dusted on top and plate\\\", \\\"crumbs\\\": \\\"fine crumbs near base\\\" }, \\\"garnish\\\": { \\\"top\\\": [\\\"round green confection\\\", \\\"fresh mint leaves\\\", \\\"single raspberry\\\"], \\\"plate\\\": [\\\"extra raspberry\\\", \\\"mint leaves\\\", \\\"matcha powder\\\"] }, \\\"background\\\": { \\\"color\\\": \\\"dark charcoal / black\\\", \\\"elements\\\": [\\\"black bowl containing green sauce\\\"], \\\"blur\\\": \\\"strong background blur\\\" }, \\\"lighting\\\": { \\\"key_light\\\": \\\"soft directional from upper left\\\", \\\"highlights\\\": \\\"strong specular highlights on glaze\\\", \\\"shadows\\\": \\\"soft, natural falloff\\\" }, \\\"mood\\\": \\\"luxurious, modern, minimal, gourmet\\\" }, \\\"module_2_image_2_style\\\": { \\\"subject\\\": \\\"blue and white layered cake slice\\\", \\\"composition\\\": { \\\"orientation\\\": \\\"portrait\\\", \\\"angle\\\": \\\"slightly elevated front angle\\\", \\\"placement\\\": \\\"centered on white decorative plate\\\" }, \\\"layers\\\": { \\\"cake_layers\\\": \\\"soft white sponge layers\\\", \\\"filling_layers\\\": \\\"translucent blue jelly layers with sparkle\\\", \\\"top_layer\\\": \\\"smooth pastel blue glaze\\\" }, \\\"surface_details\\\": { \\\"drip\\\": \\\"single vertical glossy blue drip down front\\\", \\\"sparkle\\\": \\\"tiny reflective particles embedded in jelly\\\", \\\"top_decor\\\": \\\"glass-like blue spheres\\\" }, \\\"garnish\\\": { \\\"top\\\": [\\\"dark glossy cherry with long stem\\\", \\\"three transparent blue spheres\\\", \\\"tiny star-shaped sprinkles\\\"], \\\"plate\\\": [\\\"subtle sugar-like sparkles\\\"] }, \\\"background\\\": { \\\"color\\\": \\\"light icy blue\\\", \\\"effect\\\": \\\"soft bokeh dots\\\", \\\"props\\\": [\\\"white ribbon partially visible\\\"] }, \\\"lighting\\\": { \\\"key_light\\\": \\\"soft frontal light\\\", \\\"fill\\\": \\\"even illumination\\\", \\\"highlights\\\": \\\"glass reflections on spheres\\\" }, \\\"mood\\\": \\\"dreamy, delicate, whimsical, clean\\\" },\"}")
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)
}