Slash Commands
POST
https://api.thenextleg.io/v2/slash-commandsSlash Commands reflect the slash commands that can be sent in Midjourney.
Request Body
cmd
The current slash commands we support are:relax- Do not consume fast hours (standard/pro tier only)fast- Consume fast hours (standard/pro tier only)private- Set stealth mode (pro tier only)stealth- Set stealth mode (pro tier only)
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": "relax",
"ref": "",
"webhookOverride": ""
});
var config = {
method: 'post',
url: 'https://api.thenextleg.io/v2/slash-commands',
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
200Success
Your response will return a messageId. Store this somewhere so you can match it with what's received in your webhook.
0
1
2
3
4
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-04-04T13:07:01.927Z"
}New! Get your progress and retrieve a Message using GET
After receiving your messageId you can use the GET /v2/message/<messageId> in order to retrieve your progress and image.
See the GET /v2/message/<messageId> docs for more information.
Webhook URL Response
Your webhook URL will receive a response with the following:
originatingMessageId- The request ID from your original requestcontent- A string containing a response from Midjourney
0
1
2
3
4
5
{
"createdAt": "2023-04-04T13:05:01.927Z",
"content": "Your now in relax mode",
"ref": "",
"responseAt": "2023-04-04T13:06:01.927Z"
}