Перейти до основного вмісту
POST
/
midjourney
/
edits
Midjourney Edits
curl --request POST \
  --url https://api.acedata.cloud/midjourney/edits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mask": "<string>",
  "mode": "fast",
  "action": "generate",
  "prompt": "A cat sitting on a table",
  "image_url": "<string>",
  "callback_url": "<string>",
  "split_images": false
}
'
{
  "actions": [
    "upscale1",
    "upscale2",
    "upscale3",
    "upscale4",
    "reroll",
    "variation1",
    "variation2",
    "variation3",
    "variation4"
  ],
  "success": true,
  "task_id": "27a1128f-14b5-440e-a82d-510c81e6fcd4",
  "image_id": "1211290228438868029",
  "progress": 100,
  "image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&width=1024&height=1024",
  "image_width": 1024,
  "image_height": 1024,
  "raw_image_url": "https://midjourney.cdn.acedata.cloud/attachments/1219474225119887443/1211290228438868029/lwilson_A_cat_sitting_on_a_table_id2079872_dbe8e8a2-cec8-4e54-bd9d-4c2f8bfb919f.png?ex=65eda8ef&is=65db33ef&hm=2cec373068f121f3d2ecf43280810fe17b641527b87716e100401d299c8e0845&",
  "raw_image_width": 2048,
  "raw_image_height": 2048
}

Авторизації

Authorization
string
header
обов'язково

Заголовки

accept
enum<string>

Specifies the format of the response from the server.

Доступні опції:
application/json,
application/x-ndjson

Тіло

application/json
mask
string

The mask position of the image area can be specified for editing and re-generation.

mode
enum<string>

The default speed mode for image editing tasks is fast.

Доступні опції:
fast,
relax,
turbo
action
string
за замовчуванням:generate

Operation type. Use 'generate' for the first time and actions values for subsequent operations, and you can specify specific action to perform on the generated image.

prompt
string

Prompt words when editing pictures.

Приклад:

"A cat sitting on a table"

image_url
string

Link to the picture that needs to be edited.

callback_url
string

Webhook callback URL for asynchronous notifications.

split_images
boolean
за замовчуванням:false

Split the generated image into multiple images, return by sub_image_urls field. By default, it is false.

Відповідь

Image generated successfully or operation performed successfully.

actions
string[]

List of allowed actions that can be performed on the generated image.

success
boolean

Indicates if the task was successful executed.

task_id
string

The ID of the imagine task.

image_id
string

The unique identifier of the generated image.

progress
number

The progress of the task.

image_url
string

The URL of the generated thumbnail image, if you want to get the raw image use the raw_image_url field.

image_width
string

The width of the generated thumbnail image.

image_height
string

The height of the generated thumbnail image.

raw_image_url
string

The raw URL of the generated raw image.

raw_image_width
string

The height of the generated raw image.

raw_image_height
string

The height of the generated raw image.