Skip to content

Getting Started

Important Agreement

  • When submitting a task, you must include the header Authorization: Bearer hk-replace_with_your_key or Mj-Api-Secret: hk-replace_with_your_key
  • Midjourney API endpoint: https://api.openai-hk.com
  • Submitting an Imagine task is used as a DEMO Click to view Quick Start

Task Submission

Mode Endpoints

  • Mixed mode (to be removed): https://api.openai-hk.com
  • Fast mode: https://api.openai-hk.com/fast
  • Relax mode: https://api.openai-hk.com/relax
  • Prices vary for different modes. Please check the prices in Console -> Purchase KEY.

Execute Action

API Endpoint:/mj/submit/actionRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
  "notifyHook": "",
  "state": "",
  "taskId": "14001934816969359"
}
{
  "customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
  "notifyHook": "",
  "state": "",
  "taskId": "14001934816969359"
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
actionDTOactionDTObodytrueAction Execution ParametersAction Execution Parameters
customIdAction Identifiertruestring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
stateCustom Parameterfalsestring
taskIdTask IDtruestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Submit Blend Task

API Endpoint:/mj/submit/blendRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "base64Array": ["data:image/png;base64,xxx1", "data:image/png;base64,xxx2"],
  "dimensions": "SQUARE",
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "remix": true,
  "state": ""
}
{
  "base64Array": ["data:image/png;base64,xxx1", "data:image/png;base64,xxx2"],
  "dimensions": "SQUARE",
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "remix": true,
  "state": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
blendDTOblendDTObodytrueBlend Submission ParametersBlend Submission Parameters
base64ArrayImage base64 arraytruearraystring
dimensionsAspect Ratio: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2). Available values: PORTRAIT, SQUARE, LANDSCAPEfalsestring
instanceIdAccount Instance ID, specifies an account to execute the taskfalsestring
modesAccount Modes, filters accounts to execute the taskfalsearraystring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
remixAccount Remix, filters accounts to execute the taskfalseboolean
stateCustom Parameterfalsestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Submit Describe Task (Image to Text)

API Endpoint:/mj/submit/describeRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "base64": "data:image/png;base64,xxx",
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "remix": true,
  "state": ""
}
{
  "base64": "data:image/png;base64,xxx",
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "remix": true,
  "state": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
describeDTOdescribeDTObodytrueDescribe Submission ParametersDescribe Submission Parameters
base64Image base64truestring
instanceIdAccount Instance ID, specifies an account to execute the taskfalsestring
modesAccount Modes, filters accounts to execute the taskfalsearraystring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
remixAccount Remix, filters accounts to execute the taskfalseboolean
stateCustom Parameterfalsestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Submit Imagine Task

API Endpoint:/mj/submit/imagineRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "base64Array": [],
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "prompt": "Cat",
  "remix": true,
  "state": ""
}
{
  "base64Array": [],
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "prompt": "Cat",
  "remix": true,
  "state": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
imagineDTOimagineDTObodytrueImagine Submission ParametersImagine Submission Parameters
base64ArrayBase64 array of reference images (image prompt)falsearraystring
instanceIdAccount Instance ID, specifies an account to execute the taskfalsestring
modesAccount Modes, filters accounts to execute the taskfalsearraystring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
promptPrompttruestring
remixAccount Remix, filters accounts to execute the taskfalseboolean
stateCustom Parameterfalsestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Submit Modal Task

API Endpoint:/mj/submit/modalRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "maskBase64": "",
  "prompt": "",
  "taskId": "14001934816969359"
}
{
  "maskBase64": "",
  "prompt": "",
  "taskId": "14001934816969359"
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
modalDTOmodalDTObodytrueModal Submission ParametersModal Submission Parameters
maskBase64Base64 mask for Inpainting (Vary Region)falsestring
promptPromptfalsestring
taskIdTask IDtruestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Submit swap_face Task

API Endpoint:/mj/insight-face/swapRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

javascript
{
  "sourceBase64": "data:image/png;base64,xxx1",
  "targetBase64": "data:image/png;base64,xxx2",
  "accountFilter": {
    "instanceId": ""
  },
  "notifyHook": "",
  "state": ""
}
{
  "sourceBase64": "data:image/png;base64,xxx1",
  "targetBase64": "data:image/png;base64,xxx2",
  "accountFilter": {
    "instanceId": ""
  },
  "notifyHook": "",
  "state": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
swapFaceDTOswapFaceDTObodytrueSwapFace Submission ParametersSwapFace Submission Parameters
sourceBase64Source face image base64truestring
targetBase64Target image base64truestring
accountFilterFilter accounts to execute the task. Set to null or remove if not neededfalseFilterFilter
instanceIdAccount Instance IDfalsestring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
stateCustom Parameterfalsestring
Response Status:
Status CodeDescriptionSchema
--------------------------------------
200OKMessage«string»
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
---------------------------------------------------------------
codeinteger(int32)integer(int32)
descriptionstring
resultstring
Response Example:
javascript
{
	"code": 0,
	"description": "",
	"result": ""
}
{
	"code": 0,
	"description": "",
	"result": ""
}

Submit Shorten Task

API Endpoint:/mj/submit/shortenRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "prompt": "Cat",
  "remix": true,
  "state": ""
}
{
  "instanceId": "",
  "modes": [],
  "notifyHook": "",
  "prompt": "Cat",
  "remix": true,
  "state": ""
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
shortenDTOshortenDTObodytrueShorten Submission ParametersShorten Submission Parameters
instanceIdAccount Instance ID, specifies an account to execute the taskfalsestring
modesAccount Modes, filters accounts to execute the taskfalsearraystring
notifyHookCallback URL, uses global notifyHook if emptyfalsestring
promptPrompttruestring
remixAccount Remix, filters accounts to execute the taskfalseboolean
stateCustom Parameterfalsestring
Response Status:
Status CodeDescriptionSchema
----------------------------------------
200OKSubmission Result
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
------------------------------------------------------------------------------------------------------
codeStatus Code: 1(Submitted Successfully), 22(In Queue), other(Error)integer(int32)integer(int32)
descriptionDescriptionstring
propertiesExtended Fieldsobject
resultTask IDstring
Response Example:
json
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}
{
  "code": 1,
  "description": "Submitted successfully",
  "properties": {},
  "result": 1320098173412546
}

Create Video Task

API Endpoint:/mj/submit/videoRequest Method:POSTRequest Data Type:application/jsonRequest Example:

  • image supports base64 or url
  • videoType defaults to vid_1.1_i2v_480, price is 7.5 times the image generation price
  • For HD video, set videoType = vid_1.1_i2v_720, price is 26 times the image generation price
json
{
  "prompt": "A bee flies in",
  "motion": "low",
  "image": "[https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488](https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488)&",
  "notifyHook": "[https://sse.open-hk.com/openai/mjapi/9-8/](https://sse.open-hk.com/openai/mjapi/9-8/)",
  "videoType": "vid_1.1_i2v_480"
}
{
  "prompt": "A bee flies in",
  "motion": "low",
  "image": "[https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488](https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488)&",
  "notifyHook": "[https://sse.open-hk.com/openai/mjapi/9-8/](https://sse.open-hk.com/openai/mjapi/9-8/)",
  "videoType": "vid_1.1_i2v_480"
}

Response Body:

json
{
  "code": 1,
  "description": "Submit Success",
  "result": "1751352955547075"
}
{
  "code": 1,
  "description": "Submit Success",
  "result": "1751352955547075"
}
  • Fetch the result via result 1751352955547075
  • GET https://api.openai-hk.com/mj/task/1751275590720680/fetchReturned Task Result:
  • The result is under videoUrls, containing 4 video links
json
{
  "id": "1751275590720680",
  "action": "VIDEO",
  "customId": "",
  "botType": "",
  "prompt": "dogfight",
  "promptEn": "",
  "description": "Submit Success",
  "state": "",
  "mode": "",
  "proxy": "",
  "submitTime": 1751275590720,
  "startTime": 1751275590720,
  "finishTime": 1751275670864,
  "imageUrl": "[https://abc.om/upload_1751275589663574690.jpg](https://abc.om/upload_1751275589663574690.jpg)",
  "imageUrls": null,
  "imageHeight": 624,
  "imageWidth": 624,
  "videoUrl": "",
  "videoUrls": [
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4)"
    }
  ],
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "",
  "buttons": [],
  "maskBase64": "",
  "properties": {
    "notifyHook": "",
    "flags": 0,
    "messageId": "",
    "messageHash": "5938067e-b820-4938-b3ad-69d81778cbc4",
    "nonce": "",
    "customId": "",
    "finalPrompt": "[https://cdn.discordapp.com/upload_1751275589663574690.jpg](https://cdn.discordapp.com/upload_1751275589663574690.jpg) dogfight --ar 1:1 --v 7 --stylize 100 --relax",
    "progressMessageId": "",
    "messageContent": "",
    "discordInstanceId": "1372468820912115716",
    "discordChannelId": "1372468820912115716"
  }
}
{
  "id": "1751275590720680",
  "action": "VIDEO",
  "customId": "",
  "botType": "",
  "prompt": "dogfight",
  "promptEn": "",
  "description": "Submit Success",
  "state": "",
  "mode": "",
  "proxy": "",
  "submitTime": 1751275590720,
  "startTime": 1751275590720,
  "finishTime": 1751275670864,
  "imageUrl": "[https://abc.om/upload_1751275589663574690.jpg](https://abc.om/upload_1751275589663574690.jpg)",
  "imageUrls": null,
  "imageHeight": 624,
  "imageWidth": 624,
  "videoUrl": "",
  "videoUrls": [
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4)"
    },
    {
      "url": "[https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4](https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4)"
    }
  ],
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "",
  "buttons": [],
  "maskBase64": "",
  "properties": {
    "notifyHook": "",
    "flags": 0,
    "messageId": "",
    "messageHash": "5938067e-b820-4938-b3ad-69d81778cbc4",
    "nonce": "",
    "customId": "",
    "finalPrompt": "[https://cdn.discordapp.com/upload_1751275589663574690.jpg](https://cdn.discordapp.com/upload_1751275589663574690.jpg) dogfight --ar 1:1 --v 7 --stylize 100 --relax",
    "progressMessageId": "",
    "messageContent": "",
    "discordInstanceId": "1372468820912115716",
    "discordChannelId": "1372468820912115716"
  }
}

Video

Create Image Edit Task

API Endpoint:/mj/submit/editsRequest Method:POSTRequest Data Type:application/jsonRequest Example:

  • image supports base64 or url
json
{
  "prompt": "Change to a white background",
  "image": "[https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488](https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488)&",
  "notifyHook": "[https://yourback.com/](https://yourback.com/)",
  "state": "abc"
}
{
  "prompt": "Change to a white background",
  "image": "[https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488](https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488)&",
  "notifyHook": "[https://yourback.com/](https://yourback.com/)",
  "state": "abc"
}

Response Body:

json
{
  "code": 1,
  "description": "Submit Success",
  "result": "1751342042863641"
}
{
  "code": 1,
  "description": "Submit Success",
  "result": "1751342042863641"
}
  • Fetch the result via result 1751342042863641
  • GET https://api.openai-hk.com/mj/task/1751342042863641/fetchReturned Task Result:
  • The result is under imageUrls, containing 4 image links
json
{
  "id": "1751342042863641",
  "action": "EDITS",
  "customId": "",
  "botType": "",
  "prompt": "Change to a white background.",
  "promptEn": "Change to a white background.",
  "description": "Submit Success",
  "state": "9",
  "submitTime": 1751342042863,
  "startTime": 1751342044141,
  "finishTime": 1751342065872,
  "imageUrl": "[https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44](https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44)&",
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "",
  "buttons": [],
  "imageUrls": [
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png)"
    }
  ],
  "videoUrls": null,
  "videoUrl": "",
  "maskBase64": "",
  "properties": {
    "finalPrompt": "Change to a white background. --ar 1:1 --v 7 --stylize 100 --fast --dref [https://mjimg.open-hk.com/upload_1751342040607222256.png--fast](https://mjimg.open-hk.com/upload_1751342040607222256.png--fast)",
    "finalZhPrompt": ""
  }
}
{
  "id": "1751342042863641",
  "action": "EDITS",
  "customId": "",
  "botType": "",
  "prompt": "Change to a white background.",
  "promptEn": "Change to a white background.",
  "description": "Submit Success",
  "state": "9",
  "submitTime": 1751342042863,
  "startTime": 1751342044141,
  "finishTime": 1751342065872,
  "imageUrl": "[https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44](https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44)&",
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "",
  "buttons": [],
  "imageUrls": [
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png)"
    },
    {
      "url": "[https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png](https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png)"
    }
  ],
  "videoUrls": null,
  "videoUrl": "",
  "maskBase64": "",
  "properties": {
    "finalPrompt": "Change to a white background. --ar 1:1 --v 7 --stylize 100 --fast --dref [https://mjimg.open-hk.com/upload_1751342040607222256.png--fast](https://mjimg.open-hk.com/upload_1751342040607222256.png--fast)",
    "finalZhPrompt": ""
  }
}

Task Query

Fetch Task by Specific ID

API Endpoint:/mj/task/{id}/fetchRequest Method:GETRequest Data Type:application/x-www-form-urlencodedResponse Data Type:*/*Interface Description: Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
idTask IDpathfalsestring
Response Status:
Status CodeDescriptionSchema
-----------------------------
200OKTask
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
-------------------------------------------------------------------------------------------------------------------------
actionTask Type. Available values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTENstring
buttonsarrayActionable Buttons
customIdAction Identifierstring
emojiIconstring
labelTextstring
styleStyle: 2 (Primary), 3 (Green)integer(int32)
typeType, used internally by the systeminteger(int32)
descriptionTask Descriptionstring
failReasonFailure Reasonstring
finishTimeFinish Timeinteger(int64)integer(int64)
idIDstring
imageUrlImage URLstring
progressTask Progressstring
promptPromptstring
promptEnPrompt - Englishstring
propertiesobject
startTimeExecution Start Timeinteger(int64)integer(int64)
stateCustom Parameterstring
statusTask Status. Available values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESSstring
submitTimeSubmission Timeinteger(int64)integer(int64)
Response Example:
json
{
  "action": "",
  "buttons": [
    {
      "customId": "",
      "emoji": "",
      "label": "",
      "style": 0,
      "type": 0
    }
  ],
  "description": "",
  "failReason": "",
  "finishTime": 0,
  "id": "",
  "imageUrl": "",
  "progress": "",
  "prompt": "",
  "promptEn": "",
  "properties": {},
  "startTime": 0,
  "state": "",
  "status": "",
  "submitTime": 0
}
{
  "action": "",
  "buttons": [
    {
      "customId": "",
      "emoji": "",
      "label": "",
      "style": 0,
      "type": 0
    }
  ],
  "description": "",
  "failReason": "",
  "finishTime": 0,
  "id": "",
  "imageUrl": "",
  "progress": "",
  "prompt": "",
  "promptEn": "",
  "properties": {},
  "startTime": 0,
  "state": "",
  "status": "",
  "submitTime": 0
}

Fetch Image Seed of a Task

API Endpoint:/mj/task/{id}/image-seedRequest Method:GETRequest Data Type:application/x-www-form-urlencodedResponse Data Type:*/*Interface Description: Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
idTask IDpathfalsestring
Response Status:
Status CodeDescriptionSchema
--------------------------------------
200OKMessage«string»
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
---------------------------------------------------------------
codeinteger(int32)integer(int32)
descriptionstring
resultstring
Response Example:
json
{
  "code": 0,
  "description": "",
  "result": ""
}
{
  "code": 0,
  "description": "",
  "result": ""
}

Query Tasks by ID List

API Endpoint:/mj/task/list-by-conditionRequest Method:POSTRequest Data Type:application/jsonResponse Data Type:*/*Interface Description: Request Example:

json
{
  "ids": []
}
{
  "ids": []
}

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
conditionDTOconditionDTObodytrueTask Query ParametersTask Query Parameters
idsTask ID Arrayfalsearraystring
Response Status:
Status CodeDescriptionSchema
-----------------------------
200OKTask
201Created
401Unauthorized
403Forbidden
404Not Found
Response Parameters:
Parameter NameParameter DescriptionTypeSchema
-------------------------------------------------------------------------------------------------------------------------
actionTask Type. Available values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTENstring
buttonsarrayActionable Buttons
customIdAction Identifierstring
emojiIconstring
labelTextstring
styleStyle: 2 (Primary), 3 (Green)integer(int32)
typeType, used internally by the systeminteger(int32)
descriptionTask Descriptionstring
failReasonFailure Reasonstring
finishTimeFinish Timeinteger(int64)integer(int64)
idIDstring
imageUrlImage URLstring
progressTask Progressstring
promptPromptstring
promptEnPrompt - Englishstring
propertiesobject
startTimeExecution Start Timeinteger(int64)integer(int64)
stateCustom Parameterstring
statusTask Status. Available values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESSstring
submitTimeSubmission Timeinteger(int64)integer(int64)
Response Example:
json
[
  {
    "action": "",
    "buttons": [
      {
        "customId": "",
        "emoji": "",
        "label": "",
        "style": 0,
        "type": 0
      }
    ],
    "description": "",
    "failReason": "",
    "finishTime": 0,
    "id": "",
    "imageUrl": "",
    "progress": "",
    "prompt": "",
    "promptEn": "",
    "properties": {},
    "startTime": 0,
    "state": "",
    "status": "",
    "submitTime": 0
  }
]
[
  {
    "action": "",
    "buttons": [
      {
        "customId": "",
        "emoji": "",
        "label": "",
        "style": 0,
        "type": 0
      }
    ],
    "description": "",
    "failReason": "",
    "finishTime": 0,
    "id": "",
    "imageUrl": "",
    "progress": "",
    "prompt": "",
    "promptEn": "",
    "properties": {},
    "startTime": 0,
    "state": "",
    "status": "",
    "submitTime": 0
  }
]