API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  1. Ideogram
API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  • Chat Models
    • Chat
      • Create chat completion
      • vision
    • OpenAI-Realtime
    • Completions
      • Instruct
    • Audio
      • Transcriptions
      • Translations
      • Speech
    • Image generation
      • DALL·E 3
    • Embeddings
      • Create
    • Models
      • model list
    • Help
      • 常见问题及解决办法
  • Anthropic
    • Anthropic Claude
  • Suno
    • Generate music
    • Generate lyrics
    • Upload music
    • Music concat
    • Fetch task
    • Fetch batch tasks
  • Udio
    • Generate music
    • Fetch task
  • Midjourney API
    • Quick
    • Task Submit
      • Imagine
      • Action
      • Modal
      • Blend
      • Describe
      • Shorten
      • Upload discord
    • Get Task
      • Fetch task by ids
      • Fetch task by id
      • Get seed
  • Flux
    • Official
      • Generate
      • Finetune
      • Fetch task
    • OpenAI Dalle3
  • Recraft
    • Official
      • Generate Image
      • Vectorize Image
      • Remove Background
      • Clarity Upscale
      • Generative Upscale
      • Create style
    • OpenAI Dalle3
  • Ideogram
    • Generate
      POST
    • Remix
      POST
    • Edit
      POST
    • Upscale
      POST
    • Describe
      POST
  • Luma
    • Official
      • Generate
      • Fetch task
    • Own format
      • Submit
        • Generate
        • Get video of no mark
        • 扩展视频
      • Get task
        • Get task
        • Get batch task
  • Runway
    • Official
      • image to video
      • get task
    • reverse
      • text to video
      • image to video
      • video2video
      • Act-one
      • Get task
  • Kling-API
    • Callback
    • Generate image
    • Text 2 Video
    • Image 2 Video
    • Video extend
    • Get task
    • lip-sync
    • kolors-virtual-try-on
  • Replicate
    • Generate
    • Get
  • MiniMax
    • Generate video
    • Get task
    • Get file
  1. Ideogram

Edit

POST
/ideogram/edit
最后修改时间:2025-02-05 11:29:12
Remix provided images synchronously based on a given prompt and optional parameters

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Api-Key
string 
可选
示例值:
kVSFo8SxtgB8salBMacNeHZtGe9pxL-i5vFFnSyA1n9cM7L8UFBsHWEFHYdG8BwSBmXef8HqdEPwjThEwFvl1g
Authorization
string 
可选
默认值:
{{YOUR_API_KEY}}
Body 参数multipart/form-data
image_file
file 
必需
An image binary; only JPEG, WEBPs and PNGs are supported at this time
图像二进制;目前仅支持 JPEG、WEBP 和 PNG 格式
示例值:
file:///Users/zcz/Pictures/下载.png
mask
file 
必需
示例值:
file:///Users/zcz/Pictures/下载 (1).png
prompt
string 
必需
示例值:
cat
model
string 
必需
示例值:
V_2_TURBO
magic_prompt_option
string 
可选
默认值:
AUTO
示例值:
AUTOONOFF
seed
integer 
可选
style_type
string 
可选
生成的样式类型;这仅适用于型号 V_2 及更高版本,不应为型号版本 V_1 指定。
示例值:
AUTOGENERALREALISTICDESIGNRENDER_3DANIME
num_images
string 
可选

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/ideogram/edit' \
--header 'Api-Key: kVSFo8SxtgB8salBMacNeHZtGe9pxL-i5vFFnSyA1n9cM7L8UFBsHWEFHYdG8BwSBmXef8HqdEPwjThEwFvl1g' \
--header 'Authorization: ' \
--form 'image_file=@"/Users/zcz/Pictures/下载.png"' \
--form 'mask=@"/Users/zcz/Pictures/下载 (1).png"' \
--form 'prompt="cat"' \
--form 'model="V_2_TURBO"' \
--form 'magic_prompt_option=""' \
--form 'seed=""' \
--form 'style_type=""' \
--form 'num_images=""'

返回响应

🟢200成功
application/json
Body
data
array [object {5}] 
必需
A list of ImageObjects that contain the generated image(s).
包含生成图像的图像对象列表。
seed
integer 
必需
0 to 2147483647
prompt
string 
必需
The prompt used for the generation. This may be different from the original prompt.
用于生成的提示。这可能与原始提示不同。
resolution
string 
必需
The resolution of the final image.
最终图像的分辨率。
url
string  | null 
必需
The direct link to the image generated.
生成的图像的直接链接。
is_image_safe
boolean 
必需
Whether this request passes safety checks. If false, the url field will be empty.
该请求是否通过安全检查。如果为假,网址字段将为空。
created
string 
必需
The time the request was created.
请求创建的时间。
示例
{
    "data": [
        {
            "seed": 12345,
            "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
            "resolution": "1024x1024",
            "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
            "is_image_safe": true
        },
        {
            "seed": 12345,
            "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
            "resolution": "1024x1024",
            "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
            "is_image_safe": true
        }
    ],
    "created": "2000-01-23T04:56:07.000Z"
}
上一页
Remix
下一页
Upscale
Built with