SKUAI接口文档
  1. Midjourney
SKUAI接口文档
  • 使用须知
  • OpenAI 通用接口
    • 聊天
      • 1.聊天接口(OpenAI格式通用)
    • 图像
      • 1.创建图像
      • 2.创建图片编辑
  • 绘图模型
    • Midjourney
      • 1.文生图(Imagine)接口
        POST
      • 2.按钮点击(Action)接口
        POST
      • 3.图片融合(Blend)接口
        POST
      • 4.窗口执行(Modal)接口
        POST
      • 5.图生文(Describe)接口
        POST
      • 6.缩短提示词(Shorten)接口
        POST
      • 7.换脸(FaceSwap)接口
        POST
      • 8.上传(upload)接口
        POST
      • 9.查询接口
        GET
      • 10.批量查询接口
        POST
      • 11.获取种子(Seed)接口
        GET
      • 12.刷新链接(Refresh)接口
        POST
    • Flux
      • 官方格式
        • 1.生成图片
        • 2.查询任务
      • OpenAI格式
        • 1.创建图像
        • 2.创建图片编辑
    • Ideogram
      • 1.Generate(文生图)
      • 2.Edit(编辑)
      • 3.Remix(混合图)
      • 4.Upscale(放大高清)
      • 5.Describe(图生文)
  • 音乐模型
    • Suno
      • zeakAi格式
        • 1.生成歌词接口
        • 2.获取歌词接口
        • 3.生成音乐(灵感模式)
        • 4.生成音乐(专业模式)
        • 5.生成音乐(翻唱模式)
        • 6.局部编辑音乐
        • 7.上传音乐
        • 8.续写音乐
        • 9.裁剪音乐
        • 10.合并音乐
        • 11.查询音乐
      • newApi格式
        • 1.生成歌词接口
        • 2.生成音乐接口
        • 3.上传音乐接口
        • 4.歌曲拼接接口
        • 5.查询任务
  1. Midjourney

9.查询接口

GET
/mj/task/{id}/fetch
通过任务id,查询任务信息。(可以通过轮询调用该接口,实现任务进行的查询。也可以通过回调接口获取)

请求参数

Path 参数
id
string 
任务ID
必需
示例值:
1712205491372224
Header 参数
Authorization
string 
必需
用户个人中心获取的密钥
示例值:
{{YOUR_API_KEY}}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://openapi.sku.vip/mj/task/1712205491372224/fetch' \
--header 'Authorization: ed822e3a-ec11-48d5-9739-55f4b402e7b0'

返回响应

🟢200成功
application/json
Body
id
string 
任务id
必需
action
string 
任务类型
必需
可用值:IMAGINE,UPSCALE,VARIATION,ZOOM,PAN,DESCRIBE,BLEND,SHORTEN,SWAP_FACE
status
string 
任务状态
必需
可用值:NOT_START,SUBMITTED,MODAL,IN_PROGRESS,FAILURE,SUCCESS,CANCEL
prompt
string 
提示词
必需
promptEn
string 
提示词英文
必需
description
string 
描述
必需
submitTime
integer 
提交时间
必需
startTime
integer 
开始执行时间
必需
finishTime
integer 
结束时间
必需
progress
string 
任务进度
必需
cost
number 
任务耗费积分
必需
imageUrl
string 
图片地址
必需
failReason
null 
失败原因
必需
buttons
array [object {5}] 
按钮数组
必需
图片下方对应的各个按钮数组,需要点击按钮的时候,把customId传给action接口即可
customId
string 
customId
必需
customId对应具体的按钮,执行action接口的时候,需要传对应的参数
emoji
string 
图标
必需
按钮对应图标
label
string 
文本
必需
按钮对应文本
type
integer 
类型
必需
按钮对应类型
style
integer 
样式
必需
按钮对应样式
properties
object 
额外信息
必需
任务的额外信息
flags
integer 
必需
nonce
string 
必需
botType
string 
必需
messageId
string 
必需
notifyHook
string 
必需
finalPrompt
string 
必需
messageHash
string 
必需
messageContent
string 
必需
discordChannelId
string 
必需
discordInstanceId
string 
必需
progressMessageId
string 
必需
state
string 
自定义参数
必需
seed
string 
种子值
必需
任务的种子值,没有的时候需要执行seed接口获取,可用于生成相似的图片
示例
{
    "id": "1735030480754475",
    "action": "IMAGINE",
    "status": "SUCCESS",
    "prompt": "Ghost warriors are weird and mysterious. It had no physical body, and its entire body was like a mist emitting a light blue light. It was wearing a dilapidated black iron armor and holding a dilapidated iron sword. The ghost warrior's body emitted light blue fluorescence, and its appearance was that of a middle-aged man. This is a style of fantasy art. Showing the entire body of the ghost warrior. The background of the picture is in the wilderness at night.    --s 550",
    "promptEn": "Ghost warriors are weird and mysterious. It had no physical body, and its entire body was like a mist emitting a light blue light. It was wearing a dilapidated black iron armor and holding a dilapidated iron sword. The ghost warrior's body emitted light blue fluorescence, and its appearance was that of a middle-aged man. This is a style of fantasy art. Showing the entire body of the ghost warrior. The background of the picture is in the wilderness at night.    --s 550",
    "description": "/imagine Ghost warriors are weird and mysterious. It had no physical body, and its entire body was like a mist emitting a light blue light. It was wearing a dilapidated black iron armor and holding a dilapidated iron sword. The ghost warrior's body emitted light blue fluorescence, and its appearance was that of a middle-aged man. This is a style of fantasy art. Showing the entire body of the ghost warrior. The background of the picture is in the wilderness at night.    --s 550",
    "submitTime": 1735030481000,
    "startTime": 1735030482000,
    "finishTime": 1735030513000,
    "progress": "100%",
    "cost": 2.0,
    "imageUrl": "https://cdn.discordapp.com/attachments/1300017421079285816/1321038423603023894/elijah_henderson7782_Ghost_warriors_are_weird_and_mysterious._I_3182402e-79db-44e7-b9d7-0e63b94539d1.png?ex=676bc867&is=676a76e7&hm=c1a61d04e43df35124b25fb6f1fb3f24ac405c0e032b7fafbd2b6004d3f182f0&",
    "failReason": null,
    "buttons": [
        {
            "customId": "MJ::JOB::upsample::1::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "U1",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::upsample::2::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "U2",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::upsample::3::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "U3",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::upsample::4::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "U4",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::reroll::0::3182402e-79db-44e7-b9d7-0e63b94539d1::SOLO",
            "emoji": "🔄",
            "label": "",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::variation::1::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "V1",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::variation::2::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "V2",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::variation::3::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "V3",
            "type": 2,
            "style": 2
        },
        {
            "customId": "MJ::JOB::variation::4::3182402e-79db-44e7-b9d7-0e63b94539d1",
            "emoji": "",
            "label": "V4",
            "type": 2,
            "style": 2
        }
    ],
    "properties": {
        "flags": 0,
        "nonce": "1592587638030860288",
        "botType": "MID_JOURNEY",
        "messageId": "1321038423821258774",
        "notifyHook": "",
        "finalPrompt": "Ghost warriors are weird and mysterious. It had no physical body, and its entire body was like a mist emitting a light blue light. It was wearing a dilapidated black iron armor and holding a dilapidated iron sword. The ghost warrior's body emitted light blue fluorescence, and its appearance was that of a middle-aged man. This is a style of fantasy art. Showing the entire body of the ghost warrior. The background of the picture is in the wilderness at night. --s 550",
        "messageHash": "3182402e-79db-44e7-b9d7-0e63b94539d1",
        "messageContent": "**Ghost warriors are weird and mysterious. It had no physical body, and its entire body was like a mist emitting a light blue light. It was wearing a dilapidated black iron armor and holding a dilapidated iron sword. The ghost warrior's body emitted light blue fluorescence, and its appearance was that of a middle-aged man. This is a style of fantasy art. Showing the entire body of the ghost warrior. The background of the picture is in the wilderness at night. --s 550** - <@1313218194701418518> (relaxed)",
        "discordChannelId": "8449902090796547417",
        "discordInstanceId": "5686143011994952502",
        "progressMessageId": "1321038298575274054"
    },
    "state": "",
    "seed": ""
}
修改于 2025-03-09 12:25:55
上一页
8.上传(upload)接口
下一页
10.批量查询接口
Built with