Video AI

Generate stunning AI-powered videos from reference images and text prompts. Create cinematic animations with precise camera movements using our advanced video generation engine.

Pricing Information

Using the Video AI API costs 10 credits per video generation. Make sure you have sufficient credits in your account before making API calls.

Endpoint

HTTP Method
POST https://api.mnmlai.dev/v1/video-ai

Request

Send a POST request with multipart/form-data containing your reference image, prompt and optional parameters for video generation.

Required Parameters

ParameterTypeDescription
imageFileReference image for video generation (JPG, PNG, GIF, WebP; max 10MB). Required if start_image_url is not provided.
promptStringDescription of the video content and style. The API automatically adds cinematic framing and camera movement language. Required unless raw_prompt is provided.

Optional Parameters

ParameterTypeDefaultDescription
raw_promptStringSend your own prompt verbatim to the video model, bypassing the automatic cinematic framing and camera movement construction. When provided, prompt is not required and movement_type / direction are ignored.
start_image_urlStringURL of the start image. Alternative to uploading an image file. Either image or start_image_url is required.
end_image_urlStringURL of the end image for video transition. The generated video will animate from the start image to this end image.
durationNumber10Video duration in seconds | Maximum video length is 10 seconds | Only allowed 5 & 10 seconds
aspect_ratioString"16:9"Video aspect ratio (e.g., "16:9", "4:3", "1:1")
negative_promptString""Elements to exclude from the video
camera_movementString"pan_left"Controls the camera motion added to the prompt. Ignored when raw_prompt is used.
  • "pan_left" — camera pans to the left
  • "pan_right" — camera pans to the right
  • "tilt_up" — camera tilts upward
  • "tilt_down" — camera tilts downward
  • "zoom_in" — camera zooms in
  • "zoom_out" — camera zooms out
  • "static" — no camera movement
seedNumberrandomSeed for reproducible results (integer)

Response

The Video AI endpoint processes your request asynchronously. You'll receive a request ID that you can use to check the status and retrieve the generated video.

Success Response (200 OK)

{
  "status": "success",
  "id": "b09ssvpzzhrj00cmzt1bykjzp1",
  "seed": 123456,
  "prompt": "cinematic video animation, camera pans to the left, snowy mountain landscape with aurora borealis"
}

Examples

Basic Example

curl -X POST https://api.mnmlai.dev/v1/video-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/reference.jpg" \
  -F "prompt=snowy mountain landscape with aurora borealis"

URL-Based Example (No File Upload)

curl -X POST https://api.mnmlai.dev/v1/video-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "start_image_url=https://example.com/start.jpg" \
  -F "end_image_url=https://example.com/end.jpg" \
  -F "prompt=A king walks slowly through the grand hall"

Raw Prompt Example (Full Control)

curl -X POST https://api.mnmlai.dev/v1/video-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/reference.jpg" \
  -F "raw_prompt=A serene forest scene with birds flying slowly through misty morning light, slow dolly forward"

Use raw_prompt to send your own prompt exactly as-is — no cinematic prefix or camera movement text is added. The prompt, movement_type, and direction fields are ignored when raw_prompt is present.

Advanced Example with All Parameters

curl -X POST https://api.mnmlai.dev/v1/video-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/reference.jpg" \
  -F "prompt=snowy mountain landscape with aurora borealis" \
  -F "duration=10" \
  -F "aspect_ratio=16:9" \
  -F "negative_prompt=buildings, people" \
  -F "camera_movement=zoom_out" \
  -F "seed=42"

Node.js Example

const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');

const form = new FormData();
form.append('image', fs.createReadStream('reference.jpg'));
form.append('prompt', 'snowy mountain landscape with aurora borealis');
form.append('duration', '10');
form.append('aspect_ratio', '16:9');
form.append('negative_prompt', 'buildings, people');
form.append('camera_movement', 'zoom_out');
form.append('seed', '42');

const response = await axios.post(
  'https://api.mnmlai.dev/v1/video-ai',
  form,
  {
    headers: {
      'Accept': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY',
      ...form.getHeaders()
    }
  }
);

console.log('Request ID:', response.data.id);

Python Example

import requests

url = 'https://api.mnmlai.dev/v1/video-ai'

files = {
    'image': open('reference.jpg', 'rb')
}

data = {
    'prompt': 'snowy mountain landscape with aurora borealis',
    'duration': '10',
    'aspect_ratio': '16:9',
    'negative_prompt': 'buildings, people',
    'camera_movement': 'zoom_out',
    'seed': '42'
}

headers = {
    'Accept': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()

print(f"Request ID: {result['id']}")

# Clean up file handle
files['image'].close()

Image-to-Video Generation

The Video AI endpoint animates your reference images based on text prompts and camera movement settings. Upload an image and describe how you want it to be animated, and the AI will create a smooth video transition using our advanced video generation engine in pro mode for the highest quality results.

Processing Status

After submitting your request, use the Status Check endpoint with the returned ID to monitor processing progress:

Status Check Endpoint
GET https://api.mnmlai.dev/v1/status/{id}

Error Handling

Common Error Responses

// 400 Bad Request - Missing required parameters
{
  "status": "error",
  "code": "MISSING_PROMPT",
  "message": "Either prompt or raw_prompt is required"
}

// 400 Bad Request - Missing required image
{
  "status": "error",
  "code": "MISSING_IMAGE",
  "message": "Image is required"
}

// 400 Bad Request - Not enough credits
{
  "status": "error",
  "code": "NO_CREDITS",
  "message": "You do not have enough credits to use this feature"
}

// 400 Bad Request - Image too large
{
  "status": "error",
  "code": "IMAGE_TOO_LARGE",
  "message": "Image file is too large"
}

// 400 Bad Request - Invalid image type
{
  "status": "error",
  "code": "INVALID_IMAGE_TYPE",
  "message": "Invalid image type"
}

// 401 Unauthorized - Invalid API key
{
  "status": "error",
  "code": "UNAUTHORIZED",
  "message": "Invalid API key"
}

Related Endpoints

Explore other AI-powered design tools: