API Documentation

Use the proxy functionalities in your own scripts and applications.

Authentication
All API endpoints require your Midjourney cookie array to be passed in the request body under the `cookies` key. The value should be a stringified version of the JSON array.

Example Body:

{
  "cookies": "[{\"name\":\"__cf_bm\",...},{\"name\":\"__Host-Midjourney.AuthUserTokenV3_i\",...}]"
}
Get Folders
Fetches a list of your Midjourney folders.

POST /api/folders

Example Request:

curl -X POST -H "Content-Type: application/json" \
     -d '{"cookies": "..."}' \
     https://your-app-url/api/folders
Get Imagine Feed
Fetches your Midjourney imagine feed (latest images).

POST /api/imagine

Example Request:

curl -X POST -H "Content-Type: application/json" \
     -d '{"cookies": "..."}' \
     https://your-app-url/api/imagine
Get User Queue
Fetches the user's current running and waiting job queue.

POST /api/queue

Example Request:

curl -X POST -H "Content-Type: application/json" \
     -d '{"cookies": "..."}' \
     https://your-app-url/api/queue
Create Folder
Creates a new folder.

POST /api/create-folder

Body Parameters:

  • `folderName` (string, required): The name for the new folder.

Example Request:

curl -X POST -H "Content-Type: application/json" \
     -d '{"cookies": "...", "folderName": "My New API Folder"}' \
     https://your-app-url/api/create-folder
Generate Image
Submits a job to generate a new image. Can optionally add it to a collection.

POST /api/generate

Body Parameters:

  • `prompt` (string, required): The generation prompt.
  • `aspectRatio` (string, required): The desired aspect ratio (e.g., "16:9").
  • `collectionId` (string, optional): The ID of a folder to add the generated image to.

Example Request:

curl -X POST -H "Content-Type: application/json" \
     -d '{"cookies": "...", "prompt": "A cat in a hat", "aspectRatio": "1:1", "collectionId": "..."}' \
     https://your-app-url/api/generate