# Run an Image to Video task.

This endpoint initiates the image to video conversion process. You must provide a template ID and source file (via URL or File ID). The task will be processed asynchronously, and you can check its status using the task_id returned in this response.

Endpoint: POST /s2s/v2.0/task/image-to-video
Security: BearerAuthenticationV2

## Request fields (application/json):

  - `dst_duration` (integer, required)
    The length of video in seconds. Only accept 5 or 10 seconds
    Enum: 5, 10

  - `mode` (string)
    The quailty mode. Standard (std) mode is faster speed, OK quailty. Professional (pro) mode is best quailty with richer details. Automatically select best mode by style if not provide.
    Enum: "std", "pro"

## Response 200 fields (application/json):

  - `status` (integer)
    Response status
    Example: 200

  - `data` (object)

  - `data.task_id` (string)
    ID of this task. Task result is valid to query by this ID for 24 hours.
    Example: grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe

## Response 400 fields (application/json):

  - `status` (integer)
    Response status
    Example: 400

  - `error` (string)
    Error message
    Example: The operation could not be completed

  - `error_code` (string)
    Error code:
* InvalidParameters - Invalid request parameters
* CreditInsufficiency - Insufficient unit to run
* BadRequest - Unexpected request parameter
* InvalidStyleGroup - Invalid style group id
* InvalidStyle - Invalid style id
    Enum: "InvalidParameters", "CreditInsufficiency", "InvalidStyleGroup", "InvalidStyle", "BadRequest"

## Response 401 fields (application/json):

  - `status` (integer)
    Response status
    Example: 401

  - `error` (string)
    Example: Invalid API key

## Response 429 fields (application/json):

  - `status` (integer)
    Response status
    Example: 429

  - `error` (string)
    Example: Too many requests

