Describe
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
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
url | string | true | none | image URL to Midjourney |
ref | string | false | none | none |
webhookOverride | string | false | none | none |
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
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/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)
})