Remix(混合图)
方法: POST路径: /ideogram/remix
Remix provided images synchronously based on a given prompt and optional parameters 根据给定的提示和可选参数,实时提供重新混合的图像 具体参数请看官方文档:https://developer.ideogram.ai/api-reference/generate/post-generate-image
请求参数
Header 参数
text
accept
string
必需
示例:
application/json
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 multipart/form-data
text
image_request
string
必需
示例:
{"image_weight":50,"model":"V_1","magic_prompt_option":"AUTO","prompt":"A%20serene%20tropical%20beach%20","aspect_ratio":"ASPECT_10_16","seed":12345,"negative_prompt":"brush%20strokes%2C%20painting"}
image_file
file
必需
示例:
file://E:\Downloads\flux.png请求示例代码
Shell
bash
curl --location --request POST '/ideogram/remix' \
--header 'accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'image_request="{\"image_weight\":50,\"model\":\"V_1\",\"magic_prompt_option\":\"AUTO\",\"prompt\":\"A%20serene%20tropical%20beach%20\",\"aspect_ratio\":\"ASPECT_10_16\",\"seed\":12345,\"negative_prompt\":\"brush%20strokes%2C%20painting\"}"' \
--form 'image_file=@"E:\\Downloads\\flux.png"'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
created
string
必需
data
array
[object]
必需
is_image_safe
boolean
可选
prompt
string
可选
resolution
string
可选
seed
integer
可选
url
string
可选示例
json
{
"created": "2024-08-27T15:40:31.101790+00:00",
"data": [
{
"is_image_safe": true,
"prompt": "A serene and picturesque tropical beach scene, featuring a pristine stretch of soft, golden sand. The gently rolling waves of the turquoise ocean caress the shoreline, creating a soothing ambiance. Palm trees sway gracefully, casting dappled shadows on the sand, while a few seagulls fly overhead. A small, vibrant coral reef is visible beneath the surface of the water, teeming with colorful fish and marine life. The sun casts a warm, golden glow over the entire scene.",
"resolution": "768x1232",
"seed": 12345,
"url": "https://ideogram.ai/api/images/ephemeral/TMbGtdqTRQST8EoZoCjtiw.png?exp=1724859637&sig=62b8379501193e1acb70e7ceca83e31a7b5e83524c2ce64cb33e5e86aed25dd8"
}
]
}