- 发出请求
- OpenAI接口
- Realtime文档
- 聊天接口(Chat)
- 自动补全接口(Completions)
- 图像接口(Images)
- 向量生成接口(Embeddings)
- 音频接口(Audio)
- 图片接口
- Midjourney
- Stable Diffusion(官方格式)
- Flux
- Ideogram(官方格式)
- 其他图像API1(开发中)
- 其他图像API2(开发中)
- 开放API接口
- 示例
- 生成图片融合示例
- 1.自定义调用- 普通示例(艺术二维码调用示例)
- 2.自定义调用 - 不同版本(艺术二维码调用示例)
- 3.自定义调用 -二维码强度(艺术二维码调用示例)
- 4.模版调用 - 普通示例(艺术二维码调用示例)
- 5.模版调用 - 二维码强度(艺术二维码调用示例)
- 6.自定义调用 - 上传图片(艺术二维码调用示例)
- 7.不同码眼调用(艺术二维码调用示例)
- 8.不同版本(艺术二维码调用示例)
- 1.光影文字 - 使用模版(AI艺术字调用示例)
- 2.光影文字 - 自定义prompt调用(AI艺术字调用示例)
- 3.艺术字调用 - 使用模版(AI艺术字调用示例)
- 基础调用(MX绘画-生成类接口-Cute-生成示例(必看))
- 基础调用 - 自定义尺寸(MX绘画-生成类接口-Cute-生成示例(必看))
- 基础调用-开启审核(MX绘画-生成类接口-Cute-生成示例(必看))
- 融合模型调用(MX绘画-生成类接口-Cute-生成示例(必看))
- 反词 - 替换默认反词(MX绘画-生成类接口-Cute-生成示例(必看))
- 反词 - 追加反词(MX绘画-生成类接口-Cute-生成示例(必看))
- 音乐接口
- 视频接口
- Luma
- CogVideoX(官方格式)
- Vidu(开发中)
- Pika
- Runway
- Pixverse
- 可灵(官方格式)
- Viggle(开发中)
- PPT接口
- 文多多(官方格式)
- 韦尼克(官方格式)
- 申请PPT生成任务(PPT描述/主题一键生成)
- 获取PPT生成状态和预览页(PPT描述/主题一键生成)
- 通过描述生成PPT标题大纲(逐步生成PPT)
- 申请PPT生成任务(逐步生成PPT)
- 获取PPT生成状态和预览页(逐步生成PPT)
- 根据标题生成封面预览图(模版封面图预览)
- 根据标题以及封面预览信息生成不同主题色的预览(设置主题色)
- 通过task_id增加PPT单页(PPT中插入单页)
- 基于当前模板生成(基于当前模版生成)
- 短文本文件生成PPT(文件内容解析)
- 获取PPT生成状态和预览页(文件内容解析)
- 获取PPT生成状态和预览页(文件内容解析)
- 通过文件生成PPT(文件内容解析)
- 更换模版(更换模版)
- 生成PPT备注(演讲稿备注)
- 获取PPT下载链接(获取下载链接)
- 帮助中心
Generate(文生图)
开发中
POST
/ideogram/v1/generate
根据给定的提示和可选参数同步生成图像。
返回的图像 URL 在 24 小时内有效,超过该时间将无法访问图像。
图像URL为官方原链接,请注意网络环境是否能访问。
请求参数
Header 参数
Authorization
string
可选
默认值:
{{YOUR_API_KEY}}
Body 参数application/json
image_request
object
必需
prompt
string
必需
aspect_ratio
string
可选
默认值:
ASPECT_1_1
model
string
可选
默认值:
V_2
示例值:
V_1V_1_TURBOV_2V_2_TURBO
magic_prompt_option
string
可选
默认值:
AUTO
示例值:
AUTOONOFF
seed
integer
可选
style_type
string
可选
示例值:
GENERALREALISTICDESIGNRENDER_3DANIME
negative_prompt
string
可选
resolution
string
可选
示例值:
RESOLUTION_576_1472
示例
{
"image_request": {
"model": "V_2",
"magic_prompt_option": "AUTO"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/ideogram/v1/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_request": {
"model": "V_2",
"magic_prompt_option": "AUTO"
}
}'
返回响应
🟢200成功
application/json
Body
data
array [object {5}]
必需
seed
integer
必需
prompt
string
必需
resolution
string
必需
url
string | null
必需
is_image_safe
boolean
必需
created
string
必需
示例
{
"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"
}