Documentation
Image to Text (Describe)

Describe

POST
https://api.imaginepro.ai/api/v1/midjourney/describe

You can use Midjourney to describe an image that you upload and define. Describe is useful when you want to convert an image to text prompt.

  • Please make sure the image is not huge, file size less than 1MB is recommended.

POST /api/v1/midjourney/describe

Sample Request

{
  "url": "https://cdn.discordapp.com/attachments/123/123/123.png"
}

Request Body

NameTypeRequiredRestrictionsDescription
urlstringtruenoneimage URL to Midjourney
refstringfalsenonenone
webhookOverridestringfalsenonenone

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. For example:

{
  "url": "https://cdn.discordapp.com/attachments/123/123/123.png"
}

This will perform image to text generation. If you don't know where to upload your image, you can use this tool (opens in a new tab) to upload your image to our server, and copy the image URL.

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

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.imaginepro.ai/api/v1/midjourney/describe",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <your-token>",
  },
  data: {
    url: "https://cdn.discordapp.com/attachments/123/123/123.png",
  },
}
 
axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })