复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "studio fashion portrait photography", "resolution_target": "8K ultra high definition", "aspect_ratio": "portrait (vertical)", "composition": { "framing": "medium portrait", "crop": "head to mid-torso", "subject_position": "slightly right of center", "camera_angle": "eye-level", "pose": { "body_orientation": "three-quarter turn to the left", "head_orientation": "turned toward camera", "arm_position": "one arm raised with hand placed behind or on top of head, other arm lowered and relaxed" } }, "subject": { "gender_presentation": "female", "age_range": "young adult", "skin_tone": "light to medium", "facial_expression": { "expression": "neutral to mildly serious", "gaze_direction": "directly at camera", "emotion": "confident, composed" }, "face_details": { "face_shape": "oval", "complexion": "smooth, even", "makeup": { "eyes": "defined eyeliner and mascara", "lips": "deep muted red or berry tone lipstick", "overall": "moderate, polished makeup" }, "piercings": [ "small nose ring on left nostril" ] }, "eyes": { "visibility": "partially visible through tinted glasses", "eyewear": { "type": "narrow rectangular sunglasses", "lens_color": "dark tinted", "frame": "thin metal frame", "position": "worn low on the bridge of the nose" } }, "hair": { "color": "medium brown with strong magenta/purple lighting highlights", "length": "long", "style": "loose, softly wavy", "parting": "center part" } }, "clothing_and_accessories": { "outerwear": { "type": "faux fur coat", "color": "dark gray to black", "texture": "thick, plush, high-volume fur", "fit": "oversized", "wearing_style": "draped loosely off the shoulders" }, "inner_clothing": { "type": "sleeveless top", "color": "black", "neckline": "straight or slightly scooped" }, "jewelry": { "necklace": { "type": "thin chain necklace", "material": "metallic", "visibility": "clearly visible at collarbone" } } }, "lighting": { "style": "studio lighting", "primary_light": { "direction": "front-left", "quality": "soft but directional" }, "accent_lighting": { "color": "magenta/purple", "placement": "from above and behind, especially on hair and shoulders" }, "contrast": "medium to high", "shadow_detail": "soft shadows with smooth falloff" }, "background": { "type": "studio backdrop", "color": "deep purple gradient", "texture": "smooth, seamless", "depth": "no visible background objects" }, "color_palette": { "dominant_colors": [ "purple", "magenta", "black", "dark gray" ], "accent_colors": [ "skin tones", "metallic silver" ] }, "image_quality": { "sharpness": "high", "detail_level": "very high", "noise": "minimal to none", "dynamic_range": "wide" }, "overall_style": { "aesthetic": "fashion editorial", "mood": "moody, stylish, confident", "era_influence": "modern" } }"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "studio fashion portrait photography", "resolution_target": "8K ultra high definition", "aspect_ratio": "portrait (vertical)", "composition": { "framing": "medium portrait", "crop": "head to mid-torso", "subject_position": "slightly right of center", "camera_angle": "eye-level", "pose": { "body_orientation": "three-quarter turn to the left", "head_orientation": "turned toward camera", "arm_position": "one arm raised with hand placed behind or on top of head, other arm lowered and relaxed" } }, "subject": { "gender_presentation": "female", "age_range": "young adult", "skin_tone": "light to medium", "facial_expression": { "expression": "neutral to mildly serious", "gaze_direction": "directly at camera", "emotion": "confident, composed" }, "face_details": { "face_shape": "oval", "complexion": "smooth, even", "makeup": { "eyes": "defined eyeliner and mascara", "lips": "deep muted red or berry tone lipstick", "overall": "moderate, polished makeup" }, "piercings": [ "small nose ring on left nostril" ] }, "eyes": { "visibility": "partially visible through tinted glasses", "eyewear": { "type": "narrow rectangular sunglasses", "lens_color": "dark tinted", "frame": "thin metal frame", "position": "worn low on the bridge of the nose" } }, "hair": { "color": "medium brown with strong magenta/purple lighting highlights", "length": "long", "style": "loose, softly wavy", "parting": "center part" } }, "clothing_and_accessories": { "outerwear": { "type": "faux fur coat", "color": "dark gray to black", "texture": "thick, plush, high-volume fur", "fit": "oversized", "wearing_style": "draped loosely off the shoulders" }, "inner_clothing": { "type": "sleeveless top", "color": "black", "neckline": "straight or slightly scooped" }, "jewelry": { "necklace": { "type": "thin chain necklace", "material": "metallic", "visibility": "clearly visible at collarbone" } } }, "lighting": { "style": "studio lighting", "primary_light": { "direction": "front-left", "quality": "soft but directional" }, "accent_lighting": { "color": "magenta/purple", "placement": "from above and behind, especially on hair and shoulders" }, "contrast": "medium to high", "shadow_detail": "soft shadows with smooth falloff" }, "background": { "type": "studio backdrop", "color": "deep purple gradient", "texture": "smooth, seamless", "depth": "no visible background objects" }, "color_palette": { "dominant_colors": [ "purple", "magenta", "black", "dark gray" ], "accent_colors": [ "skin tones", "metallic silver" ] }, "image_quality": { "sharpness": "high", "detail_level": "very high", "noise": "minimal to none", "dynamic_range": "wide" }, "overall_style": { "aesthetic": "fashion editorial", "mood": "moody, stylish, confident", "era_influence": "modern" } }"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "studio fashion portrait photography", "resolution_target": "8K ultra high definition", "aspect_ratio": "portrait (vertical)", "composition": { "framing": "medium portrait", "crop": "head to mid-torso", "subject_position": "slightly right of center", "camera_angle": "eye-level", "pose": { "body_orientation": "three-quarter turn to the left", "head_orientation": "turned toward camera", "arm_position": "one arm raised with hand placed behind or on top of head, other arm lowered and relaxed" } }, "subject": { "gender_presentation": "female", "age_range": "young adult", "skin_tone": "light to medium", "facial_expression": { "expression": "neutral to mildly serious", "gaze_direction": "directly at camera", "emotion": "confident, composed" }, "face_details": { "face_shape": "oval", "complexion": "smooth, even", "makeup": { "eyes": "defined eyeliner and mascara", "lips": "deep muted red or berry tone lipstick", "overall": "moderate, polished makeup" }, "piercings": [ "small nose ring on left nostril" ] }, "eyes": { "visibility": "partially visible through tinted glasses", "eyewear": { "type": "narrow rectangular sunglasses", "lens_color": "dark tinted", "frame": "thin metal frame", "position": "worn low on the bridge of the nose" } }, "hair": { "color": "medium brown with strong magenta/purple lighting highlights", "length": "long", "style": "loose, softly wavy", "parting": "center part" } }, "clothing_and_accessories": { "outerwear": { "type": "faux fur coat", "color": "dark gray to black", "texture": "thick, plush, high-volume fur", "fit": "oversized", "wearing_style": "draped loosely off the shoulders" }, "inner_clothing": { "type": "sleeveless top", "color": "black", "neckline": "straight or slightly scooped" }, "jewelry": { "necklace": { "type": "thin chain necklace", "material": "metallic", "visibility": "clearly visible at collarbone" } } }, "lighting": { "style": "studio lighting", "primary_light": { "direction": "front-left", "quality": "soft but directional" }, "accent_lighting": { "color": "magenta/purple", "placement": "from above and behind, especially on hair and shoulders" }, "contrast": "medium to high", "shadow_detail": "soft shadows with smooth falloff" }, "background": { "type": "studio backdrop", "color": "deep purple gradient", "texture": "smooth, seamless", "depth": "no visible background objects" }, "color_palette": { "dominant_colors": [ "purple", "magenta", "black", "dark gray" ], "accent_colors": [ "skin tones", "metallic silver" ] }, "image_quality": { "sharpness": "high", "detail_level": "very high", "noise": "minimal to none", "dynamic_range": "wide" }, "overall_style": { "aesthetic": "fashion editorial", "mood": "moody, stylish, confident", "era_influence": "modern" } }"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "studio fashion portrait photography", "resolution_target": "8K ultra high definition", "aspect_ratio": "portrait (vertical)", "composition": { "framing": "medium portrait", "crop": "head to mid-torso", "subject_position": "slightly right of center", "camera_angle": "eye-level", "pose": { "body_orientation": "three-quarter turn to the left", "head_orientation": "turned toward camera", "arm_position": "one arm raised with hand placed behind or on top of head, other arm lowered and relaxed" } }, "subject": { "gender_presentation": "female", "age_range": "young adult", "skin_tone": "light to medium", "facial_expression": { "expression": "neutral to mildly serious", "gaze_direction": "directly at camera", "emotion": "confident, composed" }, "face_details": { "face_shape": "oval", "complexion": "smooth, even", "makeup": { "eyes": "defined eyeliner and mascara", "lips": "deep muted red or berry tone lipstick", "overall": "moderate, polished makeup" }, "piercings": [ "small nose ring on left nostril" ] }, "eyes": { "visibility": "partially visible through tinted glasses", "eyewear": { "type": "narrow rectangular sunglasses", "lens_color": "dark tinted", "frame": "thin metal frame", "position": "worn low on the bridge of the nose" } }, "hair": { "color": "medium brown with strong magenta/purple lighting highlights", "length": "long", "style": "loose, softly wavy", "parting": "center part" } }, "clothing_and_accessories": { "outerwear": { "type": "faux fur coat", "color": "dark gray to black", "texture": "thick, plush, high-volume fur", "fit": "oversized", "wearing_style": "draped loosely off the shoulders" }, "inner_clothing": { "type": "sleeveless top", "color": "black", "neckline": "straight or slightly scooped" }, "jewelry": { "necklace": { "type": "thin chain necklace", "material": "metallic", "visibility": "clearly visible at collarbone" } } }, "lighting": { "style": "studio lighting", "primary_light": { "direction": "front-left", "quality": "soft but directional" }, "accent_lighting": { "color": "magenta/purple", "placement": "from above and behind, especially on hair and shoulders" }, "contrast": "medium to high", "shadow_detail": "soft shadows with smooth falloff" }, "background": { "type": "studio backdrop", "color": "deep purple gradient", "texture": "smooth, seamless", "depth": "no visible background objects" }, "color_palette": { "dominant_colors": [ "purple", "magenta", "black", "dark gray" ], "accent_colors": [ "skin tones", "metallic silver" ] }, "image_quality": { "sharpness": "high", "detail_level": "very high", "noise": "minimal to none", "dynamic_range": "wide" }, "overall_style": { "aesthetic": "fashion editorial", "mood": "moody, stylish, confident", "era_influence": "modern" } }"
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": "{ \"image_type\": \"studio fashion portrait photography\", \"resolution_target\": \"8K ultra high definition\", \"aspect_ratio\": \"portrait (vertical)\", \"composition\": { \"framing\": \"medium portrait\", \"crop\": \"head to mid-torso\", \"subject_position\": \"slightly right of center\", \"camera_angle\": \"eye-level\", \"pose\": { \"body_orientation\": \"three-quarter turn to the left\", \"head_orientation\": \"turned toward camera\", \"arm_position\": \"one arm raised with hand placed behind or on top of head, other arm lowered and relaxed\" } }, \"subject\": { \"gender_presentation\": \"female\", \"age_range\": \"young adult\", \"skin_tone\": \"light to medium\", \"facial_expression\": { \"expression\": \"neutral to mildly serious\", \"gaze_direction\": \"directly at camera\", \"emotion\": \"confident, composed\" }, \"face_details\": { \"face_shape\": \"oval\", \"complexion\": \"smooth, even\", \"makeup\": { \"eyes\": \"defined eyeliner and mascara\", \"lips\": \"deep muted red or berry tone lipstick\", \"overall\": \"moderate, polished makeup\" }, \"piercings\": [ \"small nose ring on left nostril\" ] }, \"eyes\": { \"visibility\": \"partially visible through tinted glasses\", \"eyewear\": { \"type\": \"narrow rectangular sunglasses\", \"lens_color\": \"dark tinted\", \"frame\": \"thin metal frame\", \"position\": \"worn low on the bridge of the nose\" } }, \"hair\": { \"color\": \"medium brown with strong magenta/purple lighting highlights\", \"length\": \"long\", \"style\": \"loose, softly wavy\", \"parting\": \"center part\" } }, \"clothing_and_accessories\": { \"outerwear\": { \"type\": \"faux fur coat\", \"color\": \"dark gray to black\", \"texture\": \"thick, plush, high-volume fur\", \"fit\": \"oversized\", \"wearing_style\": \"draped loosely off the shoulders\" }, \"inner_clothing\": { \"type\": \"sleeveless top\", \"color\": \"black\", \"neckline\": \"straight or slightly scooped\" }, \"jewelry\": { \"necklace\": { \"type\": \"thin chain necklace\", \"material\": \"metallic\", \"visibility\": \"clearly visible at collarbone\" } } }, \"lighting\": { \"style\": \"studio lighting\", \"primary_light\": { \"direction\": \"front-left\", \"quality\": \"soft but directional\" }, \"accent_lighting\": { \"color\": \"magenta/purple\", \"placement\": \"from above and behind, especially on hair and shoulders\" }, \"contrast\": \"medium to high\", \"shadow_detail\": \"soft shadows with smooth falloff\" }, \"background\": { \"type\": \"studio backdrop\", \"color\": \"deep purple gradient\", \"texture\": \"smooth, seamless\", \"depth\": \"no visible background objects\" }, \"color_palette\": { \"dominant_colors\": [ \"purple\", \"magenta\", \"black\", \"dark gray\" ], \"accent_colors\": [ \"skin tones\", \"metallic silver\" ] }, \"image_quality\": { \"sharpness\": \"high\", \"detail_level\": \"very high\", \"noise\": \"minimal to none\", \"dynamic_range\": \"wide\" }, \"overall_style\": { \"aesthetic\": \"fashion editorial\", \"mood\": \"moody, stylish, confident\", \"era_influence\": \"modern\" } }"
}
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": "{ \"image_type\": \"studio fashion portrait photography\", \"resolution_target\": \"8K ultra high definition\", \"aspect_ratio\": \"portrait (vertical)\", \"composition\": { \"framing\": \"medium portrait\", \"crop\": \"head to mid-torso\", \"subject_position\": \"slightly right of center\", \"camera_angle\": \"eye-level\", \"pose\": { \"body_orientation\": \"three-quarter turn to the left\", \"head_orientation\": \"turned toward camera\", \"arm_position\": \"one arm raised with hand placed behind or on top of head, other arm lowered and relaxed\" } }, \"subject\": { \"gender_presentation\": \"female\", \"age_range\": \"young adult\", \"skin_tone\": \"light to medium\", \"facial_expression\": { \"expression\": \"neutral to mildly serious\", \"gaze_direction\": \"directly at camera\", \"emotion\": \"confident, composed\" }, \"face_details\": { \"face_shape\": \"oval\", \"complexion\": \"smooth, even\", \"makeup\": { \"eyes\": \"defined eyeliner and mascara\", \"lips\": \"deep muted red or berry tone lipstick\", \"overall\": \"moderate, polished makeup\" }, \"piercings\": [ \"small nose ring on left nostril\" ] }, \"eyes\": { \"visibility\": \"partially visible through tinted glasses\", \"eyewear\": { \"type\": \"narrow rectangular sunglasses\", \"lens_color\": \"dark tinted\", \"frame\": \"thin metal frame\", \"position\": \"worn low on the bridge of the nose\" } }, \"hair\": { \"color\": \"medium brown with strong magenta/purple lighting highlights\", \"length\": \"long\", \"style\": \"loose, softly wavy\", \"parting\": \"center part\" } }, \"clothing_and_accessories\": { \"outerwear\": { \"type\": \"faux fur coat\", \"color\": \"dark gray to black\", \"texture\": \"thick, plush, high-volume fur\", \"fit\": \"oversized\", \"wearing_style\": \"draped loosely off the shoulders\" }, \"inner_clothing\": { \"type\": \"sleeveless top\", \"color\": \"black\", \"neckline\": \"straight or slightly scooped\" }, \"jewelry\": { \"necklace\": { \"type\": \"thin chain necklace\", \"material\": \"metallic\", \"visibility\": \"clearly visible at collarbone\" } } }, \"lighting\": { \"style\": \"studio lighting\", \"primary_light\": { \"direction\": \"front-left\", \"quality\": \"soft but directional\" }, \"accent_lighting\": { \"color\": \"magenta/purple\", \"placement\": \"from above and behind, especially on hair and shoulders\" }, \"contrast\": \"medium to high\", \"shadow_detail\": \"soft shadows with smooth falloff\" }, \"background\": { \"type\": \"studio backdrop\", \"color\": \"deep purple gradient\", \"texture\": \"smooth, seamless\", \"depth\": \"no visible background objects\" }, \"color_palette\": { \"dominant_colors\": [ \"purple\", \"magenta\", \"black\", \"dark gray\" ], \"accent_colors\": [ \"skin tones\", \"metallic silver\" ] }, \"image_quality\": { \"sharpness\": \"high\", \"detail_level\": \"very high\", \"noise\": \"minimal to none\", \"dynamic_range\": \"wide\" }, \"overall_style\": { \"aesthetic\": \"fashion editorial\", \"mood\": \"moody, stylish, confident\", \"era_influence\": \"modern\" } }"
});
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: "{ \"image_type\": \"studio fashion portrait photography\", \"resolution_target\": \"8K ultra high definition\", \"aspect_ratio\": \"portrait (vertical)\", \"composition\": { \"framing\": \"medium portrait\", \"crop\": \"head to mid-torso\", \"subject_position\": \"slightly right of center\", \"camera_angle\": \"eye-level\", \"pose\": { \"body_orientation\": \"three-quarter turn to the left\", \"head_orientation\": \"turned toward camera\", \"arm_position\": \"one arm raised with hand placed behind or on top of head, other arm lowered and relaxed\" } }, \"subject\": { \"gender_presentation\": \"female\", \"age_range\": \"young adult\", \"skin_tone\": \"light to medium\", \"facial_expression\": { \"expression\": \"neutral to mildly serious\", \"gaze_direction\": \"directly at camera\", \"emotion\": \"confident, composed\" }, \"face_details\": { \"face_shape\": \"oval\", \"complexion\": \"smooth, even\", \"makeup\": { \"eyes\": \"defined eyeliner and mascara\", \"lips\": \"deep muted red or berry tone lipstick\", \"overall\": \"moderate, polished makeup\" }, \"piercings\": [ \"small nose ring on left nostril\" ] }, \"eyes\": { \"visibility\": \"partially visible through tinted glasses\", \"eyewear\": { \"type\": \"narrow rectangular sunglasses\", \"lens_color\": \"dark tinted\", \"frame\": \"thin metal frame\", \"position\": \"worn low on the bridge of the nose\" } }, \"hair\": { \"color\": \"medium brown with strong magenta/purple lighting highlights\", \"length\": \"long\", \"style\": \"loose, softly wavy\", \"parting\": \"center part\" } }, \"clothing_and_accessories\": { \"outerwear\": { \"type\": \"faux fur coat\", \"color\": \"dark gray to black\", \"texture\": \"thick, plush, high-volume fur\", \"fit\": \"oversized\", \"wearing_style\": \"draped loosely off the shoulders\" }, \"inner_clothing\": { \"type\": \"sleeveless top\", \"color\": \"black\", \"neckline\": \"straight or slightly scooped\" }, \"jewelry\": { \"necklace\": { \"type\": \"thin chain necklace\", \"material\": \"metallic\", \"visibility\": \"clearly visible at collarbone\" } } }, \"lighting\": { \"style\": \"studio lighting\", \"primary_light\": { \"direction\": \"front-left\", \"quality\": \"soft but directional\" }, \"accent_lighting\": { \"color\": \"magenta/purple\", \"placement\": \"from above and behind, especially on hair and shoulders\" }, \"contrast\": \"medium to high\", \"shadow_detail\": \"soft shadows with smooth falloff\" }, \"background\": { \"type\": \"studio backdrop\", \"color\": \"deep purple gradient\", \"texture\": \"smooth, seamless\", \"depth\": \"no visible background objects\" }, \"color_palette\": { \"dominant_colors\": [ \"purple\", \"magenta\", \"black\", \"dark gray\" ], \"accent_colors\": [ \"skin tones\", \"metallic silver\" ] }, \"image_quality\": { \"sharpness\": \"high\", \"detail_level\": \"very high\", \"noise\": \"minimal to none\", \"dynamic_range\": \"wide\" }, \"overall_style\": { \"aesthetic\": \"fashion editorial\", \"mood\": \"moody, stylish, confident\", \"era_influence\": \"modern\" } }"
)
puts result.id
复制
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader("{\"model\":\"gpt-image-2\",\"prompt\":\"{ \\\"image_type\\\": \\\"studio fashion portrait photography\\\", \\\"resolution_target\\\": \\\"8K ultra high definition\\\", \\\"aspect_ratio\\\": \\\"portrait (vertical)\\\", \\\"composition\\\": { \\\"framing\\\": \\\"medium portrait\\\", \\\"crop\\\": \\\"head to mid-torso\\\", \\\"subject_position\\\": \\\"slightly right of center\\\", \\\"camera_angle\\\": \\\"eye-level\\\", \\\"pose\\\": { \\\"body_orientation\\\": \\\"three-quarter turn to the left\\\", \\\"head_orientation\\\": \\\"turned toward camera\\\", \\\"arm_position\\\": \\\"one arm raised with hand placed behind or on top of head, other arm lowered and relaxed\\\" } }, \\\"subject\\\": { \\\"gender_presentation\\\": \\\"female\\\", \\\"age_range\\\": \\\"young adult\\\", \\\"skin_tone\\\": \\\"light to medium\\\", \\\"facial_expression\\\": { \\\"expression\\\": \\\"neutral to mildly serious\\\", \\\"gaze_direction\\\": \\\"directly at camera\\\", \\\"emotion\\\": \\\"confident, composed\\\" }, \\\"face_details\\\": { \\\"face_shape\\\": \\\"oval\\\", \\\"complexion\\\": \\\"smooth, even\\\", \\\"makeup\\\": { \\\"eyes\\\": \\\"defined eyeliner and mascara\\\", \\\"lips\\\": \\\"deep muted red or berry tone lipstick\\\", \\\"overall\\\": \\\"moderate, polished makeup\\\" }, \\\"piercings\\\": [ \\\"small nose ring on left nostril\\\" ] }, \\\"eyes\\\": { \\\"visibility\\\": \\\"partially visible through tinted glasses\\\", \\\"eyewear\\\": { \\\"type\\\": \\\"narrow rectangular sunglasses\\\", \\\"lens_color\\\": \\\"dark tinted\\\", \\\"frame\\\": \\\"thin metal frame\\\", \\\"position\\\": \\\"worn low on the bridge of the nose\\\" } }, \\\"hair\\\": { \\\"color\\\": \\\"medium brown with strong magenta/purple lighting highlights\\\", \\\"length\\\": \\\"long\\\", \\\"style\\\": \\\"loose, softly wavy\\\", \\\"parting\\\": \\\"center part\\\" } }, \\\"clothing_and_accessories\\\": { \\\"outerwear\\\": { \\\"type\\\": \\\"faux fur coat\\\", \\\"color\\\": \\\"dark gray to black\\\", \\\"texture\\\": \\\"thick, plush, high-volume fur\\\", \\\"fit\\\": \\\"oversized\\\", \\\"wearing_style\\\": \\\"draped loosely off the shoulders\\\" }, \\\"inner_clothing\\\": { \\\"type\\\": \\\"sleeveless top\\\", \\\"color\\\": \\\"black\\\", \\\"neckline\\\": \\\"straight or slightly scooped\\\" }, \\\"jewelry\\\": { \\\"necklace\\\": { \\\"type\\\": \\\"thin chain necklace\\\", \\\"material\\\": \\\"metallic\\\", \\\"visibility\\\": \\\"clearly visible at collarbone\\\" } } }, \\\"lighting\\\": { \\\"style\\\": \\\"studio lighting\\\", \\\"primary_light\\\": { \\\"direction\\\": \\\"front-left\\\", \\\"quality\\\": \\\"soft but directional\\\" }, \\\"accent_lighting\\\": { \\\"color\\\": \\\"magenta/purple\\\", \\\"placement\\\": \\\"from above and behind, especially on hair and shoulders\\\" }, \\\"contrast\\\": \\\"medium to high\\\", \\\"shadow_detail\\\": \\\"soft shadows with smooth falloff\\\" }, \\\"background\\\": { \\\"type\\\": \\\"studio backdrop\\\", \\\"color\\\": \\\"deep purple gradient\\\", \\\"texture\\\": \\\"smooth, seamless\\\", \\\"depth\\\": \\\"no visible background objects\\\" }, \\\"color_palette\\\": { \\\"dominant_colors\\\": [ \\\"purple\\\", \\\"magenta\\\", \\\"black\\\", \\\"dark gray\\\" ], \\\"accent_colors\\\": [ \\\"skin tones\\\", \\\"metallic silver\\\" ] }, \\\"image_quality\\\": { \\\"sharpness\\\": \\\"high\\\", \\\"detail_level\\\": \\\"very high\\\", \\\"noise\\\": \\\"minimal to none\\\", \\\"dynamic_range\\\": \\\"wide\\\" }, \\\"overall_style\\\": { \\\"aesthetic\\\": \\\"fashion editorial\\\", \\\"mood\\\": \\\"moody, stylish, confident\\\", \\\"era_influence\\\": \\\"modern\\\" } }\"}")
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)
}