Documentation
Zoom

Zoom

POST
https://api.mymidjourney.ai/api/v1/midjourney/button

The API simulates a Zoom button click on the Midjourney channel. A completed image will return an array of buttons which you can subsequently invoke on the image. These buttons are dynamic and a list of buttons you can press are included in every image completion.

POST /api/v1/midjourney/button

Sample Request

{
  "messageId": "e57fb09d-25f0-49f7-8f0f-2e902ffe9fdd",
  "button": "Zoom Out 2x"
}

Request Body

NameTypeRequired
messageIdstringtrue
buttonstringtrue
refstringfalse
webhookOverridestringfalse

messageId

Use the messageId returned from your previous generation process.

button

A Midjourney valid button action, for zoom, it could be one of these: Zoom Out 2x, Zoom Out 1.5x. You need to make sure the value or the emoji is exactly the same as the allowed list, including the case.

ref (optional)

You can optionally pass ref in your command - which can be used useful when using webhooks

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. The webhook event payload is same as the Message endpoint response.

Sample Response

{
  "success": true,
  "messageId": "your-message-id",
  "createdAt": "2023-08-01T14:03:01.817Z"
}

Response Body

NameTypeDescription
successbooleana boolean value for the generation job creation status
messageIdstringthe messageId for querying the progress later
createdAtstringtimestamp of the task creation
errorstringerror message if any

Examples

const axios = require("axios")
 
const config = {
  method: "post",
  url: "https://api.mymidjourney.ai/api/v1/midjourney/button",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <your-token>",
  },
  data: {
    messageId: "e57fb09d-25f0-49f7-8f0f-2e902ffe9fdd",
    button: "Zoom Out 2x",
  },
}
 
axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })