AI Video Generation

Generate a 1–15 second video from a text description, optionally with one reference image, optionally keeping the model-generated sound (ambience, effects, etc.).

  • Billed per second, in two tiers: 768p and 480p. The duration is pre-charged when the task is created and fully refunded if generation fails.
  • Result videos carry the implicit AI-generated content label (TC260:AIGC in file metadata). See AI-Generated Content Labeling.
  • One clip usually takes a few minutes.

Create Task

Basics

ItemValue
MethodPOST
Path/task/video_generate
Content-Typeapplication/json
AuthAuthorization header (the API key itself)

Request Body

NameTypeRequiredDefaultDescription
promptstringYes—What to show: scene, motion, camera movement and sound. 1–5000 characters after trimming
image_file_idstringNo—Reference image: the file ID of an uploaded image (png / jpg / jpeg / webp). See Reference image
durationintegerNo5Length in seconds, 1–15
resolutionstringNo768p768p / 480p; sets the price, see Pricing
aspect_ratiostringNosee note16:9 / 9:16. If omitted: the closest match to the reference image when one is given, otherwise 16:9
audiobooleanNotrueKeep the model-generated sound; false removes the audio track
enginestringNoh3Engine; currently only h3

Request Examples

Text only:

curl -X POST https://api.ai-mcn.tv:10000/task/video_generate \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A paper boat drifting down a rainy street at night, slow dolly in, soft rain sound", "duration": 5}'

With a reference image (upload it first via File Upload to get its file_id):

curl -X POST https://api.ai-mcn.tv:10000/task/video_generate \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "The bronze statue stands among green trees, a breeze moves the leaves, the camera slowly pushes in", "image_file_id": "537489015178246", "duration": 6, "resolution": "480p"}'

Success Response

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "task_type": "video_generate",
    "status": "queued"
  }
}

With resolution set to 480p the task_type is video_generate_480p; both tiers use the same query endpoint.


Query Task Result

Basics

ItemValue
MethodGET
Path/task/video_generate/{task_id}
AuthAuthorization header (the API key itself)

Response Fields (output_result)

NameTypeDescription
file_idstringVideo file ID
download_urlstringVideo download path (mp4)
durationnumberMeasured length in seconds
width / heightintegerMeasured size
has_audiobooleanWhether the video has an audio track
enginestringEngine used
resolutionstringResolution used
aspect_ratiostringAspect ratio actually used (the default, or the one derived from the reference image)

Success Response

{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "537489015178247",
    "status": "completed",
    "progress": 100,
    "output_result": {
      "file_id": "537489015178248",
      "download_url": "/download/a1/output.mp4",
      "duration": 5.04,
      "width": 1344,
      "height": 768,
      "has_audio": true,
      "engine": "h3",
      "resolution": "768p",
      "aspect_ratio": "16:9"
    },
    "create_time": "2026-11-11T08:00:00Z",
    "update_time": "2026-11-11T08:04:10Z"
  }
}

Reference Image

  • The reference image sets the subject, composition and style. Write the prompt to match the image (describe only the motion, camera movement and sound that start from that frame) and the first frame will show the same picture, though not pixel-identical.
  • If the prompt describes a scene that conflicts with the image, the prompt wins and the first frame may look nothing like the image.
  • Use a reference image with the same aspect ratio as aspect_ratio (16:9 or 9:16); otherwise it is cropped.

Pricing

ResolutionPriceOne 5-second clip
768p90 credits per second450 credits
480p60 credits per second300 credits
  • The billing unit is seconds; the price list shows the same per-second prices as above.
  • duration is pre-charged on creation; failed generations (including moderation rejections) are fully refunded.
  • No free quota and no bundle; charged from the balance only.

Data Handling

Prompts and reference images are processed by a third-party video generation model service in mainland China.

Error Codes

CodeHTTPMeaningWhat to do
6016400Invalid value (empty or too long prompt; duration / resolution / aspect_ratio / audio / engine out of range; image_file_id not a string)No task is created and nothing is charged; fix the parameter
FILE_NOT_FOUND400The reference image does not existNo task, no charge
TYPE_NOT_MATCH400The reference image is not png / jpg / jpeg / webpNo task, no charge
6065—The prompt or reference image was rejected by the model service's content moderation (returned when the task fails)Fully refunded; adjust the prompt or image and retry

Usage Restrictions

  • Do not generate content that impersonates others, infringes on others' rights, or violates laws and regulations.
  • When publishing generated videos, label them as AI-generated as required by the platform.