API reference
🇨🇳 Chinese
  • 🇨🇳 Chinese
  • 🇺🇸 English
  1. Ideogram(生图)
API reference
🇨🇳 Chinese
  • 🇨🇳 Chinese
  • 🇺🇸 English
  • 系统内部接口
    • 用户查询账号信息
      GET
  • OpenAI
    • 聊天
      • 文本聊天
      • 识图
    • Responses
      • 创建模型响应
    • OpenAI-Realtime
      • Realtime
    • Completions
      • Instruct
    • 音频接口(Audio)
      • 音频转文本
      • 创建翻译
      • 文本转音频
    • 图像
      • 创建图像
      • 创建图像编辑
      • 创建图像变化
    • 嵌入
      • 创建嵌入
    • 审核
      • 创建审核
    • 模型
      • 获取模型列表
    • 帮助中心
      • 常见问题及解决办法
  • Anthropic
    • Anthropic Claude
      POST
  • Suno(音乐)
    • 场景一:续写音乐并获取完整音乐
    • 场景二:Cover 音乐:音乐翻版\修改风格
    • 场景三:Replace Section:替换片段
    • 场景四:Persona:歌手风格
    • 场景五:stems:声曲分离(仅限chirp_auk)
    • 场景六:Timing:歌词、音频时间线(仅限chirp_auk)
    • 场景七:wav:获取 wav 格式文件
    • 场景八:mp4:生成 mp4 mv 视频(仅限chirp_auk)
    • 生成音乐
      POST
    • 上传音乐
      POST
    • 歌曲拼接
      POST
    • 新建 Persona
      POST
    • 声曲分离
      GET
    • Timing:歌词、音频时间线
      GET
    • 获取 wav 格式文件
      GET
    • 生成 mp4 mv 视频
      GET
    • 生成歌词
      POST
    • 查询单个任务
      GET
    • 批量查询任务
      POST
    • 批量查询歌曲
      GET
  • Udio(音乐)
    • 官方格式
      • 生成音乐
      • 查询单个任务
  • Midjourney API文档(生图)
    • 快速教学-完整流程一遍过
    • 怎么切换不同的速度
    • 任务提交
      • 提交Imagine任务
      • 提交Action任务
      • 提交Blend任务
      • 提交Describe任务
      • 提交Modal
      • 提交Shorten任务
      • 提交swap_face任务
      • 上传文件到discord
    • 任务查询
      • 指定ID获取任务
      • 根据ID列表查询任务
      • 根据ID列表查询任务-字段displays
      • 获取任务图片的seed
      • 查询所有任务
      • 分页查询任务
      • 查询任务队列
      • 取消任务
  • Flux(生图)
    • 官方格式
      • 生成图片
      • 微调
      • 查询任务
    • OpenAI Dalle3格式
  • Recraft(生图)
    • 官方格式
      • 附录
      • Generate Image(生成图片)
      • Vectorize Image(矢量化图片)
      • Remove Background(删除背景)
      • Clarity Upscale(清晰度提升)
      • Generative Upscale(生成高清)
      • Create style(创建样式)
    • OpenAI Dalle3格式-生成图片
  • Ideogram(生图)
    • 官方文档(实时更新)
      官方
    • Generate with Ideogram 3.0
      POST
    • Edit with Ideogram 3.0
      POST
    • Remix with Ideogram 3.0
      POST
    • Reframe with Ideogram 3.0
      POST
    • Replace Background with Ideogram 3.0
      POST
    • Upscale
      POST
    • Describe
      POST
    • Generate(legacy)
      POST
    • Edit(legacy)
      POST
    • Remix(legacy)
      POST
  • Luma(视频)
    • 官方API格式接口
      • 生成视频
      • 单个查询任务
    • RixAPI格式接口
      • 任务提交
        • 文生视频
        • 图生视频
        • 扩展视频
        • 视频生成音频
        • 获取视频无水印链接
      • 任务查询
        • 单个查询任务
        • 批量查询任务
  • Runway(视频)
    • 官方API接口格式
      • 从图像生成视频
      • 获取任务详细信息
    • 逆向格式
      • generate(文本)
      • generate(参考图片)
      • video2video 视频转视频 风格重绘
      • Act-one 表情迁移
      • feed-获取任务
  • PIKA(视频)
    • generate(文本)
    • generate(参考图片)
    • generate(参考视频/扩展视频)
    • feed
  • 可灵API(官方接口)
    • 建议直接看官方文档
    • Callback协议
    • 生成图像
    • 文生视频
    • 图生视频
    • 多图参考生视频
    • 视频特效
    • 视频延长
    • 对口型
    • 虚拟试穿
    • 查询任务(单个)
  • Replicate 通用接口
    • 创建任务
    • 查询任务
  • MiniMax海螺(视频)
    • 官方文档
    • 视频生成
    • 查询任务
    • 文件下载
  1. Ideogram(生图)

Generate(legacy)

POST
/ideogram/generate
Last modified:2025-05-05 17:48:19
Generates images synchronously based on a given prompt and optional parameters.
根据给定的提示和可选参数同步生成图像。
返回的图像 URL 在 24 小时内有效,超过该时间将无法访问图像。
图像URL为官方原链接,请注意网络环境是否能访问。

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Authorization
string 
optional
Default:
{{YOUR_API_KEY}}
Body Params application/json
image_request
object 
required
prompt
string 
required
The prompt to use to generate the image.
生成图像的提示。
aspect_ratio
string 
optional
(Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
(不能与分辨率一起使用)用于图像生成的宽高比,决定图像的分辨率。默认为 ASPECT_1_1。
Default:
ASPECT_1_1
model
string 
optional
The model used to generate. Defaults to V_2.
用于生成的模型。默认为 V_2。
Default:
V_2
Examples:
V_1V_1_TURBOV_2V_2_TURBO
magic_prompt_option
string 
optional
Determine if MagicPrompt should be used in generating the request or not
确定是否应该在生成请求时使用 MagicPrompt
Default:
AUTO
Examples:
AUTOONOFF
seed
integer 
optional
0 to 2147483647
style_type
string 
optional
The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
生成的样式类型;这仅适用于 V_2 及以上版本的模型,不应为 V_1 版本的模型指定。
示例值:GENERAL、REALISTIC、DESIGN、RENDER_3D、ANIME
Examples:
GENERALREALISTICDESIGNRENDER_3DANIME
num_images
string 
optional
negative_prompt
string 
optional
Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.
描述从图像中排除的内容。提示中的描述优先于负提示中的描述。
resolution
string 
optional
The resolution of the final image.
最终图像的分辨率。
Example:
RESOLUTION_832_1152
Example
{
  "image_request": {
    "model": "V_2_TURBO",
    "magic_prompt_option": "AUTO",
    "seed": 111,
    "prompt": "cat",
    "num_images": 1
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/ideogram/generate' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "image_request": {
        "model": "V_2_TURBO",
        "magic_prompt_option": "AUTO",
        "seed": 111,
        "prompt": "cat",
        "num_images": 1
    }
}'

Responses

🟢200成功
application/json
Body
data
array [object {5}] 
required
A list of ImageObjects that contain the generated image(s).
包含生成图像的图像对象列表。
seed
integer 
required
0 to 2147483647
prompt
string 
required
The prompt used for the generation. This may be different from the original prompt.
用于生成的提示。这可能与原始提示不同。
resolution
string 
required
The resolution of the final image.
最终图像的分辨率。
url
string  | null 
required
The direct link to the image generated.
生成的图像的直接链接。
is_image_safe
boolean 
required
Whether this request passes safety checks. If false, the url field will be empty.
该请求是否通过安全检查。如果为假,网址字段将为空。
created
string 
required
The time the request was created.
请求创建的时间。
Example
{
  "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"
}
Previous
Describe
Next
Edit(legacy)
Built with