跳转到主要内容
POST
/
midjourney
/
videos
Midjourney Videos
curl --request POST \
  --url https://api.acedata.cloud/midjourney/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "generate",
  "mode": "fast",
  "resolution": "480p",
  "prompt": "A cat sitting on a table",
  "video_id": "<string>",
  "video_index": 123,
  "loop": true,
  "image_url": "<string>",
  "end_image_url": "<string>",
  "callback_url": "<string>"
}
'
{
  "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
action
enum<string>

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.

可用选项:
generate,
extend
mode
enum<string>

The default speed mode for video generation tasks is fast.

可用选项:
fast,
turbo
resolution
enum<string>

The default video clarity for generating video tasks is 720p.

可用选项:
480p,
720p
prompt
string

Generate prompt words for video tasks.

示例:

"A cat sitting on a table"

video_id
string

When expanding the video, the specified video_id is required.

video_index
number

When expanding, it is also necessary to specify the indexes of four videos, with the indexes starting from 0.

loop
boolean

Whether to generate a looping video, the default is false.

image_url
string

The link to the first frame reference image when generating the video.

end_image_url
string

Specify the image to generate the end frame of the video.

callback_url
string

Webhook callback URL for asynchronous notifications.

响应

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.