Skip to main content
The main function of the Midjourney Describe API is to obtain descriptions of images by uploading them. To use this API, you only need to provide the image file URL, and the API will return a detailed description of the image. There is no need for complicated parameter settings to obtain high-quality image descriptions. It supports various image formats: whether it’s JPEG, PNG, or GIF, all mainstream image formats can be easily recognized and processed. This document will provide a detailed introduction to the integration instructions for the Midjourney Describe API, helping you easily integrate and fully utilize the powerful features of this API. With the Midjourney Describe API, you can easily automate image descriptions and improve business efficiency.

Application Process

To use the Midjourney Describe API, you need to first apply for the corresponding service on the application page Midjourney Describe API. After entering the page, click the “Acquire” button, as shown in the image below: Application Page If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page. There is a free quota available for first-time applicants, allowing you to use the API for free.

Request Example

Let’s take an image as an example to demonstrate how to use this API. Suppose we have a landscape image, and we will demonstrate how to upload this image and obtain a description.

Request Example Image

Example Image

Setting Request Headers and Request Body

Request Headers include:
  • accept: Specifies that the response should be in JSON format, set to application/json.
  • authorization: The key to call the API, which can be selected directly after application.
Request Body includes:
  • image_url: The URL of the uploaded image file.
Set it as shown in the image below:

Code Example

You can see that various language codes have been automatically generated on the right side of the page, as shown in the image:

Some code examples are as follows:

CURL

Python

Response Example

After a successful request, the API will return 4 description messages for the image. For example:
As you can see, the result contains a descriptions field, which includes four results, each being a candidate description.

Error Handling

When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:
  • 400 token_mismatched: Bad request, possibly due to missing or invalid parameters.
  • 400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.
  • 401 invalid_token: Unauthorized, invalid or missing authorization token.
  • 429 too_many_requests: Too many requests, you have exceeded the rate limit.
  • 500 api_error: Internal server error, something went wrong on the server.

Error Response Example

Conclusion

Through this document, you have learned how to use the Midjourney Describe API for image descriptions. We hope this document helps you better integrate and use this API. If you have any questions, please feel free to contact our technical support team.