OhMyGPT公开API文档
  1. Midjourney开放API接口
OhMyGPT公开API文档
  • 本站介绍
  • 更新日志
  • 新版网站介绍
  • 自助开票系统使用文档
  • Telegram Bot使用文档
  • 自建Cloudflare Worker反代教程
  • OhMyGPT Socket.IO 实时端点 [Alpha开放中]
  • Files文件存储服务 开放API
    • 文件存储服务
    • 文件上传
      POST
    • 文件信息更新
      POST
    • 删除文件
      POST
    • 用户查询 (分页)
      POST
    • 文件下载接口(Public公开文件下载)
      GET
    • 文件下载接口(Private私有文件下载)
      GET
  • OAuth开放API
    • 开放OAuth API介绍
    • 用户授权页
    • Code展示页
    • 申请access_token
    • 读取用户基本信息
    • 读取用户余额信息
    • 收取用户费用
    • 为用户创建一个Stripe Checkout充值订单
    • 为用户创建一个Stripe Invoice充值订单
    • 调用其它开放API
    • 通过OAuth Token读取用户管理Token
    • 通过OAuth Token更新用户管理Token
  • Midjourney、SD图像生成 API
    • Midjourney开放API接口
      • Midjourney服务说明文档
      • Midjourney 文生图 任务创建
        POST
      • Midjourney 执行动作 任务创建
        POST
      • Midjourney Blend 混合图生图 任务创建
        POST
      • Midjourney Describe prompt提取 任务创建
        POST
      • Midjourney 查询指定任务ID 的执行状态
        POST
      • Midjourney 分页批量查询任务
        POST
      • 从对象存储获取Midjourney生成的图片
        GET
      • 通过WSRV反代Discord图片
        GET
      • 通过WSRV反代并压缩Discord图片
        GET
      • 从对象存储+WSRV获取Midjourney生成的图片
        GET
      • 从对象存储+WSRV获取Midjourney生成的图片(压缩)
        GET
    • 其它图像生成API
      • ND图像生成 API
    • Flux图像生成
      • Flux Schnell 图像生成
      • Flux Dev 图像生成
      • Flux Pro 图像生成
      • Flux Pro 1.1 图像生成
      • Flux 1.1 Pro Ultura 图像生成
  • 管理API列表
    • 创建新的API Key
    • 修改API Key信息
    • 查询用户所有的API Key
    • 删除指定API Key
    • 查询用户会员到期日期接口
    • 用户余额查询接口
    • 查询当前模型倍率接口
  • Claude
    • Anthropic 原生 Messages API
    • Anthropic 原生 Completions 企业商用 API
    • Anthropic 原生 Messages Token Count API
  • OpenAI
    • 关于OpenAI兼容API接口说明
    • 关于Azure OpenAI API接口服务说明
    • Audio
      • TTS文本转语音服务
    • Chat
      • Chat Completion
      • Completion (Legacy)
    • Images
      • 图像生成
      • Image Edit
    • Embeddings
      • Embeddings
    • Realtime 实时通话端点
    • Models
  • 其它开放API
    • 搜索API
      • Google Custom Search API
      • Google Search By Serper
    • Azure API
      • Azure 文本转语音
      • Azure 获取TTS 语音列表
  1. Midjourney开放API接口

Midjourney 查询指定任务ID 的执行状态

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/ai/draw/mj/query

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/x-www-form-urlencoded
model
string 
必需
模型名称,目前只能填写midjourney,用于密钥权限控制
示例值:
midjourney
taskId
string 
任务ID
必需
示例值:
3432

示例代码

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://cn2us02.opapi.win/api/v1/ai/draw/mj/query' \
--data-urlencode 'model=midjourney' \
--data-urlencode 'taskId=3432'

返回响应

🟢200成功
application/json
Body
statusCode
integer 
必需
message
string 
必需
data
object 
必需
taskId
integer 
任务ID
必需
taskType
string 
任务类型
必需
status
string 
任务状态
必需
action
string 
任务动作
必需
progress
string 
任务进度
必需
description
string 
任务描述
必需
prompt
string 
Prompt
必需
failReason
null 
失败原因
必需
submitTime
string 
提交时间
必需
startTime
string 
开始时间
必需
finishTime
string 
完成时间
必需
webhookUrl
string 
回调地址
必需
imageDcUrl
string 
图片地址
必需
imageS3Url
null 
必需
actions
array [object {3}] 
此任务的附加可执行动作
必需
示例
{
  "statusCode": 200,
  "message": "Success",
  "data": {
    "taskId": 20,
    "taskType": "NORMAL",
    "status": "SUCCESS",
    "action": "IMAGINE",
    "progress": "100%",
    "description": "/imagine chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
    "prompt": "chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
    "failReason": null,
    "submitTime": "2023-08-31T13:59:14.000Z",
    "startTime": "2023-08-31T13:59:14.000Z",
    "finishTime": "2023-08-31T13:59:50.000Z",
    "webhookUrl": "https://webhook.site/9adf49d8-14c3-4270-b83e-25a9e93bcb40",
    "imageDcUrl": "https://cdn.discordapp.com/attachments/1136958712796430388/1146806560803262575/gpg4win_45703_chibi_manga_legend_of_vader_anime_vh1_in_the_styl_0b33153d-f3c4-486b-9b4a-2f0f0ae6a355.png",
    "imageS3Url": null,
    "actions": [
      {
        "customId": "MJ::JOB::upsample::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "U1"
      },
      {
        "customId": "MJ::JOB::upsample::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "U2"
      },
      {
        "customId": "MJ::JOB::upsample::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "U3"
      },
      {
        "customId": "MJ::JOB::upsample::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "U4"
      },
      {
        "customId": "MJ::JOB::reroll::0::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355::SOLO",
        "emoji": "🔄",
        "label": ""
      },
      {
        "customId": "MJ::JOB::variation::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "V1"
      },
      {
        "customId": "MJ::JOB::variation::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "V2"
      },
      {
        "customId": "MJ::JOB::variation::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "V3"
      },
      {
        "customId": "MJ::JOB::variation::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
        "emoji": "",
        "label": "V4"
      }
    ]
  }
}
上一页
Midjourney Describe prompt提取 任务创建
下一页
Midjourney 分页批量查询任务
Built with