# Midjourney Integration Guide

## Midjourney Integration Guide

### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.
This section contains endpoint-specific behavior, parameters, or usage notes for this API.

### Provider Notes

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

```
curl --request post
--url {{BASE_URL}}/fast/mj/submit/imagine
--header 'Authorization: Bearer sk-your-key'
-H "Content-Type: application/json"
--data '{
"base64Array": [],
"prompt": "black cat"
}'
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

```
curl --request GET
--url {{BASE_URL}}/fast/mj/task/1320098173412546/fetch
--header 'Authorization: Bearer sk-your-key'
-H "Content-Type: application/json"
```

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

```
{
"id": "1320098173412546",
"action": "IMAGINE",
"prompt": "cat --v 6.1",
"promptEn": "cat --v 6.1",
"description": "Submit success",
"state": "",
"submitTime": 1741531578038,
"startTime": 1741531580190,
"finishTime": 1741531608566,
"imageUrl": "https://img.innk.cc/attachments/1320066655572987907/1348306030429470862/adam_rivera4952_cat_26d56b92-4ed6-45e2-8561-563797923135.png?ex=67cefb57\u0026is=67cda9d7\u0026hm=b87e6b24e4bc3c2f1584b72154075607d6115602d0e5c7777e6637c29b8d3bd5\u0026",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"properties": {
"botType": "MID_JOURNEY",
"discordChannelId": 8774786694361674000,
"discordInstanceId": 7415633538733103000,
"finalPrompt": "cat --v 6.1 --sref \u003chttps://s.mj.run/ktqQpnwPoPk\u003e",
"flags": 0,
"messageContent": "**cat --v 6.1 --sref \u003chttps://s.mj.run/ktqQpnwPoPk\u003e** - \u003c@1343445981269594182\u003e (relaxed)",
"messageHash": "26d56b92-4ed6-45e2-8561-563797923135",
"messageId": "1348306030706036789",
"nonce": "1619855216344100864",
"notifyHook": "",
"progressMessageId": "1348305922325479495"
},
"buttons": [
{
"customId": "MJ::JOB::upsample::1::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "U1",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::upsample::2::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "U2",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::upsample::3::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "U3",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::upsample::4::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "U4",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::reroll::0::26d56b92-4ed6-45e2-8561-563797923135::SOLO",
"emoji": "🔄",
"label": "",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::variation::1::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "V1",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::variation::2::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "V2",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::variation::3::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "V3",
"style": 2,
"type": 2
},
{
"customId": "MJ::JOB::variation::4::26d56b92-4ed6-45e2-8561-563797923135",
"emoji": "",
"label": "V4",
"style": 2,
"type": 2
}
]
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

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

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

### Provider Notes

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

```
{
"base64Array": [],
"prompt": "Cat"
}
```

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| imagineDTO | imagineDTO | body | true | ImagineProvider note| ImagineProvider note|
| base64Array | Base64 array of reference images | false | array | string |  |
| prompt | Prompt | true | string |  |  |

##### Provider Notes

| Status Code | Notes | schema |
| --- | --- | --- |
| 200 | OK | Provider note|
| 401 | Unauthorized |  |
| 403 | Forbidden |  |
| 404 | Not Found |  |

##### Provider Notes

| Parameter Name | Parameter Description | Type | schema |
| --- | --- | --- | --- |
| code | Status Code: 1(Submission succeeded), 22(Provider note| integer(int32) | integer(int32) |
| description | Description | string |  |
| properties | Extended Fields | object |  |
| result | Task ID | string |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

```
{
"base64Array": [
"data:image/png;base64,xxx1",
"data:image/png;base64,xxx2"
],
"dimensions": "SQUARE"
}
```

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| blendDTO | blendDTO | body | true | BlendProvider note| BlendProvider note|
| base64Array | Base64 array of images | true | array | string |  |
| dimensions | Provider note| false | string |  |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

```
{
"base64": "data:image/png;base64,xxx"
}
```

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| describeDTO | describeDTO | body | true | DescribeProvider note| DescribeProvider note|
| base64 | imagebase64 | true | string |  |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

```
{
"prompt": "Cat"
}
```

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| shortenDTO | shortenDTO | body | true | ShortenProvider note| ShortenProvider note|
| prompt | Prompt | true | string |  |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

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

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| actionDTO | actionDTO | body | true | Provider note| Provider note|
| customId | Provider note| true | string |  |  |
| taskId | Task ID | true | string |  |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: POST

**Request Data Type**: application/json

**Response Data Type**: /

##### Example Request:

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

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| modalDTO | modalDTO | body | true | ModalProvider note| ModalProvider note|
| maskBase64 | Base64 mask for inpainting | false | string |  |  |
| prompt | Prompt | false | string |  |  |
| taskId | Task ID | true | string |  |  |

##### Example Response:

```
{
"code": 1,
"description": "Submission succeeded",
"properties": {},
"result": 1320098173412546
}
```

#### Provider Notes

This section contains endpoint-specific behavior, parameters, or usage notes for this API.

**Request Method**: GET

**Request Data Type**: application/x-www-form-urlencoded

**Response Data Type**: /

##### Example Request:

```
curl --request GET
--url {{BASE_URL}}/fast/mj/task/1320098173412546/fetch
--header 'Authorization: Bearer sk-your-key'
-H "Content-Type: application/json"
```

##### Request ParametersNotes:

| Parameter Name | Parameter Description | Request Type | Required | Data Type | schema |
| --- | --- | --- | --- | --- | --- |
| id | Task ID | path | true | string |  |

##### Provider Notes

| Parameter Name | Parameter Description | Type | schema |
| --- | --- | --- | --- |
| action | Provider note| string |  |
| buttons | Provider note| array |  |
| customId | Provider note| string |  |
| emoji | Provider note| string |  |
| label | Provider note| string |  |
| style | Provider note| integer(int32) |  |
| type | Provider note| integer(int32) |  |
| description | Provider note| string |  |
| failReason | FailureProvider note| string |  |
| finishTime | Provider note| integer(int64) | integer(int64) |
| id | ID | string |  |
| imageUrl | imageurl | string |  |
| progress | Provider note| string |  |
| prompt | Prompt | string |  |
| promptEn | Prompt in English | string |  |
| properties | Extended Fields | object |  |
| startTime | Provider note| integer(int64) | integer(int64) |
| state | Custom Parameters | string |  |
| status | Provider note| string |  |
| submitTime | Provider note| integer(int64) | integer(int64) |

##### Example Response:

```
{
"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
}
```
