Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "MiniMax-Hailuo-2.3",
    "prompt": "A cute cat running on grass",
    "duration": 6,
    "metadata": {
      "resolution": "768p",
      "prompt_optimizer": true,
      "fast_pretreatment": false,
      "watermark": false
    }
  }'
{
  "id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
  "object": "generation.task",
  "model": "MiniMax-Hailuo-2.3",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {
    "resolution": "768p"
  }
}
  • Async processing mode, returns task ID for subsequent queries
  • Supports text-to-video and image-to-video (first frame)
  • Supports 6-second and 10-second durations, 768p/1080p resolution
  • Supports 15 camera directives for cinematic control
  • Supports prompt optimization and watermark control
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in first_frame_image. Please use the Upload Image API first to upload images and get URLs, then call this endpoint.

Authorization

Authorization
string
required
All endpoints require Bearer Token authenticationGet your API Key: Visit the API Key Management Page to get your API KeyAdd to request header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

model
string
required
Video generation model name, fixed as MiniMax-Hailuo-2.3
prompt
string
required
Video content description (max 2000 characters)Describe scene, action, and style in detail for better results. Supports camera directives (see Camera Directives table below).Example: "A cute cat running on grass, sunny day"
duration
integer
default:"6"
Video duration (seconds)Options:
  • 6 - 6-second video
  • 10 - 10-second video
Default: 6
1080p limitation: When using 1080p resolution, only 6-second duration is supported.
metadata
object
Extended parameters for MiniMax-Hailuo-2.3

Resolution and Duration Combinations

ResolutionSupported DurationsNote
768p6s, 10sAll supported
1080p6s10s not supported

Camera Directives

Use [directive] syntax in the prompt to control camera movement. Supports 15 directive types:
CategoryDirectives
Pan[Pan left] [Pan right]
Tilt[Tilt up] [Tilt down]
Push/Pull[Push in] [Pull out]
Pedestal[Pedestal up] [Pedestal down]
Truck[Truck left] [Truck right]
Zoom[Zoom in] [Zoom out]
Other[Shake] [Tracking shot] [Static shot]
Usage tips:
  • Combine up to 3 directives in one bracket for simultaneous movement (e.g., [Pan left, Pedestal up])
  • Sequence directives in the prompt for ordered camera moves
  • Explicit commands yield more accurate results than natural language descriptions
Example:
{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "[Push in] A cat running in a garden, camera slowly pushes in for a close-up",
  "duration": 6,
  "metadata": {
    "resolution": "768p"
  }
}

Response

id
string
Unique task identifier for querying task status
object
string
Object type, fixed as generation.task
model
string
Model name used for generation
status
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation Unix timestamp
metadata
object
Task metadata

Use Cases

Case 1: Quick Text-to-Video Generation

{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "A cute cat running on grass, sunny day"
}

Case 2: High-Quality 1080p Video

{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "City night scene, neon lights flickering, traffic flowing",
  "duration": 6,
  "metadata": {
    "resolution": "1080p",
    "prompt_optimizer": true,
    "watermark": false
  }
}

Case 3: First Frame-Based Video Generation

{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "Person slowly turning around, smiling",
  "duration": 6,
  "metadata": {
    "resolution": "768p",
    "first_frame_image": "https://example.com/portrait.jpg"
  }
}

Case 4: Using Camera Directives

{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "[Push in] A cat running in a garden, camera slowly pushes in for a close-up",
  "duration": 6,
  "metadata": {
    "resolution": "768p"
  }
}

Case 5: Fast Pretreatment Mode

{
  "model": "MiniMax-Hailuo-2.3",
  "prompt": "Waves hitting the beach at sunset",
  "duration": 10,
  "metadata": {
    "resolution": "768p",
    "prompt_optimizer": true,
    "fast_pretreatment": true
  }
}
Query Task ResultsVideo generation is an async task that returns a task ID upon submission. Use the Get Task Status endpoint to query generation progress and results.
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "MiniMax-Hailuo-2.3",
    "prompt": "A cute cat running on grass",
    "duration": 6,
    "metadata": {
      "resolution": "768p",
      "prompt_optimizer": true,
      "fast_pretreatment": false,
      "watermark": false
    }
  }'
{
  "id": "video_01K8SGYNNNVBQTXNR4MM964S7K",
  "object": "generation.task",
  "model": "MiniMax-Hailuo-2.3",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {
    "resolution": "768p"
  }
}