Skip to main content

Video Generation API

video_diffusion(prompt, video_type=None, callback=None)

Generate a video from text prompt with optional image URL.
# Generate from text only
response = client.midjourney.video_diffusion(
    prompt="a flowing river through mountains",
    video_type=1,  # Optional: 0=480p, 1=720p
    callback="https://your-domain.com/webhook"
)

# Generate from image
response = client.midjourney.video_diffusion(
    prompt="https://example.com/image.png a flowing river through mountains",
    video_type=1
)
Parameters:
  • prompt (str): Video prompt or “[image_url] prompt text” (1-8192 characters)
  • video_type (int, optional): Quality (0=480p, 1=720p)
  • callback (str, optional): Webhook URL
Returns: TaskResponse with job_id and status

extend_video(job_id, video_no, prompt=None, callback=None)

Extend an existing video.
response = client.midjourney.extend_video(
    job_id="original-video-job-id",
    video_no=0,
    prompt="continue with dramatic lighting",
    callback="https://your-domain.com/webhook"
)
Parameters:
  • job_id (str): Original video task ID
  • video_no (int): Video index (0 or 1)
  • prompt (str, optional): Extension prompt (1-8192 characters)
  • callback (str, optional): Webhook URL

video_upscale(job_id, video_no, callback=None)

Upscale video to higher resolution.
response = client.midjourney.video_upscale(
    job_id="original-video-job-id",
    video_no=0,
    callback="https://your-domain.com/webhook"
)
Parameters:
  • job_id (str): Original video task ID
  • video_no (int): Video index (0 or 1)
  • callback (str, optional): Webhook URL

Next Steps