复制
1. claude mcp add runapi -s user -- npx -y @runapi.ai/mcp
2. 重启 Claude Code
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "quality": "ultra-high definition", "aspect_ratio": "2:3", "render_style": "AI-edited, high-detail 3D render", "lighting_quality": "soft studio lighting with realistic shadows", "sharpness": "extreme clarity, crisp edges", "noise": "none", "compression": "none" }, "Module_1_Image_1_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "standing, body slightly angled, one hand raised with index finger touching lips", "expression": "cheerful smile, wide eyes", "hair": { "color": "black", "style": "two braided pigtails", "accessories": "green cap" }, "face": { "eyes": "large, rounded, dark pupils", "skin": "smooth, matte, stylized texture" } }, "clothing": { "top": "sleeveless green crop top", "bottom": "loose green jogger-style pants with drawstring", "footwear": "white sneakers" }, "accessories": { "luggage": "green hard-shell suitcase with extended handle" }, "color_palette": [ "multiple shades of green", "white accents" ], "background": { "color": "solid green", "texture": "soft, slightly grainy studio backdrop" }, "composition": { "framing": "full body", "camera_angle": "eye-level", "depth": "subject sharply separated from background" } }, "Module_2_Image_2_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "leaning slightly backward against background", "expression": "playful, lips slightly pursed, eyes looking sideways", "hair": { "color": "brown", "style": "short, tousled", "accessories": "red sunglasses resting on head" } }, "clothing": { "dress": "form-fitting blue ribbed dress with thin straps", "footwear": "red high-heel sandals with bow detail" }, "color_palette": [ "bold red", "deep blue" ], "background": { "color": "solid red", "texture": "smooth matte surface" }, "lighting": { "direction": "soft directional light from one side", "shadow": "defined shadow cast on red background" }, "composition": { "framing": "full body", "pose_emphasis": "curved posture, crossed legs" } }, "Module_3_Image_3_Style": { "subject": { "characters": [ { "type": "stylized 3D cartoon female", "position": "left", "wrapped_in": "red textured blanket", "expression": "calm, slight smile, eyes looking upward" }, { "type": "stylized 3D cartoon male", "position": "right", "wrapped_in": "orange textured blanket", "expression": "neutral, gentle gaze upward" } ] }, "environment": { "furniture": "red sofa", "floor": "red surface", "background": { "color": "deep red", "texture": "fabric-like horizontal texture" } }, "details": { "feet": "female barefoot, male wearing socks", "blanket_texture": "thick, knitted fabric" }, "composition": { "framing": "centered, medium-wide shot", "symmetry": "balanced left and right composition" } },"
复制
1. codex plugin install runapi-mcp@agents
2. 重启 Codex
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "quality": "ultra-high definition", "aspect_ratio": "2:3", "render_style": "AI-edited, high-detail 3D render", "lighting_quality": "soft studio lighting with realistic shadows", "sharpness": "extreme clarity, crisp edges", "noise": "none", "compression": "none" }, "Module_1_Image_1_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "standing, body slightly angled, one hand raised with index finger touching lips", "expression": "cheerful smile, wide eyes", "hair": { "color": "black", "style": "two braided pigtails", "accessories": "green cap" }, "face": { "eyes": "large, rounded, dark pupils", "skin": "smooth, matte, stylized texture" } }, "clothing": { "top": "sleeveless green crop top", "bottom": "loose green jogger-style pants with drawstring", "footwear": "white sneakers" }, "accessories": { "luggage": "green hard-shell suitcase with extended handle" }, "color_palette": [ "multiple shades of green", "white accents" ], "background": { "color": "solid green", "texture": "soft, slightly grainy studio backdrop" }, "composition": { "framing": "full body", "camera_angle": "eye-level", "depth": "subject sharply separated from background" } }, "Module_2_Image_2_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "leaning slightly backward against background", "expression": "playful, lips slightly pursed, eyes looking sideways", "hair": { "color": "brown", "style": "short, tousled", "accessories": "red sunglasses resting on head" } }, "clothing": { "dress": "form-fitting blue ribbed dress with thin straps", "footwear": "red high-heel sandals with bow detail" }, "color_palette": [ "bold red", "deep blue" ], "background": { "color": "solid red", "texture": "smooth matte surface" }, "lighting": { "direction": "soft directional light from one side", "shadow": "defined shadow cast on red background" }, "composition": { "framing": "full body", "pose_emphasis": "curved posture, crossed legs" } }, "Module_3_Image_3_Style": { "subject": { "characters": [ { "type": "stylized 3D cartoon female", "position": "left", "wrapped_in": "red textured blanket", "expression": "calm, slight smile, eyes looking upward" }, { "type": "stylized 3D cartoon male", "position": "right", "wrapped_in": "orange textured blanket", "expression": "neutral, gentle gaze upward" } ] }, "environment": { "furniture": "red sofa", "floor": "red surface", "background": { "color": "deep red", "texture": "fabric-like horizontal texture" } }, "details": { "feet": "female barefoot, male wearing socks", "blanket_texture": "thick, knitted fabric" }, "composition": { "framing": "centered, medium-wide shot", "symmetry": "balanced left and right composition" } },"
复制
1. npx @runapi.ai/mcp init cursor
2. 重启 Cursor
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "quality": "ultra-high definition", "aspect_ratio": "2:3", "render_style": "AI-edited, high-detail 3D render", "lighting_quality": "soft studio lighting with realistic shadows", "sharpness": "extreme clarity, crisp edges", "noise": "none", "compression": "none" }, "Module_1_Image_1_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "standing, body slightly angled, one hand raised with index finger touching lips", "expression": "cheerful smile, wide eyes", "hair": { "color": "black", "style": "two braided pigtails", "accessories": "green cap" }, "face": { "eyes": "large, rounded, dark pupils", "skin": "smooth, matte, stylized texture" } }, "clothing": { "top": "sleeveless green crop top", "bottom": "loose green jogger-style pants with drawstring", "footwear": "white sneakers" }, "accessories": { "luggage": "green hard-shell suitcase with extended handle" }, "color_palette": [ "multiple shades of green", "white accents" ], "background": { "color": "solid green", "texture": "soft, slightly grainy studio backdrop" }, "composition": { "framing": "full body", "camera_angle": "eye-level", "depth": "subject sharply separated from background" } }, "Module_2_Image_2_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "leaning slightly backward against background", "expression": "playful, lips slightly pursed, eyes looking sideways", "hair": { "color": "brown", "style": "short, tousled", "accessories": "red sunglasses resting on head" } }, "clothing": { "dress": "form-fitting blue ribbed dress with thin straps", "footwear": "red high-heel sandals with bow detail" }, "color_palette": [ "bold red", "deep blue" ], "background": { "color": "solid red", "texture": "smooth matte surface" }, "lighting": { "direction": "soft directional light from one side", "shadow": "defined shadow cast on red background" }, "composition": { "framing": "full body", "pose_emphasis": "curved posture, crossed legs" } }, "Module_3_Image_3_Style": { "subject": { "characters": [ { "type": "stylized 3D cartoon female", "position": "left", "wrapped_in": "red textured blanket", "expression": "calm, slight smile, eyes looking upward" }, { "type": "stylized 3D cartoon male", "position": "right", "wrapped_in": "orange textured blanket", "expression": "neutral, gentle gaze upward" } ] }, "environment": { "furniture": "red sofa", "floor": "red surface", "background": { "color": "deep red", "texture": "fabric-like horizontal texture" } }, "details": { "feet": "female barefoot, male wearing socks", "blanket_texture": "thick, knitted fabric" }, "composition": { "framing": "centered, medium-wide shot", "symmetry": "balanced left and right composition" } },"
复制
1. npx @runapi.ai/mcp init windsurf
2. 重启 Windsurf
3. 粘贴这个 prompt:生成一张图像:"{ "global_settings": { "resolution": "8K", "quality": "ultra-high definition", "aspect_ratio": "2:3", "render_style": "AI-edited, high-detail 3D render", "lighting_quality": "soft studio lighting with realistic shadows", "sharpness": "extreme clarity, crisp edges", "noise": "none", "compression": "none" }, "Module_1_Image_1_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "standing, body slightly angled, one hand raised with index finger touching lips", "expression": "cheerful smile, wide eyes", "hair": { "color": "black", "style": "two braided pigtails", "accessories": "green cap" }, "face": { "eyes": "large, rounded, dark pupils", "skin": "smooth, matte, stylized texture" } }, "clothing": { "top": "sleeveless green crop top", "bottom": "loose green jogger-style pants with drawstring", "footwear": "white sneakers" }, "accessories": { "luggage": "green hard-shell suitcase with extended handle" }, "color_palette": [ "multiple shades of green", "white accents" ], "background": { "color": "solid green", "texture": "soft, slightly grainy studio backdrop" }, "composition": { "framing": "full body", "camera_angle": "eye-level", "depth": "subject sharply separated from background" } }, "Module_2_Image_2_Style": { "subject": { "character_type": "stylized 3D cartoon female", "pose": "leaning slightly backward against background", "expression": "playful, lips slightly pursed, eyes looking sideways", "hair": { "color": "brown", "style": "short, tousled", "accessories": "red sunglasses resting on head" } }, "clothing": { "dress": "form-fitting blue ribbed dress with thin straps", "footwear": "red high-heel sandals with bow detail" }, "color_palette": [ "bold red", "deep blue" ], "background": { "color": "solid red", "texture": "smooth matte surface" }, "lighting": { "direction": "soft directional light from one side", "shadow": "defined shadow cast on red background" }, "composition": { "framing": "full body", "pose_emphasis": "curved posture, crossed legs" } }, "Module_3_Image_3_Style": { "subject": { "characters": [ { "type": "stylized 3D cartoon female", "position": "left", "wrapped_in": "red textured blanket", "expression": "calm, slight smile, eyes looking upward" }, { "type": "stylized 3D cartoon male", "position": "right", "wrapped_in": "orange textured blanket", "expression": "neutral, gentle gaze upward" } ] }, "environment": { "furniture": "red sofa", "floor": "red surface", "background": { "color": "deep red", "texture": "fabric-like horizontal texture" } }, "details": { "feet": "female barefoot, male wearing socks", "blanket_texture": "thick, knitted fabric" }, "composition": { "framing": "centered, medium-wide shot", "symmetry": "balanced left and right composition" } },"
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\", \"quality\": \"ultra-high definition\", \"aspect_ratio\": \"2:3\", \"render_style\": \"AI-edited, high-detail 3D render\", \"lighting_quality\": \"soft studio lighting with realistic shadows\", \"sharpness\": \"extreme clarity, crisp edges\", \"noise\": \"none\", \"compression\": \"none\" }, \"Module_1_Image_1_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"standing, body slightly angled, one hand raised with index finger touching lips\", \"expression\": \"cheerful smile, wide eyes\", \"hair\": { \"color\": \"black\", \"style\": \"two braided pigtails\", \"accessories\": \"green cap\" }, \"face\": { \"eyes\": \"large, rounded, dark pupils\", \"skin\": \"smooth, matte, stylized texture\" } }, \"clothing\": { \"top\": \"sleeveless green crop top\", \"bottom\": \"loose green jogger-style pants with drawstring\", \"footwear\": \"white sneakers\" }, \"accessories\": { \"luggage\": \"green hard-shell suitcase with extended handle\" }, \"color_palette\": [ \"multiple shades of green\", \"white accents\" ], \"background\": { \"color\": \"solid green\", \"texture\": \"soft, slightly grainy studio backdrop\" }, \"composition\": { \"framing\": \"full body\", \"camera_angle\": \"eye-level\", \"depth\": \"subject sharply separated from background\" } }, \"Module_2_Image_2_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"leaning slightly backward against background\", \"expression\": \"playful, lips slightly pursed, eyes looking sideways\", \"hair\": { \"color\": \"brown\", \"style\": \"short, tousled\", \"accessories\": \"red sunglasses resting on head\" } }, \"clothing\": { \"dress\": \"form-fitting blue ribbed dress with thin straps\", \"footwear\": \"red high-heel sandals with bow detail\" }, \"color_palette\": [ \"bold red\", \"deep blue\" ], \"background\": { \"color\": \"solid red\", \"texture\": \"smooth matte surface\" }, \"lighting\": { \"direction\": \"soft directional light from one side\", \"shadow\": \"defined shadow cast on red background\" }, \"composition\": { \"framing\": \"full body\", \"pose_emphasis\": \"curved posture, crossed legs\" } }, \"Module_3_Image_3_Style\": { \"subject\": { \"characters\": [ { \"type\": \"stylized 3D cartoon female\", \"position\": \"left\", \"wrapped_in\": \"red textured blanket\", \"expression\": \"calm, slight smile, eyes looking upward\" }, { \"type\": \"stylized 3D cartoon male\", \"position\": \"right\", \"wrapped_in\": \"orange textured blanket\", \"expression\": \"neutral, gentle gaze upward\" } ] }, \"environment\": { \"furniture\": \"red sofa\", \"floor\": \"red surface\", \"background\": { \"color\": \"deep red\", \"texture\": \"fabric-like horizontal texture\" } }, \"details\": { \"feet\": \"female barefoot, male wearing socks\", \"blanket_texture\": \"thick, knitted fabric\" }, \"composition\": { \"framing\": \"centered, medium-wide shot\", \"symmetry\": \"balanced left and right composition\" } },"
}
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\", \"quality\": \"ultra-high definition\", \"aspect_ratio\": \"2:3\", \"render_style\": \"AI-edited, high-detail 3D render\", \"lighting_quality\": \"soft studio lighting with realistic shadows\", \"sharpness\": \"extreme clarity, crisp edges\", \"noise\": \"none\", \"compression\": \"none\" }, \"Module_1_Image_1_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"standing, body slightly angled, one hand raised with index finger touching lips\", \"expression\": \"cheerful smile, wide eyes\", \"hair\": { \"color\": \"black\", \"style\": \"two braided pigtails\", \"accessories\": \"green cap\" }, \"face\": { \"eyes\": \"large, rounded, dark pupils\", \"skin\": \"smooth, matte, stylized texture\" } }, \"clothing\": { \"top\": \"sleeveless green crop top\", \"bottom\": \"loose green jogger-style pants with drawstring\", \"footwear\": \"white sneakers\" }, \"accessories\": { \"luggage\": \"green hard-shell suitcase with extended handle\" }, \"color_palette\": [ \"multiple shades of green\", \"white accents\" ], \"background\": { \"color\": \"solid green\", \"texture\": \"soft, slightly grainy studio backdrop\" }, \"composition\": { \"framing\": \"full body\", \"camera_angle\": \"eye-level\", \"depth\": \"subject sharply separated from background\" } }, \"Module_2_Image_2_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"leaning slightly backward against background\", \"expression\": \"playful, lips slightly pursed, eyes looking sideways\", \"hair\": { \"color\": \"brown\", \"style\": \"short, tousled\", \"accessories\": \"red sunglasses resting on head\" } }, \"clothing\": { \"dress\": \"form-fitting blue ribbed dress with thin straps\", \"footwear\": \"red high-heel sandals with bow detail\" }, \"color_palette\": [ \"bold red\", \"deep blue\" ], \"background\": { \"color\": \"solid red\", \"texture\": \"smooth matte surface\" }, \"lighting\": { \"direction\": \"soft directional light from one side\", \"shadow\": \"defined shadow cast on red background\" }, \"composition\": { \"framing\": \"full body\", \"pose_emphasis\": \"curved posture, crossed legs\" } }, \"Module_3_Image_3_Style\": { \"subject\": { \"characters\": [ { \"type\": \"stylized 3D cartoon female\", \"position\": \"left\", \"wrapped_in\": \"red textured blanket\", \"expression\": \"calm, slight smile, eyes looking upward\" }, { \"type\": \"stylized 3D cartoon male\", \"position\": \"right\", \"wrapped_in\": \"orange textured blanket\", \"expression\": \"neutral, gentle gaze upward\" } ] }, \"environment\": { \"furniture\": \"red sofa\", \"floor\": \"red surface\", \"background\": { \"color\": \"deep red\", \"texture\": \"fabric-like horizontal texture\" } }, \"details\": { \"feet\": \"female barefoot, male wearing socks\", \"blanket_texture\": \"thick, knitted fabric\" }, \"composition\": { \"framing\": \"centered, medium-wide shot\", \"symmetry\": \"balanced left and right composition\" } },"
});
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\", \"quality\": \"ultra-high definition\", \"aspect_ratio\": \"2:3\", \"render_style\": \"AI-edited, high-detail 3D render\", \"lighting_quality\": \"soft studio lighting with realistic shadows\", \"sharpness\": \"extreme clarity, crisp edges\", \"noise\": \"none\", \"compression\": \"none\" }, \"Module_1_Image_1_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"standing, body slightly angled, one hand raised with index finger touching lips\", \"expression\": \"cheerful smile, wide eyes\", \"hair\": { \"color\": \"black\", \"style\": \"two braided pigtails\", \"accessories\": \"green cap\" }, \"face\": { \"eyes\": \"large, rounded, dark pupils\", \"skin\": \"smooth, matte, stylized texture\" } }, \"clothing\": { \"top\": \"sleeveless green crop top\", \"bottom\": \"loose green jogger-style pants with drawstring\", \"footwear\": \"white sneakers\" }, \"accessories\": { \"luggage\": \"green hard-shell suitcase with extended handle\" }, \"color_palette\": [ \"multiple shades of green\", \"white accents\" ], \"background\": { \"color\": \"solid green\", \"texture\": \"soft, slightly grainy studio backdrop\" }, \"composition\": { \"framing\": \"full body\", \"camera_angle\": \"eye-level\", \"depth\": \"subject sharply separated from background\" } }, \"Module_2_Image_2_Style\": { \"subject\": { \"character_type\": \"stylized 3D cartoon female\", \"pose\": \"leaning slightly backward against background\", \"expression\": \"playful, lips slightly pursed, eyes looking sideways\", \"hair\": { \"color\": \"brown\", \"style\": \"short, tousled\", \"accessories\": \"red sunglasses resting on head\" } }, \"clothing\": { \"dress\": \"form-fitting blue ribbed dress with thin straps\", \"footwear\": \"red high-heel sandals with bow detail\" }, \"color_palette\": [ \"bold red\", \"deep blue\" ], \"background\": { \"color\": \"solid red\", \"texture\": \"smooth matte surface\" }, \"lighting\": { \"direction\": \"soft directional light from one side\", \"shadow\": \"defined shadow cast on red background\" }, \"composition\": { \"framing\": \"full body\", \"pose_emphasis\": \"curved posture, crossed legs\" } }, \"Module_3_Image_3_Style\": { \"subject\": { \"characters\": [ { \"type\": \"stylized 3D cartoon female\", \"position\": \"left\", \"wrapped_in\": \"red textured blanket\", \"expression\": \"calm, slight smile, eyes looking upward\" }, { \"type\": \"stylized 3D cartoon male\", \"position\": \"right\", \"wrapped_in\": \"orange textured blanket\", \"expression\": \"neutral, gentle gaze upward\" } ] }, \"environment\": { \"furniture\": \"red sofa\", \"floor\": \"red surface\", \"background\": { \"color\": \"deep red\", \"texture\": \"fabric-like horizontal texture\" } }, \"details\": { \"feet\": \"female barefoot, male wearing socks\", \"blanket_texture\": \"thick, knitted fabric\" }, \"composition\": { \"framing\": \"centered, medium-wide shot\", \"symmetry\": \"balanced left and right composition\" } },"
)
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\\\", \\\"quality\\\": \\\"ultra-high definition\\\", \\\"aspect_ratio\\\": \\\"2:3\\\", \\\"render_style\\\": \\\"AI-edited, high-detail 3D render\\\", \\\"lighting_quality\\\": \\\"soft studio lighting with realistic shadows\\\", \\\"sharpness\\\": \\\"extreme clarity, crisp edges\\\", \\\"noise\\\": \\\"none\\\", \\\"compression\\\": \\\"none\\\" }, \\\"Module_1_Image_1_Style\\\": { \\\"subject\\\": { \\\"character_type\\\": \\\"stylized 3D cartoon female\\\", \\\"pose\\\": \\\"standing, body slightly angled, one hand raised with index finger touching lips\\\", \\\"expression\\\": \\\"cheerful smile, wide eyes\\\", \\\"hair\\\": { \\\"color\\\": \\\"black\\\", \\\"style\\\": \\\"two braided pigtails\\\", \\\"accessories\\\": \\\"green cap\\\" }, \\\"face\\\": { \\\"eyes\\\": \\\"large, rounded, dark pupils\\\", \\\"skin\\\": \\\"smooth, matte, stylized texture\\\" } }, \\\"clothing\\\": { \\\"top\\\": \\\"sleeveless green crop top\\\", \\\"bottom\\\": \\\"loose green jogger-style pants with drawstring\\\", \\\"footwear\\\": \\\"white sneakers\\\" }, \\\"accessories\\\": { \\\"luggage\\\": \\\"green hard-shell suitcase with extended handle\\\" }, \\\"color_palette\\\": [ \\\"multiple shades of green\\\", \\\"white accents\\\" ], \\\"background\\\": { \\\"color\\\": \\\"solid green\\\", \\\"texture\\\": \\\"soft, slightly grainy studio backdrop\\\" }, \\\"composition\\\": { \\\"framing\\\": \\\"full body\\\", \\\"camera_angle\\\": \\\"eye-level\\\", \\\"depth\\\": \\\"subject sharply separated from background\\\" } }, \\\"Module_2_Image_2_Style\\\": { \\\"subject\\\": { \\\"character_type\\\": \\\"stylized 3D cartoon female\\\", \\\"pose\\\": \\\"leaning slightly backward against background\\\", \\\"expression\\\": \\\"playful, lips slightly pursed, eyes looking sideways\\\", \\\"hair\\\": { \\\"color\\\": \\\"brown\\\", \\\"style\\\": \\\"short, tousled\\\", \\\"accessories\\\": \\\"red sunglasses resting on head\\\" } }, \\\"clothing\\\": { \\\"dress\\\": \\\"form-fitting blue ribbed dress with thin straps\\\", \\\"footwear\\\": \\\"red high-heel sandals with bow detail\\\" }, \\\"color_palette\\\": [ \\\"bold red\\\", \\\"deep blue\\\" ], \\\"background\\\": { \\\"color\\\": \\\"solid red\\\", \\\"texture\\\": \\\"smooth matte surface\\\" }, \\\"lighting\\\": { \\\"direction\\\": \\\"soft directional light from one side\\\", \\\"shadow\\\": \\\"defined shadow cast on red background\\\" }, \\\"composition\\\": { \\\"framing\\\": \\\"full body\\\", \\\"pose_emphasis\\\": \\\"curved posture, crossed legs\\\" } }, \\\"Module_3_Image_3_Style\\\": { \\\"subject\\\": { \\\"characters\\\": [ { \\\"type\\\": \\\"stylized 3D cartoon female\\\", \\\"position\\\": \\\"left\\\", \\\"wrapped_in\\\": \\\"red textured blanket\\\", \\\"expression\\\": \\\"calm, slight smile, eyes looking upward\\\" }, { \\\"type\\\": \\\"stylized 3D cartoon male\\\", \\\"position\\\": \\\"right\\\", \\\"wrapped_in\\\": \\\"orange textured blanket\\\", \\\"expression\\\": \\\"neutral, gentle gaze upward\\\" } ] }, \\\"environment\\\": { \\\"furniture\\\": \\\"red sofa\\\", \\\"floor\\\": \\\"red surface\\\", \\\"background\\\": { \\\"color\\\": \\\"deep red\\\", \\\"texture\\\": \\\"fabric-like horizontal texture\\\" } }, \\\"details\\\": { \\\"feet\\\": \\\"female barefoot, male wearing socks\\\", \\\"blanket_texture\\\": \\\"thick, knitted fabric\\\" }, \\\"composition\\\": { \\\"framing\\\": \\\"centered, medium-wide shot\\\", \\\"symmetry\\\": \\\"balanced left and right composition\\\" } },\"}")
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)
}