Getting Started
Important Agreement
- When submitting a task, you must include the header
Authorization: Bearer hk-replace_with_your_keyorMj-Api-Secret: hk-replace_with_your_key - Midjourney API endpoint:
https://api.openai-hk.com - Submitting an
Imagine taskis 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:
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| actionDTO | actionDTO | body | true | Action Execution Parameters | Action Execution Parameters |
| customId | Action Identifier | true | string | ||
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| state | Custom Parameter | false | string | ||
| taskId | Task ID | true | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| blendDTO | blendDTO | body | true | Blend Submission Parameters | Blend Submission Parameters |
| base64Array | Image base64 array | true | array | string | |
| dimensions | Aspect Ratio: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2). Available values: PORTRAIT, SQUARE, LANDSCAPE | false | string | ||
| instanceId | Account Instance ID, specifies an account to execute the task | false | string | ||
| modes | Account Modes, filters accounts to execute the task | false | array | string | |
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| remix | Account Remix, filters accounts to execute the task | false | boolean | ||
| state | Custom Parameter | false | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| describeDTO | describeDTO | body | true | Describe Submission Parameters | Describe Submission Parameters |
| base64 | Image base64 | true | string | ||
| instanceId | Account Instance ID, specifies an account to execute the task | false | string | ||
| modes | Account Modes, filters accounts to execute the task | false | array | string | |
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| remix | Account Remix, filters accounts to execute the task | false | boolean | ||
| state | Custom Parameter | false | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
{
"base64Array": [],
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}{
"base64Array": [],
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}Request Parameters:
| Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| imagineDTO | imagineDTO | body | true | Imagine Submission Parameters | Imagine Submission Parameters |
| base64Array | Base64 array of reference images (image prompt) | false | array | string | |
| instanceId | Account Instance ID, specifies an account to execute the task | false | string | ||
| modes | Account Modes, filters accounts to execute the task | false | array | string | |
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| prompt | Prompt | true | string | ||
| remix | Account Remix, filters accounts to execute the task | false | boolean | ||
| state | Custom Parameter | false | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
{
"maskBase64": "",
"prompt": "",
"taskId": "14001934816969359"
}{
"maskBase64": "",
"prompt": "",
"taskId": "14001934816969359"
}Request Parameters:
| Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| modalDTO | modalDTO | body | true | Modal Submission Parameters | Modal Submission Parameters |
| maskBase64 | Base64 mask for Inpainting (Vary Region) | false | string | ||
| prompt | Prompt | false | string | ||
| taskId | Task ID | true | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| swapFaceDTO | swapFaceDTO | body | true | SwapFace Submission Parameters | SwapFace Submission Parameters |
| sourceBase64 | Source face image base64 | true | string | ||
| targetBase64 | Target image base64 | true | string | ||
| accountFilter | Filter accounts to execute the task. Set to null or remove if not needed | false | Filter | Filter | |
| instanceId | Account Instance ID | false | string | ||
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| state | Custom Parameter | false | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | --------------- | |||
| 200 | OK | Message«string» | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | --------------------- | -------------- | -------------- | ||
| code | integer(int32) | integer(int32) | |||
| description | string | ||||
| result | string | ||||
| Response Example: |
{
"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:
{
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}{
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}Request Parameters:
| Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| shortenDTO | shortenDTO | body | true | Shorten Submission Parameters | Shorten Submission Parameters |
| instanceId | Account Instance ID, specifies an account to execute the task | false | string | ||
| modes | Account Modes, filters accounts to execute the task | false | array | string | |
| notifyHook | Callback URL, uses global notifyHook if empty | false | string | ||
| prompt | Prompt | true | string | ||
| remix | Account Remix, filters accounts to execute the task | false | boolean | ||
| state | Custom Parameter | false | string | ||
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ----------------- | |||
| 200 | OK | Submission Result | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | ------------------------------------------------------------ | -------------- | -------------- | ||
| code | Status Code: 1(Submitted Successfully), 22(In Queue), other(Error) | integer(int32) | integer(int32) | ||
| description | Description | string | |||
| properties | Extended Fields | object | |||
| result | Task ID | string | |||
| Response Example: |
{
"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:
imagesupportsbase64orurlvideoTypedefaults tovid_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
{
"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:
{
"code": 1,
"description": "Submit Success",
"result": "1751352955547075"
}{
"code": 1,
"description": "Submit Success",
"result": "1751352955547075"
}- Fetch the result via
result1751352955547075 - GET
https://api.openai-hk.com/mj/task/1751275590720680/fetchReturned Task Result: - The result is under
videoUrls, containing 4 video links
{
"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
Set up the server side
Trigger Entry
Input Prompt
Result delivers 4 videos
Create Image Edit Task
API Endpoint:/mj/submit/editsRequest Method:POSTRequest Data Type:application/jsonRequest Example:
imagesupportsbase64orurl
{
"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:
{
"code": 1,
"description": "Submit Success",
"result": "1751342042863641"
}{
"code": 1,
"description": "Submit Success",
"result": "1751342042863641"
}- Fetch the result via
result1751342042863641 - GET
https://api.openai-hk.com/mj/task/1751342042863641/fetchReturned Task Result: - The result is under
imageUrls, containing 4 image links
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| id | Task ID | path | false | string | |
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ------ | |||
| 200 | OK | Task | |||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------------- | ------------------------------------------------------------------------- | -------------- | -------------- | ||
| action | Task Type. Available values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN | string | |||
| buttons | array | Actionable Buttons | |||
| customId | Action Identifier | string | |||
| emoji | Icon | string | |||
| label | Text | string | |||
| style | Style: 2 (Primary), 3 (Green) | integer(int32) | |||
| type | Type, used internally by the system | integer(int32) | |||
| description | Task Description | string | |||
| failReason | Failure Reason | string | |||
| finishTime | Finish Time | integer(int64) | integer(int64) | ||
| id | ID | string | |||
| imageUrl | Image URL | string | |||
| progress | Task Progress | string | |||
| prompt | Prompt | string | |||
| promptEn | Prompt - English | string | |||
| properties | object | ||||
| startTime | Execution Start Time | integer(int64) | integer(int64) | ||
| state | Custom Parameter | string | |||
| status | Task Status. Available values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESS | string | |||
| submitTime | Submission Time | integer(int64) | integer(int64) | ||
| Response Example: |
{
"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 Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| id | Task ID | path | false | string | |
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | --------------- | |||
| 200 | OK | Message«string» | |||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------- | --------------------- | -------------- | -------------- | ||
| code | integer(int32) | integer(int32) | |||
| description | string | ||||
| result | string | ||||
| Response Example: |
{
"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:
{
"ids": []
}{
"ids": []
}Request Parameters:
| Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
|---|---|---|---|---|---|
| conditionDTO | conditionDTO | body | true | Task Query Parameters | Task Query Parameters |
| ids | Task ID Array | false | array | string | |
| Response Status: | |||||
| Status Code | Description | Schema | |||
| ----------- | ------------ | ------ | |||
| 200 | OK | Task | |||
| 201 | Created | ||||
| 401 | Unauthorized | ||||
| 403 | Forbidden | ||||
| 404 | Not Found | ||||
| Response Parameters: | |||||
| Parameter Name | Parameter Description | Type | Schema | ||
| -------------------- | ------------------------------------------------------------------------- | -------------- | -------------- | ||
| action | Task Type. Available values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN | string | |||
| buttons | array | Actionable Buttons | |||
| customId | Action Identifier | string | |||
| emoji | Icon | string | |||
| label | Text | string | |||
| style | Style: 2 (Primary), 3 (Green) | integer(int32) | |||
| type | Type, used internally by the system | integer(int32) | |||
| description | Task Description | string | |||
| failReason | Failure Reason | string | |||
| finishTime | Finish Time | integer(int64) | integer(int64) | ||
| id | ID | string | |||
| imageUrl | Image URL | string | |||
| progress | Task Progress | string | |||
| prompt | Prompt | string | |||
| promptEn | Prompt - English | string | |||
| properties | object | ||||
| startTime | Execution Start Time | integer(int64) | integer(int64) | ||
| state | Custom Parameter | string | |||
| status | Task Status. Available values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESS | string | |||
| submitTime | Submission Time | integer(int64) | integer(int64) | ||
| Response Example: |
[
{
"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
}
]
OpenAi-HK