DeerAPI-API文档
  1. ideogram(images)
DeerAPI-API文档
  • 帮助中心
    • 模型上新公告
    • 平台通知
    • 帮助中心
    • 快速开始
    • 关于价格
    • 关于分组
    • 接口稳定性
    • 隐私政策
    • 服务条款
    • 报错状态码说明
    • 代码示例
    • 入门必看
    • 常见误区
    • 使用困惑
    • 最佳实践
      • Deerapi 账户余额查询API 使用说明
      • 使用 DeerAPI 和 OpenAI 官方 API 的重试逻辑说明文档
      • Midjorney调用最佳实践
      • Runway调用最佳实践
  • OpenAI格式
    • gpt-4o-image生图
      POST
    • 聊天
      POST
    • 识图
      POST
    • 获取模型列表
      GET
    • 嵌入
      POST
    • 图像
      POST
    • Realtime
      POST
    • 图像编辑(gpt-image-1)
      POST
  • 音频
    • 文本转音频
    • 音频转文本
    • 创建翻译
  • Anthropic 格式
    • Anthropic Claude
  • 音乐生成
    • Suno
      • 设置 suno 版本
      • 生成歌词
      • 生成音乐
      • 上传音乐
      • 歌曲拼接
      • 查询单个任务
      • 批量查询任务
    • Udio(暂不可用)
      • 生成音乐
      • 查询单个任务
  • Midjourney 图像生成
    • 快速教学-完整流程一遍过
    • 任务查询
      • 分页查询
      • 指定ID获取任务
    • 提交Imagine任务
    • 提交Action任务
    • 提交Blend任务
    • 提交Describe任务
    • 提交Modal
  • 视频生成
    • runway(video)
      • 官方格式
        • 从图像生成视频
        • 获取任务详细信息
      • 逆向格式
        • generate(文本)
        • generate(参考图片)
        • video2video 视频转视频 风格重绘
        • Act-one 表情迁移
        • feed-获取任务
    • kling (video)
      • Callback协议
      • 生成图像
      • 文生视频
      • 图生视频
      • 视频延长
      • 虚拟试穿
      • 对口型
      • 查询任务(单个)
    • luma (video)
      • 官方API格式
        • 生成视频
        • 单个查询任务
    • MiniMax 海螺(video)
      • 官方文档
      • 视频生成
      • 查询任务
      • 文件下载
    • PIKA(video)
      • 通用版
        • generate video
        • 查询视频任务
      • generate(参考视频/扩展视频)
      • generate(参考图片)
      • generate(文本)
      • feed
    • sora
      • 逆向格式
        • 创建视频
        • 生成视频
        • 查询视频任务
  • 图像生成
    • ideogram(images)
      • 官方文档(实时更新)
      • Generate 3.0(文生图)
        POST
      • Reframe 3.0(重构)
        POST
      • Replace Background 3.0(背景替换)
        POST
      • Remix 3.0(混合图)
        POST
      • Edit 3.0(编辑)
        POST
      • Generate(文生图)
        POST
      • Remix(混合图)
        POST
      • Upscale(放大高清)
        POST
      • Describe(描述)
        POST
      • Edit(编辑)
        POST
    • Flux(images)
      • 生成图片(replicate格式)
      • 生成图片(暂不可用)
      • 微调(暂不可用)
      • 查询任务
    • Replicate(image)
      • 创建任务
      • 查询任务
    • Recraft(images)
      • 附录
      • Generate Image(生成图片)
      • Vectorize Image(矢量化图片)
      • Remove Background(删除背景)
      • Clarity Upscale(清晰度提升)
      • Create style(创建样式)
      • Generative Upscale(生成高清)
  • 应用集成指南
    • DeerAPI 本站调用
    • OpenManus
    • Chatbox
    • CherryStudio
    • Cursor
    • ChatAll
    • ChatHub
    • COZE
    • FastGPT
    • Lobe-Chat
    • NEXT CHAT (ChatGPT Next Web)
    • cline
    • gptme
    • LangChain
    • AnythingLLM
    • Zotero
    • librechat
    • avante.nvim
    • Dify
    • OpenAI Translator
    • Open WebUI
    • obsidian的text generator插件
    • STranslate
    • 沉浸式翻译
    • Pot 翻译
    • 欧陆翻译
    • utools-ChatGPT 好友
    • GPT 学术优化(gpt_academic)
    • 懒人客服
    • IntelliJ Translation Plugin
  1. ideogram(images)

Generate(文生图)

POST
https://api.deerapi.com/ideogram/generate
Generates images synchronously based on a given prompt and optional parameters.
根据给定的提示和可选参数同步生成图像。
返回的图像 URL 在 24 小时内有效,超过该时间将无法访问图像。
图像URL为官方原链接,请注意网络环境是否能访问。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.deerapi.com/ideogram/generate' \
--header 'Authorization: {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "image_request": {
        "model": "V_2_TURBO",
        "magic_prompt_option": "AUTO",
        "seed": 111,
        "prompt": "cat",
        "num_images": 1
    }
}'
响应示例响应示例
{
    "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"
}

请求参数

Header 参数
Authorization
string 
可选
示例值:
{{api-key}}
Body 参数application/json
image_request
object 
必需
prompt
string 
生成图像的提示
必需
aspect_ratio
string 
可选
(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。
默认值:
ASPECT_1_1
model
enum<string> 
可选
用于生成的模型。默认为 V_2。
枚举值:
V_1V_1_TURBOV_2V_2_TURBO
默认值:
V_2
magic_prompt_option
enum<string> 
可选
确定是否应该在生成请求时使用 MagicPrompt
枚举值:
AUTOONOFF
默认值:
AUTO
seed
integer 
可选
0 to 2147483647
style_type
enum<string> 
可选
生成的样式类型;这仅适用于 V_2 及以上版本的模型,不应为 V_1 版本的模型指定。
枚举值:
GENERALREALISTICDESIGNRENDER_3DANIME
num_images
string 
可选
negative_prompt
string 
可选
描述从图像中排除的内容。提示中的描述优先于负提示中的描述。
resolution
string 
可选
最终图像的分辨率。
示例值:
RESOLUTION_832_1152
示例

返回响应

🟢200OK
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 
必需
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.
修改于 2025-05-19 05:47:54
上一页
Edit 3.0(编辑)
下一页
Remix(混合图)
Built with