Describe
https://api.thenextleg.io/api
You can use Midjourney to describe an image that you upload and define.
Request
Params
cmd
describe
url
The URL where the image is currently stored. This can be a URL to an image on the web, or a URL to an image on your server.
ref (optional)
You can optionally passref
in your command, that will be returned in the webhook response.webhookOverride (optional)
You can optionally pass webhookOverride
that will route your request to a different webhook.
Please note that if this is not configured correctly, you will not receive any response. If an image creation cannot be mapped back to it's original request, the webhook body will be routed to the default webhook.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var axios = require('axios');
var data = JSON.stringify({
"cmd": "describe",
"url": "your-url",
"ref": "",
"webhookOverride": ""
});
var config = {
method: 'post',
url: 'https://api.thenextleg.io/api',
headers: {
'Authorization': 'Bearer <your-token>',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
HTTP Response
Your response will return an initial messageId
. The main purpose is to let you know your message has been received.
The response to the actual request (imagine
or other) will be returned in your Webhook URL.
📘This is not an actual response to your original request. Your webhook URL will receive a message with a response to the original prompt.
0
1
2
3
4
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-04-04T13:07:01.927Z"
}
Webhook URL Response
Your webhook URL will receive a response with the following:
originatingMessageId
- The request ID from your original requestcontent
- An array of strings containing a response from Midjourneytype
describe
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"createdAt": {
"_nanoseconds": 215000000,
"_seconds": 1678840347
},
"originatingMessageId": "your-message-id",
"content": ["1️⃣ girl with pink hair wearing blue with red stars on her eyes, in the style of daz3d, ethereal cloudscapes, sailor moon manga style, the stars art group (xing xing), feminine body, loose forms, gentle color palette --ar 50:93",
"2️⃣ senria starry eyed anime girl, in the style of michael page, subtle pastel hues, daz3d, james jean, white and pink, romanticized figures, colorful cartoon --ar 50:93",
"3️⃣ a girl with blue hair and stars on her arms, in the style of light pink and light crimson, realistic hyper-detailed rendering, yanjun cheng, cartoon mis-en-scene, feminine body, dollcore, pseudo-realistic --ar 50:93",
"4️⃣ a picture of a woman with pink and blue hair, in the style of hyperrealistic fantasy, sailor moon manga style, romanticized figures, the stars art group (xing xing), feminine body, texture exploration, tinycore --ar 50:93"
],
"ref": "",
"type": "describe",
"responseAt": "2023-04-04T13:06:01.927Z"
}
