复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "portrait", "generation_quality": "8K ultra-high resolution", "realism_level": "photorealistic", "subject": { "human_presence": true, "gender_presentation": "feminine", "age_appearance": "young adult", "visible_pose": { "head_position": "slightly tilted", "hand_position": "one hand raised touching hair near the side of the head", "shoulder_visibility": "upper torso visible" }, "facial_expression": { "mouth": "slightly parted lips", "expression": "neutral to soft, relaxed", "gaze_direction": "looking directly toward the camera" } }, "face_details": { "face_shape": "oval", "skin_texture": "smooth with visible natural skin texture", "skin_finish": "soft matte with subtle highlights", "cheeks": "natural blush visible", "nose": { "shape": "straight", "size": "medium", "tip": "softly rounded" }, "lips": { "shape": "full", "color": "muted warm rose / nude", "texture": "matte finish" }, "jawline": "softly defined", "chin": "rounded" }, "eyes": { "shape": "almond-shaped", "eye_color": "appears green or hazel under lighting", "eyelids": "natural crease visible", "lashes": "natural, not exaggerated", "eyebrows": { "shape": "well-groomed, natural arch", "density": "medium-full", "color": "dark brown" } }, "hair": { "color": "medium to dark brown", "length": "short to medium", "texture": "wavy", "style": "loose, slightly tousled", "parting": "off-center", "movement": "some strands falling across the forehead and partially covering one eye", "shine": "natural sheen visible" }, "makeup": { "foundation": "natural, skin-like", "blush": "soft peach-pink", "lip_product": "matte lipstick", "eye_makeup": "minimal, natural enhancement", "overall_style": "clean, understated, realistic" }, "clothing": { "garment_type": "button-up shirt", "fit": "relaxed fit", "fabric_appearance": "lightweight fabric", "pattern": "abstract floral or ornamental pattern", "color_palette": { "primary": "dark navy or charcoal", "secondary": "off-white or light beige" }, "buttons": { "visibility": "visible", "color": "light neutral" }, "collar": "standard pointed collar" }, "lighting": { "type": "natural light", "direction": "side lighting", "contrast": "soft to medium contrast", "highlights": "gentle highlights on cheekbones, nose, and lips", "shadows": "soft shadows adding depth to facial contours" }, "background": { "type": "out-of-focus", "style": "minimal, neutral", "colors": "dark gray and muted tones", "depth_of_field": "shallow", "distractions": "none visible" }, "camera_and_composition": { "framing": "close-up portrait", "angle": "eye-level", "focus": "sharp focus on face", "bokeh": "soft background blur", "crop": "head and upper torso" }, "overall_aesthetic": { "mood": "calm, intimate", "style": "editorial portrait photography", "visual_cleanliness": "high", "artifacts": "none visible", "post_processing": "minimal, natural color grading" } }"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "portrait", "generation_quality": "8K ultra-high resolution", "realism_level": "photorealistic", "subject": { "human_presence": true, "gender_presentation": "feminine", "age_appearance": "young adult", "visible_pose": { "head_position": "slightly tilted", "hand_position": "one hand raised touching hair near the side of the head", "shoulder_visibility": "upper torso visible" }, "facial_expression": { "mouth": "slightly parted lips", "expression": "neutral to soft, relaxed", "gaze_direction": "looking directly toward the camera" } }, "face_details": { "face_shape": "oval", "skin_texture": "smooth with visible natural skin texture", "skin_finish": "soft matte with subtle highlights", "cheeks": "natural blush visible", "nose": { "shape": "straight", "size": "medium", "tip": "softly rounded" }, "lips": { "shape": "full", "color": "muted warm rose / nude", "texture": "matte finish" }, "jawline": "softly defined", "chin": "rounded" }, "eyes": { "shape": "almond-shaped", "eye_color": "appears green or hazel under lighting", "eyelids": "natural crease visible", "lashes": "natural, not exaggerated", "eyebrows": { "shape": "well-groomed, natural arch", "density": "medium-full", "color": "dark brown" } }, "hair": { "color": "medium to dark brown", "length": "short to medium", "texture": "wavy", "style": "loose, slightly tousled", "parting": "off-center", "movement": "some strands falling across the forehead and partially covering one eye", "shine": "natural sheen visible" }, "makeup": { "foundation": "natural, skin-like", "blush": "soft peach-pink", "lip_product": "matte lipstick", "eye_makeup": "minimal, natural enhancement", "overall_style": "clean, understated, realistic" }, "clothing": { "garment_type": "button-up shirt", "fit": "relaxed fit", "fabric_appearance": "lightweight fabric", "pattern": "abstract floral or ornamental pattern", "color_palette": { "primary": "dark navy or charcoal", "secondary": "off-white or light beige" }, "buttons": { "visibility": "visible", "color": "light neutral" }, "collar": "standard pointed collar" }, "lighting": { "type": "natural light", "direction": "side lighting", "contrast": "soft to medium contrast", "highlights": "gentle highlights on cheekbones, nose, and lips", "shadows": "soft shadows adding depth to facial contours" }, "background": { "type": "out-of-focus", "style": "minimal, neutral", "colors": "dark gray and muted tones", "depth_of_field": "shallow", "distractions": "none visible" }, "camera_and_composition": { "framing": "close-up portrait", "angle": "eye-level", "focus": "sharp focus on face", "bokeh": "soft background blur", "crop": "head and upper torso" }, "overall_aesthetic": { "mood": "calm, intimate", "style": "editorial portrait photography", "visual_cleanliness": "high", "artifacts": "none visible", "post_processing": "minimal, natural color grading" } }"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "portrait", "generation_quality": "8K ultra-high resolution", "realism_level": "photorealistic", "subject": { "human_presence": true, "gender_presentation": "feminine", "age_appearance": "young adult", "visible_pose": { "head_position": "slightly tilted", "hand_position": "one hand raised touching hair near the side of the head", "shoulder_visibility": "upper torso visible" }, "facial_expression": { "mouth": "slightly parted lips", "expression": "neutral to soft, relaxed", "gaze_direction": "looking directly toward the camera" } }, "face_details": { "face_shape": "oval", "skin_texture": "smooth with visible natural skin texture", "skin_finish": "soft matte with subtle highlights", "cheeks": "natural blush visible", "nose": { "shape": "straight", "size": "medium", "tip": "softly rounded" }, "lips": { "shape": "full", "color": "muted warm rose / nude", "texture": "matte finish" }, "jawline": "softly defined", "chin": "rounded" }, "eyes": { "shape": "almond-shaped", "eye_color": "appears green or hazel under lighting", "eyelids": "natural crease visible", "lashes": "natural, not exaggerated", "eyebrows": { "shape": "well-groomed, natural arch", "density": "medium-full", "color": "dark brown" } }, "hair": { "color": "medium to dark brown", "length": "short to medium", "texture": "wavy", "style": "loose, slightly tousled", "parting": "off-center", "movement": "some strands falling across the forehead and partially covering one eye", "shine": "natural sheen visible" }, "makeup": { "foundation": "natural, skin-like", "blush": "soft peach-pink", "lip_product": "matte lipstick", "eye_makeup": "minimal, natural enhancement", "overall_style": "clean, understated, realistic" }, "clothing": { "garment_type": "button-up shirt", "fit": "relaxed fit", "fabric_appearance": "lightweight fabric", "pattern": "abstract floral or ornamental pattern", "color_palette": { "primary": "dark navy or charcoal", "secondary": "off-white or light beige" }, "buttons": { "visibility": "visible", "color": "light neutral" }, "collar": "standard pointed collar" }, "lighting": { "type": "natural light", "direction": "side lighting", "contrast": "soft to medium contrast", "highlights": "gentle highlights on cheekbones, nose, and lips", "shadows": "soft shadows adding depth to facial contours" }, "background": { "type": "out-of-focus", "style": "minimal, neutral", "colors": "dark gray and muted tones", "depth_of_field": "shallow", "distractions": "none visible" }, "camera_and_composition": { "framing": "close-up portrait", "angle": "eye-level", "focus": "sharp focus on face", "bokeh": "soft background blur", "crop": "head and upper torso" }, "overall_aesthetic": { "mood": "calm, intimate", "style": "editorial portrait photography", "visual_cleanliness": "high", "artifacts": "none visible", "post_processing": "minimal, natural color grading" } }"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "portrait", "generation_quality": "8K ultra-high resolution", "realism_level": "photorealistic", "subject": { "human_presence": true, "gender_presentation": "feminine", "age_appearance": "young adult", "visible_pose": { "head_position": "slightly tilted", "hand_position": "one hand raised touching hair near the side of the head", "shoulder_visibility": "upper torso visible" }, "facial_expression": { "mouth": "slightly parted lips", "expression": "neutral to soft, relaxed", "gaze_direction": "looking directly toward the camera" } }, "face_details": { "face_shape": "oval", "skin_texture": "smooth with visible natural skin texture", "skin_finish": "soft matte with subtle highlights", "cheeks": "natural blush visible", "nose": { "shape": "straight", "size": "medium", "tip": "softly rounded" }, "lips": { "shape": "full", "color": "muted warm rose / nude", "texture": "matte finish" }, "jawline": "softly defined", "chin": "rounded" }, "eyes": { "shape": "almond-shaped", "eye_color": "appears green or hazel under lighting", "eyelids": "natural crease visible", "lashes": "natural, not exaggerated", "eyebrows": { "shape": "well-groomed, natural arch", "density": "medium-full", "color": "dark brown" } }, "hair": { "color": "medium to dark brown", "length": "short to medium", "texture": "wavy", "style": "loose, slightly tousled", "parting": "off-center", "movement": "some strands falling across the forehead and partially covering one eye", "shine": "natural sheen visible" }, "makeup": { "foundation": "natural, skin-like", "blush": "soft peach-pink", "lip_product": "matte lipstick", "eye_makeup": "minimal, natural enhancement", "overall_style": "clean, understated, realistic" }, "clothing": { "garment_type": "button-up shirt", "fit": "relaxed fit", "fabric_appearance": "lightweight fabric", "pattern": "abstract floral or ornamental pattern", "color_palette": { "primary": "dark navy or charcoal", "secondary": "off-white or light beige" }, "buttons": { "visibility": "visible", "color": "light neutral" }, "collar": "standard pointed collar" }, "lighting": { "type": "natural light", "direction": "side lighting", "contrast": "soft to medium contrast", "highlights": "gentle highlights on cheekbones, nose, and lips", "shadows": "soft shadows adding depth to facial contours" }, "background": { "type": "out-of-focus", "style": "minimal, neutral", "colors": "dark gray and muted tones", "depth_of_field": "shallow", "distractions": "none visible" }, "camera_and_composition": { "framing": "close-up portrait", "angle": "eye-level", "focus": "sharp focus on face", "bokeh": "soft background blur", "crop": "head and upper torso" }, "overall_aesthetic": { "mood": "calm, intimate", "style": "editorial portrait photography", "visual_cleanliness": "high", "artifacts": "none visible", "post_processing": "minimal, natural color grading" } }"
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\": \"portrait\", \"generation_quality\": \"8K ultra-high resolution\", \"realism_level\": \"photorealistic\", \"subject\": { \"human_presence\": true, \"gender_presentation\": \"feminine\", \"age_appearance\": \"young adult\", \"visible_pose\": { \"head_position\": \"slightly tilted\", \"hand_position\": \"one hand raised touching hair near the side of the head\", \"shoulder_visibility\": \"upper torso visible\" }, \"facial_expression\": { \"mouth\": \"slightly parted lips\", \"expression\": \"neutral to soft, relaxed\", \"gaze_direction\": \"looking directly toward the camera\" } }, \"face_details\": { \"face_shape\": \"oval\", \"skin_texture\": \"smooth with visible natural skin texture\", \"skin_finish\": \"soft matte with subtle highlights\", \"cheeks\": \"natural blush visible\", \"nose\": { \"shape\": \"straight\", \"size\": \"medium\", \"tip\": \"softly rounded\" }, \"lips\": { \"shape\": \"full\", \"color\": \"muted warm rose / nude\", \"texture\": \"matte finish\" }, \"jawline\": \"softly defined\", \"chin\": \"rounded\" }, \"eyes\": { \"shape\": \"almond-shaped\", \"eye_color\": \"appears green or hazel under lighting\", \"eyelids\": \"natural crease visible\", \"lashes\": \"natural, not exaggerated\", \"eyebrows\": { \"shape\": \"well-groomed, natural arch\", \"density\": \"medium-full\", \"color\": \"dark brown\" } }, \"hair\": { \"color\": \"medium to dark brown\", \"length\": \"short to medium\", \"texture\": \"wavy\", \"style\": \"loose, slightly tousled\", \"parting\": \"off-center\", \"movement\": \"some strands falling across the forehead and partially covering one eye\", \"shine\": \"natural sheen visible\" }, \"makeup\": { \"foundation\": \"natural, skin-like\", \"blush\": \"soft peach-pink\", \"lip_product\": \"matte lipstick\", \"eye_makeup\": \"minimal, natural enhancement\", \"overall_style\": \"clean, understated, realistic\" }, \"clothing\": { \"garment_type\": \"button-up shirt\", \"fit\": \"relaxed fit\", \"fabric_appearance\": \"lightweight fabric\", \"pattern\": \"abstract floral or ornamental pattern\", \"color_palette\": { \"primary\": \"dark navy or charcoal\", \"secondary\": \"off-white or light beige\" }, \"buttons\": { \"visibility\": \"visible\", \"color\": \"light neutral\" }, \"collar\": \"standard pointed collar\" }, \"lighting\": { \"type\": \"natural light\", \"direction\": \"side lighting\", \"contrast\": \"soft to medium contrast\", \"highlights\": \"gentle highlights on cheekbones, nose, and lips\", \"shadows\": \"soft shadows adding depth to facial contours\" }, \"background\": { \"type\": \"out-of-focus\", \"style\": \"minimal, neutral\", \"colors\": \"dark gray and muted tones\", \"depth_of_field\": \"shallow\", \"distractions\": \"none visible\" }, \"camera_and_composition\": { \"framing\": \"close-up portrait\", \"angle\": \"eye-level\", \"focus\": \"sharp focus on face\", \"bokeh\": \"soft background blur\", \"crop\": \"head and upper torso\" }, \"overall_aesthetic\": { \"mood\": \"calm, intimate\", \"style\": \"editorial portrait photography\", \"visual_cleanliness\": \"high\", \"artifacts\": \"none visible\", \"post_processing\": \"minimal, natural color grading\" } }"
}
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\": \"portrait\", \"generation_quality\": \"8K ultra-high resolution\", \"realism_level\": \"photorealistic\", \"subject\": { \"human_presence\": true, \"gender_presentation\": \"feminine\", \"age_appearance\": \"young adult\", \"visible_pose\": { \"head_position\": \"slightly tilted\", \"hand_position\": \"one hand raised touching hair near the side of the head\", \"shoulder_visibility\": \"upper torso visible\" }, \"facial_expression\": { \"mouth\": \"slightly parted lips\", \"expression\": \"neutral to soft, relaxed\", \"gaze_direction\": \"looking directly toward the camera\" } }, \"face_details\": { \"face_shape\": \"oval\", \"skin_texture\": \"smooth with visible natural skin texture\", \"skin_finish\": \"soft matte with subtle highlights\", \"cheeks\": \"natural blush visible\", \"nose\": { \"shape\": \"straight\", \"size\": \"medium\", \"tip\": \"softly rounded\" }, \"lips\": { \"shape\": \"full\", \"color\": \"muted warm rose / nude\", \"texture\": \"matte finish\" }, \"jawline\": \"softly defined\", \"chin\": \"rounded\" }, \"eyes\": { \"shape\": \"almond-shaped\", \"eye_color\": \"appears green or hazel under lighting\", \"eyelids\": \"natural crease visible\", \"lashes\": \"natural, not exaggerated\", \"eyebrows\": { \"shape\": \"well-groomed, natural arch\", \"density\": \"medium-full\", \"color\": \"dark brown\" } }, \"hair\": { \"color\": \"medium to dark brown\", \"length\": \"short to medium\", \"texture\": \"wavy\", \"style\": \"loose, slightly tousled\", \"parting\": \"off-center\", \"movement\": \"some strands falling across the forehead and partially covering one eye\", \"shine\": \"natural sheen visible\" }, \"makeup\": { \"foundation\": \"natural, skin-like\", \"blush\": \"soft peach-pink\", \"lip_product\": \"matte lipstick\", \"eye_makeup\": \"minimal, natural enhancement\", \"overall_style\": \"clean, understated, realistic\" }, \"clothing\": { \"garment_type\": \"button-up shirt\", \"fit\": \"relaxed fit\", \"fabric_appearance\": \"lightweight fabric\", \"pattern\": \"abstract floral or ornamental pattern\", \"color_palette\": { \"primary\": \"dark navy or charcoal\", \"secondary\": \"off-white or light beige\" }, \"buttons\": { \"visibility\": \"visible\", \"color\": \"light neutral\" }, \"collar\": \"standard pointed collar\" }, \"lighting\": { \"type\": \"natural light\", \"direction\": \"side lighting\", \"contrast\": \"soft to medium contrast\", \"highlights\": \"gentle highlights on cheekbones, nose, and lips\", \"shadows\": \"soft shadows adding depth to facial contours\" }, \"background\": { \"type\": \"out-of-focus\", \"style\": \"minimal, neutral\", \"colors\": \"dark gray and muted tones\", \"depth_of_field\": \"shallow\", \"distractions\": \"none visible\" }, \"camera_and_composition\": { \"framing\": \"close-up portrait\", \"angle\": \"eye-level\", \"focus\": \"sharp focus on face\", \"bokeh\": \"soft background blur\", \"crop\": \"head and upper torso\" }, \"overall_aesthetic\": { \"mood\": \"calm, intimate\", \"style\": \"editorial portrait photography\", \"visual_cleanliness\": \"high\", \"artifacts\": \"none visible\", \"post_processing\": \"minimal, natural color grading\" } }"
});
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\": \"portrait\", \"generation_quality\": \"8K ultra-high resolution\", \"realism_level\": \"photorealistic\", \"subject\": { \"human_presence\": true, \"gender_presentation\": \"feminine\", \"age_appearance\": \"young adult\", \"visible_pose\": { \"head_position\": \"slightly tilted\", \"hand_position\": \"one hand raised touching hair near the side of the head\", \"shoulder_visibility\": \"upper torso visible\" }, \"facial_expression\": { \"mouth\": \"slightly parted lips\", \"expression\": \"neutral to soft, relaxed\", \"gaze_direction\": \"looking directly toward the camera\" } }, \"face_details\": { \"face_shape\": \"oval\", \"skin_texture\": \"smooth with visible natural skin texture\", \"skin_finish\": \"soft matte with subtle highlights\", \"cheeks\": \"natural blush visible\", \"nose\": { \"shape\": \"straight\", \"size\": \"medium\", \"tip\": \"softly rounded\" }, \"lips\": { \"shape\": \"full\", \"color\": \"muted warm rose / nude\", \"texture\": \"matte finish\" }, \"jawline\": \"softly defined\", \"chin\": \"rounded\" }, \"eyes\": { \"shape\": \"almond-shaped\", \"eye_color\": \"appears green or hazel under lighting\", \"eyelids\": \"natural crease visible\", \"lashes\": \"natural, not exaggerated\", \"eyebrows\": { \"shape\": \"well-groomed, natural arch\", \"density\": \"medium-full\", \"color\": \"dark brown\" } }, \"hair\": { \"color\": \"medium to dark brown\", \"length\": \"short to medium\", \"texture\": \"wavy\", \"style\": \"loose, slightly tousled\", \"parting\": \"off-center\", \"movement\": \"some strands falling across the forehead and partially covering one eye\", \"shine\": \"natural sheen visible\" }, \"makeup\": { \"foundation\": \"natural, skin-like\", \"blush\": \"soft peach-pink\", \"lip_product\": \"matte lipstick\", \"eye_makeup\": \"minimal, natural enhancement\", \"overall_style\": \"clean, understated, realistic\" }, \"clothing\": { \"garment_type\": \"button-up shirt\", \"fit\": \"relaxed fit\", \"fabric_appearance\": \"lightweight fabric\", \"pattern\": \"abstract floral or ornamental pattern\", \"color_palette\": { \"primary\": \"dark navy or charcoal\", \"secondary\": \"off-white or light beige\" }, \"buttons\": { \"visibility\": \"visible\", \"color\": \"light neutral\" }, \"collar\": \"standard pointed collar\" }, \"lighting\": { \"type\": \"natural light\", \"direction\": \"side lighting\", \"contrast\": \"soft to medium contrast\", \"highlights\": \"gentle highlights on cheekbones, nose, and lips\", \"shadows\": \"soft shadows adding depth to facial contours\" }, \"background\": { \"type\": \"out-of-focus\", \"style\": \"minimal, neutral\", \"colors\": \"dark gray and muted tones\", \"depth_of_field\": \"shallow\", \"distractions\": \"none visible\" }, \"camera_and_composition\": { \"framing\": \"close-up portrait\", \"angle\": \"eye-level\", \"focus\": \"sharp focus on face\", \"bokeh\": \"soft background blur\", \"crop\": \"head and upper torso\" }, \"overall_aesthetic\": { \"mood\": \"calm, intimate\", \"style\": \"editorial portrait photography\", \"visual_cleanliness\": \"high\", \"artifacts\": \"none visible\", \"post_processing\": \"minimal, natural color grading\" } }"
)
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\\\": \\\"portrait\\\", \\\"generation_quality\\\": \\\"8K ultra-high resolution\\\", \\\"realism_level\\\": \\\"photorealistic\\\", \\\"subject\\\": { \\\"human_presence\\\": true, \\\"gender_presentation\\\": \\\"feminine\\\", \\\"age_appearance\\\": \\\"young adult\\\", \\\"visible_pose\\\": { \\\"head_position\\\": \\\"slightly tilted\\\", \\\"hand_position\\\": \\\"one hand raised touching hair near the side of the head\\\", \\\"shoulder_visibility\\\": \\\"upper torso visible\\\" }, \\\"facial_expression\\\": { \\\"mouth\\\": \\\"slightly parted lips\\\", \\\"expression\\\": \\\"neutral to soft, relaxed\\\", \\\"gaze_direction\\\": \\\"looking directly toward the camera\\\" } }, \\\"face_details\\\": { \\\"face_shape\\\": \\\"oval\\\", \\\"skin_texture\\\": \\\"smooth with visible natural skin texture\\\", \\\"skin_finish\\\": \\\"soft matte with subtle highlights\\\", \\\"cheeks\\\": \\\"natural blush visible\\\", \\\"nose\\\": { \\\"shape\\\": \\\"straight\\\", \\\"size\\\": \\\"medium\\\", \\\"tip\\\": \\\"softly rounded\\\" }, \\\"lips\\\": { \\\"shape\\\": \\\"full\\\", \\\"color\\\": \\\"muted warm rose / nude\\\", \\\"texture\\\": \\\"matte finish\\\" }, \\\"jawline\\\": \\\"softly defined\\\", \\\"chin\\\": \\\"rounded\\\" }, \\\"eyes\\\": { \\\"shape\\\": \\\"almond-shaped\\\", \\\"eye_color\\\": \\\"appears green or hazel under lighting\\\", \\\"eyelids\\\": \\\"natural crease visible\\\", \\\"lashes\\\": \\\"natural, not exaggerated\\\", \\\"eyebrows\\\": { \\\"shape\\\": \\\"well-groomed, natural arch\\\", \\\"density\\\": \\\"medium-full\\\", \\\"color\\\": \\\"dark brown\\\" } }, \\\"hair\\\": { \\\"color\\\": \\\"medium to dark brown\\\", \\\"length\\\": \\\"short to medium\\\", \\\"texture\\\": \\\"wavy\\\", \\\"style\\\": \\\"loose, slightly tousled\\\", \\\"parting\\\": \\\"off-center\\\", \\\"movement\\\": \\\"some strands falling across the forehead and partially covering one eye\\\", \\\"shine\\\": \\\"natural sheen visible\\\" }, \\\"makeup\\\": { \\\"foundation\\\": \\\"natural, skin-like\\\", \\\"blush\\\": \\\"soft peach-pink\\\", \\\"lip_product\\\": \\\"matte lipstick\\\", \\\"eye_makeup\\\": \\\"minimal, natural enhancement\\\", \\\"overall_style\\\": \\\"clean, understated, realistic\\\" }, \\\"clothing\\\": { \\\"garment_type\\\": \\\"button-up shirt\\\", \\\"fit\\\": \\\"relaxed fit\\\", \\\"fabric_appearance\\\": \\\"lightweight fabric\\\", \\\"pattern\\\": \\\"abstract floral or ornamental pattern\\\", \\\"color_palette\\\": { \\\"primary\\\": \\\"dark navy or charcoal\\\", \\\"secondary\\\": \\\"off-white or light beige\\\" }, \\\"buttons\\\": { \\\"visibility\\\": \\\"visible\\\", \\\"color\\\": \\\"light neutral\\\" }, \\\"collar\\\": \\\"standard pointed collar\\\" }, \\\"lighting\\\": { \\\"type\\\": \\\"natural light\\\", \\\"direction\\\": \\\"side lighting\\\", \\\"contrast\\\": \\\"soft to medium contrast\\\", \\\"highlights\\\": \\\"gentle highlights on cheekbones, nose, and lips\\\", \\\"shadows\\\": \\\"soft shadows adding depth to facial contours\\\" }, \\\"background\\\": { \\\"type\\\": \\\"out-of-focus\\\", \\\"style\\\": \\\"minimal, neutral\\\", \\\"colors\\\": \\\"dark gray and muted tones\\\", \\\"depth_of_field\\\": \\\"shallow\\\", \\\"distractions\\\": \\\"none visible\\\" }, \\\"camera_and_composition\\\": { \\\"framing\\\": \\\"close-up portrait\\\", \\\"angle\\\": \\\"eye-level\\\", \\\"focus\\\": \\\"sharp focus on face\\\", \\\"bokeh\\\": \\\"soft background blur\\\", \\\"crop\\\": \\\"head and upper torso\\\" }, \\\"overall_aesthetic\\\": { \\\"mood\\\": \\\"calm, intimate\\\", \\\"style\\\": \\\"editorial portrait photography\\\", \\\"visual_cleanliness\\\": \\\"high\\\", \\\"artifacts\\\": \\\"none visible\\\", \\\"post_processing\\\": \\\"minimal, natural color grading\\\" } }\"}")
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)
}