OhMyGPT API Docs
  1. Midjourney Open API
OhMyGPT API Docs
  • About This site
  • About new website
  • Midjourney Open API
    • About Midjourney Service
    • Midjourney Blend Image Generation Task Creation
      POST
    • Midjourney Text-to-Image Task Creation
      POST
    • Midjourney Execute Action Task Creation
      POST
    • Midjourney Query Specific Task ID Execution Status
      POST
    • Midjourney Paginated Bulk Query Tasks
      POST
    • Midjourney Describe Prompt Extraction Task Creation
      POST
    • Retrieve Images Generated by Midjourney from Object Storage
      GET
    • Retrieve Compressed Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Retrieve Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Proxy Discord Images via WSRV
      GET
    • Proxy and Compress Discord Images via WSRV
      GET
  • Management API
    • Create a New API Key
      POST
    • Update API Key Information
      POST
    • Query All of User's API Keys
      POST
    • Delete Specified API Key
      POST
    • Query User Membership Expiration Date
      POST
    • User Balance Query
      POST
    • Query the current model rates
      GET
  • OpenAI
    • About OpenAI Compatible API
    • About Azure OpenAI API
    • Audio
      • Text To Speech API
    • Chat
      • Chat Completion
      • Completion (Legacy)
    • Images
      • Create Image
    • Realtime API
  • Anthropic Claude
    • Deprecated
      • ChatCompletions
      • Claude2 API
    • Anthropic Official Claude API
  • Policies
    • Terms of Service
    • Privacy Policy
  • Other OpenAPIs
    • Search API
      • Google Custom Search API
      • Google Search By Serper
    • Azure API
      • Get Azure TTS voice list
      • Azure TTS
  1. Midjourney Open API

Midjourney Paginated Bulk Query Tasks

POST
/api/v1/ai/draw/mj/query-mj-tasks
Query all Mj tasks under your account in batches through pagination.
Note:
Pagination is a common data query method that divides the query results into multiple pages, each containing a certain amount of data.
For example, if there are 10,000 pieces of data, it would not be best practice to query and return them all at once. In this case, we can request the server to deliver the data 12 per page and ask for the first page to get the latest data. The server will then return the data for the first page and inform you of the total amount of data.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Query Params
page
number 
optional
页标 [1,+∞]
Example:
1
pageSize
number 
optional
页面大小 [5~20]
Example:
12
Body Params application/x-www-form-urlencoded
model
string 
required
Model name, currently can only be filled with midjourney, used for key permission control.
Example:
midjourney

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ohmygpt.com/api/v1/ai/draw/mj/query-mj-tasks?page=1&pageSize=12' \
--data-urlencode 'model=midjourney'

Responses

🟢200成功
application/json
Body
statusCode
integer 
required
message
string 
required
data
object 
required
total
integer 
required
Mj任务总数目
tasks
array [object {15}] 
required
分页查询结果
Examples
{
    "statusCode": 200,
    "message": "Success",
    "data": {
        "taskId": 20,
        "taskType": "NORMAL",
        "status": "SUCCESS",
        "action": "IMAGINE",
        "progress": "100%",
        "description": "/imagine chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
        "prompt": "chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
        "failReason": null,
        "submitTime": "2023-08-31T13:59:14.000Z",
        "startTime": "2023-08-31T13:59:14.000Z",
        "finishTime": "2023-08-31T13:59:50.000Z",
        "webhookUrl": "https://webhook.site/9adf49d8-14c3-4270-b83e-25a9e93bcb40",
        "imageDcUrl": "https://cdn.discordapp.com/attachments/1136958712796430388/1146806560803262575/gpg4win_45703_chibi_manga_legend_of_vader_anime_vh1_in_the_styl_0b33153d-f3c4-486b-9b4a-2f0f0ae6a355.png",
        "imageS3Url": null,
        "actions": [
            {
                "customId": "MJ::JOB::upsample::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "U1"
            },
            {
                "customId": "MJ::JOB::upsample::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "U2"
            },
            {
                "customId": "MJ::JOB::upsample::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "U3"
            },
            {
                "customId": "MJ::JOB::upsample::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "U4"
            },
            {
                "customId": "MJ::JOB::reroll::0::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355::SOLO",
                "emoji": "🔄",
                "label": ""
            },
            {
                "customId": "MJ::JOB::variation::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "V1"
            },
            {
                "customId": "MJ::JOB::variation::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "V2"
            },
            {
                "customId": "MJ::JOB::variation::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "V3"
            },
            {
                "customId": "MJ::JOB::variation::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
                "emoji": "",
                "label": "V4"
            }
        ]
    }
}
Previous
Midjourney Query Specific Task ID Execution Status
Next
Midjourney Describe Prompt Extraction Task Creation
Built with