复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "aspect_ratio": "3:4", "image_quality": "ultra-high definition", "sharpness": "extreme", "lighting_quality": "studio-grade cinematic lighting", "render_style": "hyper-realistic AI-edited food photography", "noise": "none", "text_or_logos": "none", "focus": "tack-sharp foreground with controlled depth" }, "Module_1_Image_1_Style": { "subject": "two grilled tortilla wraps", "composition": { "main_action": "wraps floating above a bowl of sauce", "orientation": "one wrap stacked diagonally over another", "perspective": "slightly low-angle, centered composition" }, "food_details": { "wrap_texture": "lightly grilled tortilla with golden brown char spots", "filling_visible": [ "diced cooked chicken", "golden french fries", "green peas" ], "sauce": { "type": "thick creamy white sauce", "motion": "large splash forming curved arcs", "bowl_material": "ceramic", "bowl_color": "light beige" } }, "motion_elements": [ "suspended sauce droplets", "floating parsley leaves" ], "background": { "color": "dark warm brown gradient", "texture": "smooth, studio backdrop" }, "surface": "wooden tabletop visible at bottom", "mood": "dynamic, indulgent, dramatic food motion" }, "Module_2_Image_2_Style": { "subject": "potato chips in a bowl", "composition": { "main_action": "chips flying upward above the bowl", "distribution": "evenly spaced mid-air chips forming a vertical cascade", "camera_position": "eye-level close-up" }, "food_details": { "chips_texture": "thin, crispy, lightly curved", "chips_color": "golden yellow with seasoning speckles", "bowl": { "material": "ceramic", "color": "warm orange", "fill_state": "bowl partially filled with chips" } }, "seasoning_elements": [ "fine spice dust", "small crumbs", "rosemary sprigs floating" ], "background": { "color": "warm orange gradient", "lighting": "soft diffused with highlights on chips" }, "ground_details": [ "scattered crumbs", "spice particles", "rosemary pieces" ], "mood": "energetic, crunchy, commercial snack photography" }, "Module_3_Image_3_Style": { "subject": "beef noodle soup in a bowl", "composition": { "main_action": "bowl floating in mid-air", "camera_angle": "slightly elevated front angle", "framing": "centered with wide negative space" }, "food_details": { "bowl_color": "dark matte black", "broth": "clear brown liquid", "noodles": "white flat noodles", "protein": "thin slices of raw or lightly cooked beef", "herbs": [ "green basil leaves" ] }, "floating_elements": [ "basil leaves", "chili slices", "garlic cloves", "herb fragments" ], "steam": { "visibility": "clearly visible", "shape": "soft swirling trails", "opacity": "semi-transparent" }, "background": { "color": "soft teal gradient", "texture": "clean studio backdrop" }, "mood": "fresh, aromatic, premium culinary presentation" },"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "aspect_ratio": "3:4", "image_quality": "ultra-high definition", "sharpness": "extreme", "lighting_quality": "studio-grade cinematic lighting", "render_style": "hyper-realistic AI-edited food photography", "noise": "none", "text_or_logos": "none", "focus": "tack-sharp foreground with controlled depth" }, "Module_1_Image_1_Style": { "subject": "two grilled tortilla wraps", "composition": { "main_action": "wraps floating above a bowl of sauce", "orientation": "one wrap stacked diagonally over another", "perspective": "slightly low-angle, centered composition" }, "food_details": { "wrap_texture": "lightly grilled tortilla with golden brown char spots", "filling_visible": [ "diced cooked chicken", "golden french fries", "green peas" ], "sauce": { "type": "thick creamy white sauce", "motion": "large splash forming curved arcs", "bowl_material": "ceramic", "bowl_color": "light beige" } }, "motion_elements": [ "suspended sauce droplets", "floating parsley leaves" ], "background": { "color": "dark warm brown gradient", "texture": "smooth, studio backdrop" }, "surface": "wooden tabletop visible at bottom", "mood": "dynamic, indulgent, dramatic food motion" }, "Module_2_Image_2_Style": { "subject": "potato chips in a bowl", "composition": { "main_action": "chips flying upward above the bowl", "distribution": "evenly spaced mid-air chips forming a vertical cascade", "camera_position": "eye-level close-up" }, "food_details": { "chips_texture": "thin, crispy, lightly curved", "chips_color": "golden yellow with seasoning speckles", "bowl": { "material": "ceramic", "color": "warm orange", "fill_state": "bowl partially filled with chips" } }, "seasoning_elements": [ "fine spice dust", "small crumbs", "rosemary sprigs floating" ], "background": { "color": "warm orange gradient", "lighting": "soft diffused with highlights on chips" }, "ground_details": [ "scattered crumbs", "spice particles", "rosemary pieces" ], "mood": "energetic, crunchy, commercial snack photography" }, "Module_3_Image_3_Style": { "subject": "beef noodle soup in a bowl", "composition": { "main_action": "bowl floating in mid-air", "camera_angle": "slightly elevated front angle", "framing": "centered with wide negative space" }, "food_details": { "bowl_color": "dark matte black", "broth": "clear brown liquid", "noodles": "white flat noodles", "protein": "thin slices of raw or lightly cooked beef", "herbs": [ "green basil leaves" ] }, "floating_elements": [ "basil leaves", "chili slices", "garlic cloves", "herb fragments" ], "steam": { "visibility": "clearly visible", "shape": "soft swirling trails", "opacity": "semi-transparent" }, "background": { "color": "soft teal gradient", "texture": "clean studio backdrop" }, "mood": "fresh, aromatic, premium culinary presentation" },"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "aspect_ratio": "3:4", "image_quality": "ultra-high definition", "sharpness": "extreme", "lighting_quality": "studio-grade cinematic lighting", "render_style": "hyper-realistic AI-edited food photography", "noise": "none", "text_or_logos": "none", "focus": "tack-sharp foreground with controlled depth" }, "Module_1_Image_1_Style": { "subject": "two grilled tortilla wraps", "composition": { "main_action": "wraps floating above a bowl of sauce", "orientation": "one wrap stacked diagonally over another", "perspective": "slightly low-angle, centered composition" }, "food_details": { "wrap_texture": "lightly grilled tortilla with golden brown char spots", "filling_visible": [ "diced cooked chicken", "golden french fries", "green peas" ], "sauce": { "type": "thick creamy white sauce", "motion": "large splash forming curved arcs", "bowl_material": "ceramic", "bowl_color": "light beige" } }, "motion_elements": [ "suspended sauce droplets", "floating parsley leaves" ], "background": { "color": "dark warm brown gradient", "texture": "smooth, studio backdrop" }, "surface": "wooden tabletop visible at bottom", "mood": "dynamic, indulgent, dramatic food motion" }, "Module_2_Image_2_Style": { "subject": "potato chips in a bowl", "composition": { "main_action": "chips flying upward above the bowl", "distribution": "evenly spaced mid-air chips forming a vertical cascade", "camera_position": "eye-level close-up" }, "food_details": { "chips_texture": "thin, crispy, lightly curved", "chips_color": "golden yellow with seasoning speckles", "bowl": { "material": "ceramic", "color": "warm orange", "fill_state": "bowl partially filled with chips" } }, "seasoning_elements": [ "fine spice dust", "small crumbs", "rosemary sprigs floating" ], "background": { "color": "warm orange gradient", "lighting": "soft diffused with highlights on chips" }, "ground_details": [ "scattered crumbs", "spice particles", "rosemary pieces" ], "mood": "energetic, crunchy, commercial snack photography" }, "Module_3_Image_3_Style": { "subject": "beef noodle soup in a bowl", "composition": { "main_action": "bowl floating in mid-air", "camera_angle": "slightly elevated front angle", "framing": "centered with wide negative space" }, "food_details": { "bowl_color": "dark matte black", "broth": "clear brown liquid", "noodles": "white flat noodles", "protein": "thin slices of raw or lightly cooked beef", "herbs": [ "green basil leaves" ] }, "floating_elements": [ "basil leaves", "chili slices", "garlic cloves", "herb fragments" ], "steam": { "visibility": "clearly visible", "shape": "soft swirling trails", "opacity": "semi-transparent" }, "background": { "color": "soft teal gradient", "texture": "clean studio backdrop" }, "mood": "fresh, aromatic, premium culinary presentation" },"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "aspect_ratio": "3:4", "image_quality": "ultra-high definition", "sharpness": "extreme", "lighting_quality": "studio-grade cinematic lighting", "render_style": "hyper-realistic AI-edited food photography", "noise": "none", "text_or_logos": "none", "focus": "tack-sharp foreground with controlled depth" }, "Module_1_Image_1_Style": { "subject": "two grilled tortilla wraps", "composition": { "main_action": "wraps floating above a bowl of sauce", "orientation": "one wrap stacked diagonally over another", "perspective": "slightly low-angle, centered composition" }, "food_details": { "wrap_texture": "lightly grilled tortilla with golden brown char spots", "filling_visible": [ "diced cooked chicken", "golden french fries", "green peas" ], "sauce": { "type": "thick creamy white sauce", "motion": "large splash forming curved arcs", "bowl_material": "ceramic", "bowl_color": "light beige" } }, "motion_elements": [ "suspended sauce droplets", "floating parsley leaves" ], "background": { "color": "dark warm brown gradient", "texture": "smooth, studio backdrop" }, "surface": "wooden tabletop visible at bottom", "mood": "dynamic, indulgent, dramatic food motion" }, "Module_2_Image_2_Style": { "subject": "potato chips in a bowl", "composition": { "main_action": "chips flying upward above the bowl", "distribution": "evenly spaced mid-air chips forming a vertical cascade", "camera_position": "eye-level close-up" }, "food_details": { "chips_texture": "thin, crispy, lightly curved", "chips_color": "golden yellow with seasoning speckles", "bowl": { "material": "ceramic", "color": "warm orange", "fill_state": "bowl partially filled with chips" } }, "seasoning_elements": [ "fine spice dust", "small crumbs", "rosemary sprigs floating" ], "background": { "color": "warm orange gradient", "lighting": "soft diffused with highlights on chips" }, "ground_details": [ "scattered crumbs", "spice particles", "rosemary pieces" ], "mood": "energetic, crunchy, commercial snack photography" }, "Module_3_Image_3_Style": { "subject": "beef noodle soup in a bowl", "composition": { "main_action": "bowl floating in mid-air", "camera_angle": "slightly elevated front angle", "framing": "centered with wide negative space" }, "food_details": { "bowl_color": "dark matte black", "broth": "clear brown liquid", "noodles": "white flat noodles", "protein": "thin slices of raw or lightly cooked beef", "herbs": [ "green basil leaves" ] }, "floating_elements": [ "basil leaves", "chili slices", "garlic cloves", "herb fragments" ], "steam": { "visibility": "clearly visible", "shape": "soft swirling trails", "opacity": "semi-transparent" }, "background": { "color": "soft teal gradient", "texture": "clean studio backdrop" }, "mood": "fresh, aromatic, premium culinary presentation" },"
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\", \"aspect_ratio\": \"3:4\", \"image_quality\": \"ultra-high definition\", \"sharpness\": \"extreme\", \"lighting_quality\": \"studio-grade cinematic lighting\", \"render_style\": \"hyper-realistic AI-edited food photography\", \"noise\": \"none\", \"text_or_logos\": \"none\", \"focus\": \"tack-sharp foreground with controlled depth\" }, \"Module_1_Image_1_Style\": { \"subject\": \"two grilled tortilla wraps\", \"composition\": { \"main_action\": \"wraps floating above a bowl of sauce\", \"orientation\": \"one wrap stacked diagonally over another\", \"perspective\": \"slightly low-angle, centered composition\" }, \"food_details\": { \"wrap_texture\": \"lightly grilled tortilla with golden brown char spots\", \"filling_visible\": [ \"diced cooked chicken\", \"golden french fries\", \"green peas\" ], \"sauce\": { \"type\": \"thick creamy white sauce\", \"motion\": \"large splash forming curved arcs\", \"bowl_material\": \"ceramic\", \"bowl_color\": \"light beige\" } }, \"motion_elements\": [ \"suspended sauce droplets\", \"floating parsley leaves\" ], \"background\": { \"color\": \"dark warm brown gradient\", \"texture\": \"smooth, studio backdrop\" }, \"surface\": \"wooden tabletop visible at bottom\", \"mood\": \"dynamic, indulgent, dramatic food motion\" }, \"Module_2_Image_2_Style\": { \"subject\": \"potato chips in a bowl\", \"composition\": { \"main_action\": \"chips flying upward above the bowl\", \"distribution\": \"evenly spaced mid-air chips forming a vertical cascade\", \"camera_position\": \"eye-level close-up\" }, \"food_details\": { \"chips_texture\": \"thin, crispy, lightly curved\", \"chips_color\": \"golden yellow with seasoning speckles\", \"bowl\": { \"material\": \"ceramic\", \"color\": \"warm orange\", \"fill_state\": \"bowl partially filled with chips\" } }, \"seasoning_elements\": [ \"fine spice dust\", \"small crumbs\", \"rosemary sprigs floating\" ], \"background\": { \"color\": \"warm orange gradient\", \"lighting\": \"soft diffused with highlights on chips\" }, \"ground_details\": [ \"scattered crumbs\", \"spice particles\", \"rosemary pieces\" ], \"mood\": \"energetic, crunchy, commercial snack photography\" }, \"Module_3_Image_3_Style\": { \"subject\": \"beef noodle soup in a bowl\", \"composition\": { \"main_action\": \"bowl floating in mid-air\", \"camera_angle\": \"slightly elevated front angle\", \"framing\": \"centered with wide negative space\" }, \"food_details\": { \"bowl_color\": \"dark matte black\", \"broth\": \"clear brown liquid\", \"noodles\": \"white flat noodles\", \"protein\": \"thin slices of raw or lightly cooked beef\", \"herbs\": [ \"green basil leaves\" ] }, \"floating_elements\": [ \"basil leaves\", \"chili slices\", \"garlic cloves\", \"herb fragments\" ], \"steam\": { \"visibility\": \"clearly visible\", \"shape\": \"soft swirling trails\", \"opacity\": \"semi-transparent\" }, \"background\": { \"color\": \"soft teal gradient\", \"texture\": \"clean studio backdrop\" }, \"mood\": \"fresh, aromatic, premium culinary presentation\" },"
}
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\", \"aspect_ratio\": \"3:4\", \"image_quality\": \"ultra-high definition\", \"sharpness\": \"extreme\", \"lighting_quality\": \"studio-grade cinematic lighting\", \"render_style\": \"hyper-realistic AI-edited food photography\", \"noise\": \"none\", \"text_or_logos\": \"none\", \"focus\": \"tack-sharp foreground with controlled depth\" }, \"Module_1_Image_1_Style\": { \"subject\": \"two grilled tortilla wraps\", \"composition\": { \"main_action\": \"wraps floating above a bowl of sauce\", \"orientation\": \"one wrap stacked diagonally over another\", \"perspective\": \"slightly low-angle, centered composition\" }, \"food_details\": { \"wrap_texture\": \"lightly grilled tortilla with golden brown char spots\", \"filling_visible\": [ \"diced cooked chicken\", \"golden french fries\", \"green peas\" ], \"sauce\": { \"type\": \"thick creamy white sauce\", \"motion\": \"large splash forming curved arcs\", \"bowl_material\": \"ceramic\", \"bowl_color\": \"light beige\" } }, \"motion_elements\": [ \"suspended sauce droplets\", \"floating parsley leaves\" ], \"background\": { \"color\": \"dark warm brown gradient\", \"texture\": \"smooth, studio backdrop\" }, \"surface\": \"wooden tabletop visible at bottom\", \"mood\": \"dynamic, indulgent, dramatic food motion\" }, \"Module_2_Image_2_Style\": { \"subject\": \"potato chips in a bowl\", \"composition\": { \"main_action\": \"chips flying upward above the bowl\", \"distribution\": \"evenly spaced mid-air chips forming a vertical cascade\", \"camera_position\": \"eye-level close-up\" }, \"food_details\": { \"chips_texture\": \"thin, crispy, lightly curved\", \"chips_color\": \"golden yellow with seasoning speckles\", \"bowl\": { \"material\": \"ceramic\", \"color\": \"warm orange\", \"fill_state\": \"bowl partially filled with chips\" } }, \"seasoning_elements\": [ \"fine spice dust\", \"small crumbs\", \"rosemary sprigs floating\" ], \"background\": { \"color\": \"warm orange gradient\", \"lighting\": \"soft diffused with highlights on chips\" }, \"ground_details\": [ \"scattered crumbs\", \"spice particles\", \"rosemary pieces\" ], \"mood\": \"energetic, crunchy, commercial snack photography\" }, \"Module_3_Image_3_Style\": { \"subject\": \"beef noodle soup in a bowl\", \"composition\": { \"main_action\": \"bowl floating in mid-air\", \"camera_angle\": \"slightly elevated front angle\", \"framing\": \"centered with wide negative space\" }, \"food_details\": { \"bowl_color\": \"dark matte black\", \"broth\": \"clear brown liquid\", \"noodles\": \"white flat noodles\", \"protein\": \"thin slices of raw or lightly cooked beef\", \"herbs\": [ \"green basil leaves\" ] }, \"floating_elements\": [ \"basil leaves\", \"chili slices\", \"garlic cloves\", \"herb fragments\" ], \"steam\": { \"visibility\": \"clearly visible\", \"shape\": \"soft swirling trails\", \"opacity\": \"semi-transparent\" }, \"background\": { \"color\": \"soft teal gradient\", \"texture\": \"clean studio backdrop\" }, \"mood\": \"fresh, aromatic, premium culinary presentation\" },"
});
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\", \"aspect_ratio\": \"3:4\", \"image_quality\": \"ultra-high definition\", \"sharpness\": \"extreme\", \"lighting_quality\": \"studio-grade cinematic lighting\", \"render_style\": \"hyper-realistic AI-edited food photography\", \"noise\": \"none\", \"text_or_logos\": \"none\", \"focus\": \"tack-sharp foreground with controlled depth\" }, \"Module_1_Image_1_Style\": { \"subject\": \"two grilled tortilla wraps\", \"composition\": { \"main_action\": \"wraps floating above a bowl of sauce\", \"orientation\": \"one wrap stacked diagonally over another\", \"perspective\": \"slightly low-angle, centered composition\" }, \"food_details\": { \"wrap_texture\": \"lightly grilled tortilla with golden brown char spots\", \"filling_visible\": [ \"diced cooked chicken\", \"golden french fries\", \"green peas\" ], \"sauce\": { \"type\": \"thick creamy white sauce\", \"motion\": \"large splash forming curved arcs\", \"bowl_material\": \"ceramic\", \"bowl_color\": \"light beige\" } }, \"motion_elements\": [ \"suspended sauce droplets\", \"floating parsley leaves\" ], \"background\": { \"color\": \"dark warm brown gradient\", \"texture\": \"smooth, studio backdrop\" }, \"surface\": \"wooden tabletop visible at bottom\", \"mood\": \"dynamic, indulgent, dramatic food motion\" }, \"Module_2_Image_2_Style\": { \"subject\": \"potato chips in a bowl\", \"composition\": { \"main_action\": \"chips flying upward above the bowl\", \"distribution\": \"evenly spaced mid-air chips forming a vertical cascade\", \"camera_position\": \"eye-level close-up\" }, \"food_details\": { \"chips_texture\": \"thin, crispy, lightly curved\", \"chips_color\": \"golden yellow with seasoning speckles\", \"bowl\": { \"material\": \"ceramic\", \"color\": \"warm orange\", \"fill_state\": \"bowl partially filled with chips\" } }, \"seasoning_elements\": [ \"fine spice dust\", \"small crumbs\", \"rosemary sprigs floating\" ], \"background\": { \"color\": \"warm orange gradient\", \"lighting\": \"soft diffused with highlights on chips\" }, \"ground_details\": [ \"scattered crumbs\", \"spice particles\", \"rosemary pieces\" ], \"mood\": \"energetic, crunchy, commercial snack photography\" }, \"Module_3_Image_3_Style\": { \"subject\": \"beef noodle soup in a bowl\", \"composition\": { \"main_action\": \"bowl floating in mid-air\", \"camera_angle\": \"slightly elevated front angle\", \"framing\": \"centered with wide negative space\" }, \"food_details\": { \"bowl_color\": \"dark matte black\", \"broth\": \"clear brown liquid\", \"noodles\": \"white flat noodles\", \"protein\": \"thin slices of raw or lightly cooked beef\", \"herbs\": [ \"green basil leaves\" ] }, \"floating_elements\": [ \"basil leaves\", \"chili slices\", \"garlic cloves\", \"herb fragments\" ], \"steam\": { \"visibility\": \"clearly visible\", \"shape\": \"soft swirling trails\", \"opacity\": \"semi-transparent\" }, \"background\": { \"color\": \"soft teal gradient\", \"texture\": \"clean studio backdrop\" }, \"mood\": \"fresh, aromatic, premium culinary presentation\" },"
)
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\\\", \\\"aspect_ratio\\\": \\\"3:4\\\", \\\"image_quality\\\": \\\"ultra-high definition\\\", \\\"sharpness\\\": \\\"extreme\\\", \\\"lighting_quality\\\": \\\"studio-grade cinematic lighting\\\", \\\"render_style\\\": \\\"hyper-realistic AI-edited food photography\\\", \\\"noise\\\": \\\"none\\\", \\\"text_or_logos\\\": \\\"none\\\", \\\"focus\\\": \\\"tack-sharp foreground with controlled depth\\\" }, \\\"Module_1_Image_1_Style\\\": { \\\"subject\\\": \\\"two grilled tortilla wraps\\\", \\\"composition\\\": { \\\"main_action\\\": \\\"wraps floating above a bowl of sauce\\\", \\\"orientation\\\": \\\"one wrap stacked diagonally over another\\\", \\\"perspective\\\": \\\"slightly low-angle, centered composition\\\" }, \\\"food_details\\\": { \\\"wrap_texture\\\": \\\"lightly grilled tortilla with golden brown char spots\\\", \\\"filling_visible\\\": [ \\\"diced cooked chicken\\\", \\\"golden french fries\\\", \\\"green peas\\\" ], \\\"sauce\\\": { \\\"type\\\": \\\"thick creamy white sauce\\\", \\\"motion\\\": \\\"large splash forming curved arcs\\\", \\\"bowl_material\\\": \\\"ceramic\\\", \\\"bowl_color\\\": \\\"light beige\\\" } }, \\\"motion_elements\\\": [ \\\"suspended sauce droplets\\\", \\\"floating parsley leaves\\\" ], \\\"background\\\": { \\\"color\\\": \\\"dark warm brown gradient\\\", \\\"texture\\\": \\\"smooth, studio backdrop\\\" }, \\\"surface\\\": \\\"wooden tabletop visible at bottom\\\", \\\"mood\\\": \\\"dynamic, indulgent, dramatic food motion\\\" }, \\\"Module_2_Image_2_Style\\\": { \\\"subject\\\": \\\"potato chips in a bowl\\\", \\\"composition\\\": { \\\"main_action\\\": \\\"chips flying upward above the bowl\\\", \\\"distribution\\\": \\\"evenly spaced mid-air chips forming a vertical cascade\\\", \\\"camera_position\\\": \\\"eye-level close-up\\\" }, \\\"food_details\\\": { \\\"chips_texture\\\": \\\"thin, crispy, lightly curved\\\", \\\"chips_color\\\": \\\"golden yellow with seasoning speckles\\\", \\\"bowl\\\": { \\\"material\\\": \\\"ceramic\\\", \\\"color\\\": \\\"warm orange\\\", \\\"fill_state\\\": \\\"bowl partially filled with chips\\\" } }, \\\"seasoning_elements\\\": [ \\\"fine spice dust\\\", \\\"small crumbs\\\", \\\"rosemary sprigs floating\\\" ], \\\"background\\\": { \\\"color\\\": \\\"warm orange gradient\\\", \\\"lighting\\\": \\\"soft diffused with highlights on chips\\\" }, \\\"ground_details\\\": [ \\\"scattered crumbs\\\", \\\"spice particles\\\", \\\"rosemary pieces\\\" ], \\\"mood\\\": \\\"energetic, crunchy, commercial snack photography\\\" }, \\\"Module_3_Image_3_Style\\\": { \\\"subject\\\": \\\"beef noodle soup in a bowl\\\", \\\"composition\\\": { \\\"main_action\\\": \\\"bowl floating in mid-air\\\", \\\"camera_angle\\\": \\\"slightly elevated front angle\\\", \\\"framing\\\": \\\"centered with wide negative space\\\" }, \\\"food_details\\\": { \\\"bowl_color\\\": \\\"dark matte black\\\", \\\"broth\\\": \\\"clear brown liquid\\\", \\\"noodles\\\": \\\"white flat noodles\\\", \\\"protein\\\": \\\"thin slices of raw or lightly cooked beef\\\", \\\"herbs\\\": [ \\\"green basil leaves\\\" ] }, \\\"floating_elements\\\": [ \\\"basil leaves\\\", \\\"chili slices\\\", \\\"garlic cloves\\\", \\\"herb fragments\\\" ], \\\"steam\\\": { \\\"visibility\\\": \\\"clearly visible\\\", \\\"shape\\\": \\\"soft swirling trails\\\", \\\"opacity\\\": \\\"semi-transparent\\\" }, \\\"background\\\": { \\\"color\\\": \\\"soft teal gradient\\\", \\\"texture\\\": \\\"clean studio backdrop\\\" }, \\\"mood\\\": \\\"fresh, aromatic, premium culinary presentation\\\" },\"}")
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)
}