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 Execute Action Task Creation

POST
/api/v1/ai/draw/mj/action
After executing the Imagine text-to-image function, you can use this interface to perform actions such as enlarging, transforming, and subsequent scaling and partial redrawing.
Note: Since the two resource pools are independently managed, for continuous action execution, you need to ensure that the modes are the same. For example, an IMAGINE task executed in NORMAL mode can only continue to execute actions in NORMAL mode, and cannot execute optional actions in FAST mode that were initially started in NORMAL mode.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/x-www-form-urlencoded
model
string 
required
Model name
Example:
midjourney
taskId
string 
required
Task ID
Example:
1
customId
string 
required
Action Identifier ID
Example:
MJ::JOB::upsample::1::c8a0be68-0ccd-4ee6-bbfe-d211d692d3df
type
string 
optional
Choose Mj drawing resource pool type
Example:
FAST
webhook
string 
optional
Task callback
Example:
https://webhook.site/6b889958-8be5-4a05-bab9-f3fd0fe54b9c
base64Mask
string 
optional
Mask Base64 required for partial re-drawing (selected area pure white

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/action' \
--data-urlencode 'model=midjourney' \
--data-urlencode 'taskId=1' \
--data-urlencode 'customId=MJ::JOB::upsample::1::c8a0be68-0ccd-4ee6-bbfe-d211d692d3df' \
--data-urlencode 'type=FAST' \
--data-urlencode 'webhook=https://webhook.site/6b889958-8be5-4a05-bab9-f3fd0fe54b9c' \
--data-urlencode 'base64Mask='

Responses

🟢200成功
application/json
Body
statusCode
integer 
required
message
string 
required
data
integer 
required
Example
{
    "statusCode": 200,
    "message": "Success",
    "data": 22
}
Previous
Midjourney Text-to-Image Task Creation
Next
Midjourney Query Specific Task ID Execution Status
Built with