Commands
POST
https://api.imaginepro.ai/api/v1/midjourney/commands
Commands
reflect the slash commands that can be sent in Midjourney. The abilities of the slash commands are limited to the tier of the subscription you have with Midjourney.
Note: The Commands
endpoint is only available to the user who linked their own Discord token with us.
POST /api/v1/midjourney/commands
Sample Request
{
"cmd": "fast"
}
Request Body
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
cmd | string | true | none | the slash commands |
ref | string | false | none | none |
webhookOverride | string | false | none | none |
cmd
The current slash commands we support are:
relax
- Do not consume fast hours (DIY plan with linked Discord account only)fast
- Consume fast hours (DIY plan with linked Discord account only)turbo
- Use the turbo mode (DIY plan with linked Discord account only)cancel
- Cancel the job (DIY plan with linked Discord account only)remix
- Enable the remix mode (DIY plan with linked Discord account only)
{
"cmd": "fast"
}
ref (optional)
You can optionally pass ref
in your command - which can be used useful when using webhooks You might want to do this to pass some simple metadata through to your webhook.
webhookOverride (optional)
You can optionally pass webhookOverride
that will route a response to a webhook of your choosing. Please note that using a webhook is completely optional. You are welcome to use the GET Message endpoint to retrieve responses.
Sample Response
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-08-01T14:03:01.817Z"
}
Response Body
Name | Type | Description |
---|---|---|
success | boolean | a boolean value for the generation job creation status |
messageId | string | the messageId for querying the progress later |
createdAt | string | timestamp of the task creation |
error | string | error message if any |
Examples
const axios = require("axios")
const config = {
method: "post",
url: "https://api.imaginepro.ai/api/v1/midjourney/commands",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <your-token>",
},
data: {
cmd: "fast",
},
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})