跳转到主要内容
POST
/
v1
/
midjourney
/
generations
/
video
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "the cat slowly turns its head to the camera",
    "image_urls": [
      "https://example.com/cat.png"
    ],
    "motion": "high",
    "batch_size": 4
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/midjourney/generations/video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "the cat slowly turns its head to the camera",
    "image_urls": [
      "https://example.com/cat.png"
    ],
    "motion": "high",
    "batch_size": 4
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KV52C0TEJSYZMCG0NCS4YWKK"
    }
  ]
}
图生视频(i2v)。固定 FAST 模式,无 speed 维度不支持纯文生视频(t2v),必须给首帧。时长固定约 5 秒。
项目内容
actionVIDEO
计费midjourney@video / midjourney@video-720p实扣 = 单价 × batch_size
必填image_urls(首帧)或 task_id(复用 imagine SUCCESS)

参数

字段类型必填默认说明
promptstring(继承父任务)视频提示词;为空时必须有 task_id
image_urlsstring[]起始帧(1 张,≤ 12 MiB);与 task_id 二选一
task_idstring复用已有 imagine SUCCESS;与 image_urls 二选一
indexint从 imagine 4 张图选哪张作首帧(03,配合 task_id
video_typestringvid_1.1_i2v_480分辨率档(见下表);含 720 → 走 @video-720p 计费
animate_modestringmanualmanual / autoauto 必须给 task_id + index
motionstringhighlow / high;运动幅度,不影响计费
batch_sizeint1必须 1 / 2 / 4,其他值视为 1;计费 × N
end_urlstring结束帧;设了后 video_type 自动升级为 start_end_*

video_type 合法值

分辨率模式命中价格
vid_1.1_i2v_480480p基础 i2v(默认)midjourney@video
vid_1.1_i2v_720720p基础 i2vmidjourney@video-720p
vid_1.1_i2v_start_end_480480p起止帧(传 end_url 时自动升级)midjourney@video
vid_1.1_i2v_start_end_720720p起止帧(传 end_url 时自动升级)midjourney@video-720p
不接受带 extend 的取值;仅支持上表列出的 video_type

请求示例

简单 i2v(自带首帧,batch 4):
{
  "prompt": "the cat slowly turns its head to the camera",
  "image_urls": ["https://example.com/cat.png"],
  "motion": "high",
  "batch_size": 4
}
起止帧 transition(传 end_url 自动升级为 start_end):
{
  "prompt": "transition smoothly from sunrise to sunset",
  "image_urls": ["https://example.com/sunrise.jpg"],
  "end_url": "https://example.com/sunset.jpg",
  "video_type": "vid_1.1_i2v_720"
}

响应

提交返回 task_id,轮询 GET /v1/tasks/{task_id}。SUCCESS 后含 video_url(首个)+ video_urlslength === batch_size,batch=1 时也是 1 个元素):
{
  "id": "task_xxx",
  "status": "SUCCESS",
  "action": "VIDEO",
  "mode": "FAST",
  "video_url": "https://r2.example.com/video-0.mp4",
  "video_urls": [
    "https://r2.example.com/video-0.mp4",
    "https://r2.example.com/video-1.mp4"
  ]
}

注意

  • 不支持纯文生视频(t2v):必须给 image_urlstask_id,否则返回 400;两者不能同时传。
  • 固定 FAST 模式,无 speed 维度(计费表里 @video-fast / @video-turbo 永不命中)。
  • batch_size 严格校验为 1 / 2 / 4batch=4 实扣 4 倍,预算敏感时用 batch=1
  • animate_mode=auto 必须同时给 task_id + index
  • 首帧 / 结束帧单图 ≤ 12 MiB。