VMAN API Docs
  1. Ideogram图像(官方格式)
VMAN API Docs
  • 模型接口
    • 聊天接口(Chat)
      • 聊天接口
      • gpts
      • gemini-pro
      • gpt-4-all(分析图片)
      • gpt-4-vision-preview
    • 自动补全接口(Completions)
      • 内容补全接口
    • 图像接口(Images)
      • DALL·E 3
      • Stable-Diffusion
      • gpt-4-all(生成图片)
    • 向量生成接口(Embeddings)
      • 创建嵌入
    • 音频接口(Audio)
      • 创建转录
      • 创建翻译
      • TTS文本转语音
    • Midjourney
      • 补充 - 其他参数以及回调
      • InsightFace任务提交
        • 提交swap_face任务
      • 任务提交
        • 执行动作
        • 提交Blend任务
        • 提交Describe任务
        • 提交Imagine任务
        • 提交Modal
        • 提交Shorten任务
      • 任务查询
        • 查询所有任务
        • 根据ID列表查询任务
        • 分页查询任务
        • 查询任务队列
        • 取消任务
        • 指定ID获取任务
        • 获取任务图片的seed(需设置mj或niji的私信ID)
    • Suno音乐(逆向)
      • v3.0
        • 生成音乐
        • 获取音乐
        • 合并音乐
      • v3.5
        • 生成音乐
        • 获取音乐
    • Flux图像(官方格式)
      • flux-pro-1.1
      • flux-pro
      • flux-dev
      • flux-查询
    • Recraft图像(官方格式)
      • styles
        • 创建样式
      • images
        • 生成图像
        • 图像矢量化
        • 移除背景
        • 清晰度提升
        • 生成式放大
    • Stability AI图像(官方格式)
      • SD3
        • Stable Image Ultra
        • Stable Image Core
        • Stable Diffusion 3
      • SDXL
        • Text-to-image
    • Ideogram图像(官方格式)
      • Generate(文生图)
        POST
      • Remix(混合图)
        POST
      • Upscale(放大高清)
        POST
      • Describe(描述)
        POST
    • Ideogram图像(逆向)
      • 图片描述
      • 文生图
      • 合成图
      • 放大图片
      • ideogram任务查询
    • Kling视频(官方格式)
      • 图像生成
      • 文生视频
      • 图生视频
      • 查询任务
    • Luma视频(逆向)
      • 付费版
        • 生成视频
        • 获取视频
    • Runway视频(官方格式)
      • 图生视频
      • 任务查询
    • CogVideoX视频(官方格式)
      • CogVideoX视频生成
      • CogVideoX视频查询
    • Viggle舞蹈(逆向)
      • Mix上传视频并生成视频
      • Mix官方模板列表
      • Mix上传视频素材库
      • Mix上传图片素材库
      • Multi上传视频并生成视频
      • Multi模板列表
      • Move上传视频并生成视频
      • 查询视频任务
      • 剩余积分查询
  • 帮助中心
    • 常见问题及解决办法
  1. Ideogram图像(官方格式)

Generate(文生图)

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

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Authorization
string 
必需
默认值:
{{YOUR_API_KEY}}
Body 参数application/json
image_request
object 
必需
prompt
string 
必需
The prompt to use to generate the image. 生成图像的提示。
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
string 
可选
The model used to generate. Defaults to V_2. 用于生成的模型。默认为 V_2。
默认值:
V_2
示例值:
V_1V_2V_1_TURBOV_2_TURBO
magic_prompt_option
string 
可选
Determine if MagicPrompt should be used in generating the request or not 确定是否应该在生成请求时使用 MagicPrompt
默认值:
AUTO
示例值:
AUTOONOFF
seed
integer 
可选
0 to 2147483647
style_type
string 
可选
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 版本的模型指定。
示例值:
GENERALREALISTICDESIGNRENDER_3DANIME
negative_prompt
string 
可选
Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. 描述从图像中排除的内容。提示中的描述优先于负提示中的描述。
resolution
string 
可选
(For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio. (仅适用于 2.0 的 model_version,无法与 aspect_ratio 同时使用)用于图像生成的分辨率,以宽 x 高表示。如果没有指定,则默认为使用 aspect_ratio。
示例值:
RESOLUTION_576_1472
示例
{
  "image_request": {
    "model": "V_2",
    "magic_prompt_option": "AUTO",
    "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 is 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.",
    "aspect_ratio": "ASPECT_10_16",
    "seed": 12345,
    "style_type": "GENERAL",
    "negative_prompt": "string",
    "resolution": "string"
  }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mjdjourney.cn/ideogram/v1/generate' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "image_request": {
    "model": "V_2",
    "magic_prompt_option": "AUTO",
    "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 is 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.",
    "aspect_ratio": "ASPECT_10_16",
    "seed": 12345,
    "style_type": "GENERAL",
    "negative_prompt": "string",
    "resolution": "string"
  }
}'

返回响应

🟢200成功
application/json
Body
data
array [object {5}] 
必需
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. 请求创建的时间。
示例
{
  "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"
}
上一页
Text-to-image
下一页
Remix(混合图)
Built with