复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "fashion portrait photography", "resolution_target": "8K Ultra HD", "aspect_ratio": "vertical (portrait)", "composition": { "framing": "medium close-up portrait", "crop": "from upper chest to slightly above head", "subject_position": "centered", "camera_angle": "low angle, slightly upward-facing", "perspective": "dramatic upward perspective emphasizing neck and jawline", "depth_of_field": "shallow depth of field with soft background blur" }, "subject": { "gender_presentation": "female-presenting", "age_range": "young adult", "skin_tone": "fair/light", "pose": { "head_position": "tilted slightly back", "chin": "raised upward", "shoulders": "relaxed, facing forward" }, "facial_expression": { "eyes": "closed", "mouth": "slightly parted", "expression_mood": "calm, confident, introspective" }, "face_details": { "face_shape": "oval", "jawline": "soft but defined", "cheekbones": "subtly defined", "skin_texture": "smooth, evenly lit" } }, "hair": { "color": "reddish-brown / auburn", "length": "medium", "style": "loosely styled with soft waves", "texture": "slightly tousled", "flyaways": "visible loose strands around head and neck" }, "eyewear": { "type": "eyeglasses", "frame_style": "rounded", "frame_material_appearance": "translucent", "frame_color": "light amber / peach-tinted", "lens": "clear" }, "makeup": { "lip_color": "deep pink / rose", "lip_finish": "glossy", "eye_makeup": "subtle, warm-toned", "overall_style": "natural with emphasis on lips" }, "accessories": { "earrings": { "type": "dangling earrings", "material_appearance": "metallic", "design": "intricate, elongated" }, "necklace": { "type": "chain necklace", "pendant": "ornamental pendant", "material_appearance": "gold-toned metal" } }, "clothing": { "garment_type": "tailored jacket or dress with lapels", "neckline": "deep V-neck", "fit": "structured yet flowing", "fabric_texture": "smooth, slightly reflective", "pattern": "vertical multicolored stripes", "colors": [ "orange", "red", "green", "teal", "yellow" ], "buttons": "visible front button at mid-torso" }, "lighting": { "type": "studio lighting", "direction": "soft frontal with slight side emphasis", "contrast": "moderate", "highlights": "gentle highlights on face and glasses", "shadows": "soft shadows under chin and neck" }, "background": { "environment": "studio setup", "elements": "colored smoke or mist", "color_palette": [ "pink", "coral", "peach", "soft green" ], "background_style": "abstract, atmospheric" }, "atmosphere": { "mood": "cinematic, fashion-forward", "visual_effects": "floating colored smoke surrounding subject", "clarity": "subject sharp, background diffused" }, "color_grading": { "tone": "warm", "saturation": "rich but balanced", "overall_palette": "harmonized warm and pastel tones" }, "image_quality": { "sharpness": "high detail on facial features, clothing texture, accessories", "noise": "none visible", "finish": "clean, professional, editorial-grade" } }"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "fashion portrait photography", "resolution_target": "8K Ultra HD", "aspect_ratio": "vertical (portrait)", "composition": { "framing": "medium close-up portrait", "crop": "from upper chest to slightly above head", "subject_position": "centered", "camera_angle": "low angle, slightly upward-facing", "perspective": "dramatic upward perspective emphasizing neck and jawline", "depth_of_field": "shallow depth of field with soft background blur" }, "subject": { "gender_presentation": "female-presenting", "age_range": "young adult", "skin_tone": "fair/light", "pose": { "head_position": "tilted slightly back", "chin": "raised upward", "shoulders": "relaxed, facing forward" }, "facial_expression": { "eyes": "closed", "mouth": "slightly parted", "expression_mood": "calm, confident, introspective" }, "face_details": { "face_shape": "oval", "jawline": "soft but defined", "cheekbones": "subtly defined", "skin_texture": "smooth, evenly lit" } }, "hair": { "color": "reddish-brown / auburn", "length": "medium", "style": "loosely styled with soft waves", "texture": "slightly tousled", "flyaways": "visible loose strands around head and neck" }, "eyewear": { "type": "eyeglasses", "frame_style": "rounded", "frame_material_appearance": "translucent", "frame_color": "light amber / peach-tinted", "lens": "clear" }, "makeup": { "lip_color": "deep pink / rose", "lip_finish": "glossy", "eye_makeup": "subtle, warm-toned", "overall_style": "natural with emphasis on lips" }, "accessories": { "earrings": { "type": "dangling earrings", "material_appearance": "metallic", "design": "intricate, elongated" }, "necklace": { "type": "chain necklace", "pendant": "ornamental pendant", "material_appearance": "gold-toned metal" } }, "clothing": { "garment_type": "tailored jacket or dress with lapels", "neckline": "deep V-neck", "fit": "structured yet flowing", "fabric_texture": "smooth, slightly reflective", "pattern": "vertical multicolored stripes", "colors": [ "orange", "red", "green", "teal", "yellow" ], "buttons": "visible front button at mid-torso" }, "lighting": { "type": "studio lighting", "direction": "soft frontal with slight side emphasis", "contrast": "moderate", "highlights": "gentle highlights on face and glasses", "shadows": "soft shadows under chin and neck" }, "background": { "environment": "studio setup", "elements": "colored smoke or mist", "color_palette": [ "pink", "coral", "peach", "soft green" ], "background_style": "abstract, atmospheric" }, "atmosphere": { "mood": "cinematic, fashion-forward", "visual_effects": "floating colored smoke surrounding subject", "clarity": "subject sharp, background diffused" }, "color_grading": { "tone": "warm", "saturation": "rich but balanced", "overall_palette": "harmonized warm and pastel tones" }, "image_quality": { "sharpness": "high detail on facial features, clothing texture, accessories", "noise": "none visible", "finish": "clean, professional, editorial-grade" } }"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "fashion portrait photography", "resolution_target": "8K Ultra HD", "aspect_ratio": "vertical (portrait)", "composition": { "framing": "medium close-up portrait", "crop": "from upper chest to slightly above head", "subject_position": "centered", "camera_angle": "low angle, slightly upward-facing", "perspective": "dramatic upward perspective emphasizing neck and jawline", "depth_of_field": "shallow depth of field with soft background blur" }, "subject": { "gender_presentation": "female-presenting", "age_range": "young adult", "skin_tone": "fair/light", "pose": { "head_position": "tilted slightly back", "chin": "raised upward", "shoulders": "relaxed, facing forward" }, "facial_expression": { "eyes": "closed", "mouth": "slightly parted", "expression_mood": "calm, confident, introspective" }, "face_details": { "face_shape": "oval", "jawline": "soft but defined", "cheekbones": "subtly defined", "skin_texture": "smooth, evenly lit" } }, "hair": { "color": "reddish-brown / auburn", "length": "medium", "style": "loosely styled with soft waves", "texture": "slightly tousled", "flyaways": "visible loose strands around head and neck" }, "eyewear": { "type": "eyeglasses", "frame_style": "rounded", "frame_material_appearance": "translucent", "frame_color": "light amber / peach-tinted", "lens": "clear" }, "makeup": { "lip_color": "deep pink / rose", "lip_finish": "glossy", "eye_makeup": "subtle, warm-toned", "overall_style": "natural with emphasis on lips" }, "accessories": { "earrings": { "type": "dangling earrings", "material_appearance": "metallic", "design": "intricate, elongated" }, "necklace": { "type": "chain necklace", "pendant": "ornamental pendant", "material_appearance": "gold-toned metal" } }, "clothing": { "garment_type": "tailored jacket or dress with lapels", "neckline": "deep V-neck", "fit": "structured yet flowing", "fabric_texture": "smooth, slightly reflective", "pattern": "vertical multicolored stripes", "colors": [ "orange", "red", "green", "teal", "yellow" ], "buttons": "visible front button at mid-torso" }, "lighting": { "type": "studio lighting", "direction": "soft frontal with slight side emphasis", "contrast": "moderate", "highlights": "gentle highlights on face and glasses", "shadows": "soft shadows under chin and neck" }, "background": { "environment": "studio setup", "elements": "colored smoke or mist", "color_palette": [ "pink", "coral", "peach", "soft green" ], "background_style": "abstract, atmospheric" }, "atmosphere": { "mood": "cinematic, fashion-forward", "visual_effects": "floating colored smoke surrounding subject", "clarity": "subject sharp, background diffused" }, "color_grading": { "tone": "warm", "saturation": "rich but balanced", "overall_palette": "harmonized warm and pastel tones" }, "image_quality": { "sharpness": "high detail on facial features, clothing texture, accessories", "noise": "none visible", "finish": "clean, professional, editorial-grade" } }"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "image_type": "fashion portrait photography", "resolution_target": "8K Ultra HD", "aspect_ratio": "vertical (portrait)", "composition": { "framing": "medium close-up portrait", "crop": "from upper chest to slightly above head", "subject_position": "centered", "camera_angle": "low angle, slightly upward-facing", "perspective": "dramatic upward perspective emphasizing neck and jawline", "depth_of_field": "shallow depth of field with soft background blur" }, "subject": { "gender_presentation": "female-presenting", "age_range": "young adult", "skin_tone": "fair/light", "pose": { "head_position": "tilted slightly back", "chin": "raised upward", "shoulders": "relaxed, facing forward" }, "facial_expression": { "eyes": "closed", "mouth": "slightly parted", "expression_mood": "calm, confident, introspective" }, "face_details": { "face_shape": "oval", "jawline": "soft but defined", "cheekbones": "subtly defined", "skin_texture": "smooth, evenly lit" } }, "hair": { "color": "reddish-brown / auburn", "length": "medium", "style": "loosely styled with soft waves", "texture": "slightly tousled", "flyaways": "visible loose strands around head and neck" }, "eyewear": { "type": "eyeglasses", "frame_style": "rounded", "frame_material_appearance": "translucent", "frame_color": "light amber / peach-tinted", "lens": "clear" }, "makeup": { "lip_color": "deep pink / rose", "lip_finish": "glossy", "eye_makeup": "subtle, warm-toned", "overall_style": "natural with emphasis on lips" }, "accessories": { "earrings": { "type": "dangling earrings", "material_appearance": "metallic", "design": "intricate, elongated" }, "necklace": { "type": "chain necklace", "pendant": "ornamental pendant", "material_appearance": "gold-toned metal" } }, "clothing": { "garment_type": "tailored jacket or dress with lapels", "neckline": "deep V-neck", "fit": "structured yet flowing", "fabric_texture": "smooth, slightly reflective", "pattern": "vertical multicolored stripes", "colors": [ "orange", "red", "green", "teal", "yellow" ], "buttons": "visible front button at mid-torso" }, "lighting": { "type": "studio lighting", "direction": "soft frontal with slight side emphasis", "contrast": "moderate", "highlights": "gentle highlights on face and glasses", "shadows": "soft shadows under chin and neck" }, "background": { "environment": "studio setup", "elements": "colored smoke or mist", "color_palette": [ "pink", "coral", "peach", "soft green" ], "background_style": "abstract, atmospheric" }, "atmosphere": { "mood": "cinematic, fashion-forward", "visual_effects": "floating colored smoke surrounding subject", "clarity": "subject sharp, background diffused" }, "color_grading": { "tone": "warm", "saturation": "rich but balanced", "overall_palette": "harmonized warm and pastel tones" }, "image_quality": { "sharpness": "high detail on facial features, clothing texture, accessories", "noise": "none visible", "finish": "clean, professional, editorial-grade" } }"
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\": \"fashion portrait photography\", \"resolution_target\": \"8K Ultra HD\", \"aspect_ratio\": \"vertical (portrait)\", \"composition\": { \"framing\": \"medium close-up portrait\", \"crop\": \"from upper chest to slightly above head\", \"subject_position\": \"centered\", \"camera_angle\": \"low angle, slightly upward-facing\", \"perspective\": \"dramatic upward perspective emphasizing neck and jawline\", \"depth_of_field\": \"shallow depth of field with soft background blur\" }, \"subject\": { \"gender_presentation\": \"female-presenting\", \"age_range\": \"young adult\", \"skin_tone\": \"fair/light\", \"pose\": { \"head_position\": \"tilted slightly back\", \"chin\": \"raised upward\", \"shoulders\": \"relaxed, facing forward\" }, \"facial_expression\": { \"eyes\": \"closed\", \"mouth\": \"slightly parted\", \"expression_mood\": \"calm, confident, introspective\" }, \"face_details\": { \"face_shape\": \"oval\", \"jawline\": \"soft but defined\", \"cheekbones\": \"subtly defined\", \"skin_texture\": \"smooth, evenly lit\" } }, \"hair\": { \"color\": \"reddish-brown / auburn\", \"length\": \"medium\", \"style\": \"loosely styled with soft waves\", \"texture\": \"slightly tousled\", \"flyaways\": \"visible loose strands around head and neck\" }, \"eyewear\": { \"type\": \"eyeglasses\", \"frame_style\": \"rounded\", \"frame_material_appearance\": \"translucent\", \"frame_color\": \"light amber / peach-tinted\", \"lens\": \"clear\" }, \"makeup\": { \"lip_color\": \"deep pink / rose\", \"lip_finish\": \"glossy\", \"eye_makeup\": \"subtle, warm-toned\", \"overall_style\": \"natural with emphasis on lips\" }, \"accessories\": { \"earrings\": { \"type\": \"dangling earrings\", \"material_appearance\": \"metallic\", \"design\": \"intricate, elongated\" }, \"necklace\": { \"type\": \"chain necklace\", \"pendant\": \"ornamental pendant\", \"material_appearance\": \"gold-toned metal\" } }, \"clothing\": { \"garment_type\": \"tailored jacket or dress with lapels\", \"neckline\": \"deep V-neck\", \"fit\": \"structured yet flowing\", \"fabric_texture\": \"smooth, slightly reflective\", \"pattern\": \"vertical multicolored stripes\", \"colors\": [ \"orange\", \"red\", \"green\", \"teal\", \"yellow\" ], \"buttons\": \"visible front button at mid-torso\" }, \"lighting\": { \"type\": \"studio lighting\", \"direction\": \"soft frontal with slight side emphasis\", \"contrast\": \"moderate\", \"highlights\": \"gentle highlights on face and glasses\", \"shadows\": \"soft shadows under chin and neck\" }, \"background\": { \"environment\": \"studio setup\", \"elements\": \"colored smoke or mist\", \"color_palette\": [ \"pink\", \"coral\", \"peach\", \"soft green\" ], \"background_style\": \"abstract, atmospheric\" }, \"atmosphere\": { \"mood\": \"cinematic, fashion-forward\", \"visual_effects\": \"floating colored smoke surrounding subject\", \"clarity\": \"subject sharp, background diffused\" }, \"color_grading\": { \"tone\": \"warm\", \"saturation\": \"rich but balanced\", \"overall_palette\": \"harmonized warm and pastel tones\" }, \"image_quality\": { \"sharpness\": \"high detail on facial features, clothing texture, accessories\", \"noise\": \"none visible\", \"finish\": \"clean, professional, editorial-grade\" } }"
}
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\": \"fashion portrait photography\", \"resolution_target\": \"8K Ultra HD\", \"aspect_ratio\": \"vertical (portrait)\", \"composition\": { \"framing\": \"medium close-up portrait\", \"crop\": \"from upper chest to slightly above head\", \"subject_position\": \"centered\", \"camera_angle\": \"low angle, slightly upward-facing\", \"perspective\": \"dramatic upward perspective emphasizing neck and jawline\", \"depth_of_field\": \"shallow depth of field with soft background blur\" }, \"subject\": { \"gender_presentation\": \"female-presenting\", \"age_range\": \"young adult\", \"skin_tone\": \"fair/light\", \"pose\": { \"head_position\": \"tilted slightly back\", \"chin\": \"raised upward\", \"shoulders\": \"relaxed, facing forward\" }, \"facial_expression\": { \"eyes\": \"closed\", \"mouth\": \"slightly parted\", \"expression_mood\": \"calm, confident, introspective\" }, \"face_details\": { \"face_shape\": \"oval\", \"jawline\": \"soft but defined\", \"cheekbones\": \"subtly defined\", \"skin_texture\": \"smooth, evenly lit\" } }, \"hair\": { \"color\": \"reddish-brown / auburn\", \"length\": \"medium\", \"style\": \"loosely styled with soft waves\", \"texture\": \"slightly tousled\", \"flyaways\": \"visible loose strands around head and neck\" }, \"eyewear\": { \"type\": \"eyeglasses\", \"frame_style\": \"rounded\", \"frame_material_appearance\": \"translucent\", \"frame_color\": \"light amber / peach-tinted\", \"lens\": \"clear\" }, \"makeup\": { \"lip_color\": \"deep pink / rose\", \"lip_finish\": \"glossy\", \"eye_makeup\": \"subtle, warm-toned\", \"overall_style\": \"natural with emphasis on lips\" }, \"accessories\": { \"earrings\": { \"type\": \"dangling earrings\", \"material_appearance\": \"metallic\", \"design\": \"intricate, elongated\" }, \"necklace\": { \"type\": \"chain necklace\", \"pendant\": \"ornamental pendant\", \"material_appearance\": \"gold-toned metal\" } }, \"clothing\": { \"garment_type\": \"tailored jacket or dress with lapels\", \"neckline\": \"deep V-neck\", \"fit\": \"structured yet flowing\", \"fabric_texture\": \"smooth, slightly reflective\", \"pattern\": \"vertical multicolored stripes\", \"colors\": [ \"orange\", \"red\", \"green\", \"teal\", \"yellow\" ], \"buttons\": \"visible front button at mid-torso\" }, \"lighting\": { \"type\": \"studio lighting\", \"direction\": \"soft frontal with slight side emphasis\", \"contrast\": \"moderate\", \"highlights\": \"gentle highlights on face and glasses\", \"shadows\": \"soft shadows under chin and neck\" }, \"background\": { \"environment\": \"studio setup\", \"elements\": \"colored smoke or mist\", \"color_palette\": [ \"pink\", \"coral\", \"peach\", \"soft green\" ], \"background_style\": \"abstract, atmospheric\" }, \"atmosphere\": { \"mood\": \"cinematic, fashion-forward\", \"visual_effects\": \"floating colored smoke surrounding subject\", \"clarity\": \"subject sharp, background diffused\" }, \"color_grading\": { \"tone\": \"warm\", \"saturation\": \"rich but balanced\", \"overall_palette\": \"harmonized warm and pastel tones\" }, \"image_quality\": { \"sharpness\": \"high detail on facial features, clothing texture, accessories\", \"noise\": \"none visible\", \"finish\": \"clean, professional, editorial-grade\" } }"
});
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\": \"fashion portrait photography\", \"resolution_target\": \"8K Ultra HD\", \"aspect_ratio\": \"vertical (portrait)\", \"composition\": { \"framing\": \"medium close-up portrait\", \"crop\": \"from upper chest to slightly above head\", \"subject_position\": \"centered\", \"camera_angle\": \"low angle, slightly upward-facing\", \"perspective\": \"dramatic upward perspective emphasizing neck and jawline\", \"depth_of_field\": \"shallow depth of field with soft background blur\" }, \"subject\": { \"gender_presentation\": \"female-presenting\", \"age_range\": \"young adult\", \"skin_tone\": \"fair/light\", \"pose\": { \"head_position\": \"tilted slightly back\", \"chin\": \"raised upward\", \"shoulders\": \"relaxed, facing forward\" }, \"facial_expression\": { \"eyes\": \"closed\", \"mouth\": \"slightly parted\", \"expression_mood\": \"calm, confident, introspective\" }, \"face_details\": { \"face_shape\": \"oval\", \"jawline\": \"soft but defined\", \"cheekbones\": \"subtly defined\", \"skin_texture\": \"smooth, evenly lit\" } }, \"hair\": { \"color\": \"reddish-brown / auburn\", \"length\": \"medium\", \"style\": \"loosely styled with soft waves\", \"texture\": \"slightly tousled\", \"flyaways\": \"visible loose strands around head and neck\" }, \"eyewear\": { \"type\": \"eyeglasses\", \"frame_style\": \"rounded\", \"frame_material_appearance\": \"translucent\", \"frame_color\": \"light amber / peach-tinted\", \"lens\": \"clear\" }, \"makeup\": { \"lip_color\": \"deep pink / rose\", \"lip_finish\": \"glossy\", \"eye_makeup\": \"subtle, warm-toned\", \"overall_style\": \"natural with emphasis on lips\" }, \"accessories\": { \"earrings\": { \"type\": \"dangling earrings\", \"material_appearance\": \"metallic\", \"design\": \"intricate, elongated\" }, \"necklace\": { \"type\": \"chain necklace\", \"pendant\": \"ornamental pendant\", \"material_appearance\": \"gold-toned metal\" } }, \"clothing\": { \"garment_type\": \"tailored jacket or dress with lapels\", \"neckline\": \"deep V-neck\", \"fit\": \"structured yet flowing\", \"fabric_texture\": \"smooth, slightly reflective\", \"pattern\": \"vertical multicolored stripes\", \"colors\": [ \"orange\", \"red\", \"green\", \"teal\", \"yellow\" ], \"buttons\": \"visible front button at mid-torso\" }, \"lighting\": { \"type\": \"studio lighting\", \"direction\": \"soft frontal with slight side emphasis\", \"contrast\": \"moderate\", \"highlights\": \"gentle highlights on face and glasses\", \"shadows\": \"soft shadows under chin and neck\" }, \"background\": { \"environment\": \"studio setup\", \"elements\": \"colored smoke or mist\", \"color_palette\": [ \"pink\", \"coral\", \"peach\", \"soft green\" ], \"background_style\": \"abstract, atmospheric\" }, \"atmosphere\": { \"mood\": \"cinematic, fashion-forward\", \"visual_effects\": \"floating colored smoke surrounding subject\", \"clarity\": \"subject sharp, background diffused\" }, \"color_grading\": { \"tone\": \"warm\", \"saturation\": \"rich but balanced\", \"overall_palette\": \"harmonized warm and pastel tones\" }, \"image_quality\": { \"sharpness\": \"high detail on facial features, clothing texture, accessories\", \"noise\": \"none visible\", \"finish\": \"clean, professional, editorial-grade\" } }"
)
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\\\": \\\"fashion portrait photography\\\", \\\"resolution_target\\\": \\\"8K Ultra HD\\\", \\\"aspect_ratio\\\": \\\"vertical (portrait)\\\", \\\"composition\\\": { \\\"framing\\\": \\\"medium close-up portrait\\\", \\\"crop\\\": \\\"from upper chest to slightly above head\\\", \\\"subject_position\\\": \\\"centered\\\", \\\"camera_angle\\\": \\\"low angle, slightly upward-facing\\\", \\\"perspective\\\": \\\"dramatic upward perspective emphasizing neck and jawline\\\", \\\"depth_of_field\\\": \\\"shallow depth of field with soft background blur\\\" }, \\\"subject\\\": { \\\"gender_presentation\\\": \\\"female-presenting\\\", \\\"age_range\\\": \\\"young adult\\\", \\\"skin_tone\\\": \\\"fair/light\\\", \\\"pose\\\": { \\\"head_position\\\": \\\"tilted slightly back\\\", \\\"chin\\\": \\\"raised upward\\\", \\\"shoulders\\\": \\\"relaxed, facing forward\\\" }, \\\"facial_expression\\\": { \\\"eyes\\\": \\\"closed\\\", \\\"mouth\\\": \\\"slightly parted\\\", \\\"expression_mood\\\": \\\"calm, confident, introspective\\\" }, \\\"face_details\\\": { \\\"face_shape\\\": \\\"oval\\\", \\\"jawline\\\": \\\"soft but defined\\\", \\\"cheekbones\\\": \\\"subtly defined\\\", \\\"skin_texture\\\": \\\"smooth, evenly lit\\\" } }, \\\"hair\\\": { \\\"color\\\": \\\"reddish-brown / auburn\\\", \\\"length\\\": \\\"medium\\\", \\\"style\\\": \\\"loosely styled with soft waves\\\", \\\"texture\\\": \\\"slightly tousled\\\", \\\"flyaways\\\": \\\"visible loose strands around head and neck\\\" }, \\\"eyewear\\\": { \\\"type\\\": \\\"eyeglasses\\\", \\\"frame_style\\\": \\\"rounded\\\", \\\"frame_material_appearance\\\": \\\"translucent\\\", \\\"frame_color\\\": \\\"light amber / peach-tinted\\\", \\\"lens\\\": \\\"clear\\\" }, \\\"makeup\\\": { \\\"lip_color\\\": \\\"deep pink / rose\\\", \\\"lip_finish\\\": \\\"glossy\\\", \\\"eye_makeup\\\": \\\"subtle, warm-toned\\\", \\\"overall_style\\\": \\\"natural with emphasis on lips\\\" }, \\\"accessories\\\": { \\\"earrings\\\": { \\\"type\\\": \\\"dangling earrings\\\", \\\"material_appearance\\\": \\\"metallic\\\", \\\"design\\\": \\\"intricate, elongated\\\" }, \\\"necklace\\\": { \\\"type\\\": \\\"chain necklace\\\", \\\"pendant\\\": \\\"ornamental pendant\\\", \\\"material_appearance\\\": \\\"gold-toned metal\\\" } }, \\\"clothing\\\": { \\\"garment_type\\\": \\\"tailored jacket or dress with lapels\\\", \\\"neckline\\\": \\\"deep V-neck\\\", \\\"fit\\\": \\\"structured yet flowing\\\", \\\"fabric_texture\\\": \\\"smooth, slightly reflective\\\", \\\"pattern\\\": \\\"vertical multicolored stripes\\\", \\\"colors\\\": [ \\\"orange\\\", \\\"red\\\", \\\"green\\\", \\\"teal\\\", \\\"yellow\\\" ], \\\"buttons\\\": \\\"visible front button at mid-torso\\\" }, \\\"lighting\\\": { \\\"type\\\": \\\"studio lighting\\\", \\\"direction\\\": \\\"soft frontal with slight side emphasis\\\", \\\"contrast\\\": \\\"moderate\\\", \\\"highlights\\\": \\\"gentle highlights on face and glasses\\\", \\\"shadows\\\": \\\"soft shadows under chin and neck\\\" }, \\\"background\\\": { \\\"environment\\\": \\\"studio setup\\\", \\\"elements\\\": \\\"colored smoke or mist\\\", \\\"color_palette\\\": [ \\\"pink\\\", \\\"coral\\\", \\\"peach\\\", \\\"soft green\\\" ], \\\"background_style\\\": \\\"abstract, atmospheric\\\" }, \\\"atmosphere\\\": { \\\"mood\\\": \\\"cinematic, fashion-forward\\\", \\\"visual_effects\\\": \\\"floating colored smoke surrounding subject\\\", \\\"clarity\\\": \\\"subject sharp, background diffused\\\" }, \\\"color_grading\\\": { \\\"tone\\\": \\\"warm\\\", \\\"saturation\\\": \\\"rich but balanced\\\", \\\"overall_palette\\\": \\\"harmonized warm and pastel tones\\\" }, \\\"image_quality\\\": { \\\"sharpness\\\": \\\"high detail on facial features, clothing texture, accessories\\\", \\\"noise\\\": \\\"none visible\\\", \\\"finish\\\": \\\"clean, professional, editorial-grade\\\" } }\"}")
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)
}