> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create task

> Creates a PixVerse video generation task: `model` picks the model, the generation parameters go in `input`, and the optional `callBackUrl` receives a completion callback. On success `data.taskId` is returned and the task runs asynchronously; poll the query endpoint for the result. Every response has HTTP status 200; check `code`.



## OpenAPI

````yaml /openapi/en/pixverse-v6-image-to-video.json post /api/v1/jobs/createTask
openapi: 3.1.0
info:
  description: >-
    PixVerse V6 image-to-video: animate one image as the first frame, or create
    an effect video from one of 50 PixVerse effect templates.
  title: PixVerse V6 Image to Video
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: PixVerse V6 Image to Video
paths:
  /api/v1/jobs/createTask:
    post:
      tags:
        - PixVerse V6 Image to Video
      summary: Create task
      description: >-
        Creates a PixVerse video generation task: `model` picks the model, the
        generation parameters go in `input`, and the optional `callBackUrl`
        receives a completion callback. On success `data.taskId` is returned and
        the task runs asynchronously; poll the query endpoint for the result.
        Every response has HTTP status 200; check `code`.
      operationId: pixverseCreateTask
      requestBody:
        content:
          application/json:
            examples:
              Image to video:
                description: >-
                  Pass one image in `image_urls` as the first frame; the aspect
                  ratio follows the image.
                summary: Image to video
                value:
                  model: pixverse-v6/image-to-video
                  input:
                    prompt: >-
                      The paper boat slowly drifts away on the calm lake,
                      ripples spreading in soft morning light
                    image_urls:
                      - https://your-cdn.example.com/first-frame.jpg
                    quality: 720p
                    duration: 5
              Multi-shot with audio:
                description: >-
                  A multi-shot video with sound that starts from the first
                  frame; 1080p, 10 seconds.
                summary: Multi-shot with audio
                value:
                  model: pixverse-v6/image-to-video
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    prompt: >-
                      The chef lays the steak on a hot iron plate with a loud
                      sizzle; cut to a close-up of melting butter; finally he
                      looks up and says to the camera: "Dinner is served."
                    image_urls:
                      - https://your-cdn.example.com/chef.jpg
                    quality: 1080p
                    duration: 10
                    generate_audio_switch: true
                    generate_multi_clip_switch: true
              Effect template (one image):
                description: >-
                  `template_id` selects an effect template whose duration is
                  fixed, so `duration` must be omitted; this template (Crowd
                  Focus) takes one image.
                summary: Effect template (one image)
                value:
                  model: pixverse-v6/image-to-video
                  input:
                    prompt: The stadium camera finds me in the crowd
                    image_urls:
                      - https://your-cdn.example.com/selfie.jpg
                    quality: 720p
                    template_id: '411174903569216'
              Effect template (two images):
                description: >-
                  A template with `effect_type` 2 (Dive into the deep blue of
                  love) takes two images.
                summary: Effect template (two images)
                value:
                  model: pixverse-v6/image-to-video
                  input:
                    prompt: The two people embrace in the deep blue sea
                    image_urls:
                      - https://your-cdn.example.com/person-a.jpg
                      - https://your-cdn.example.com/person-b.jpg
                    quality: 720p
                    template_id: '412736208886848'
            schema:
              $ref: >-
                #/components/schemas/PixVerseCreateTaskRequestPixVerseV6ImageToVideoInput
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                Created:
                  description: '`data.taskId` is the task ID.'
                  summary: Created
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                Invalid request (422):
                  description: The request is invalid; no task is created or charged.
                  summary: Invalid request (422)
                  value:
                    code: 422
                    msg: input.duration must be between 1 and 15.
                    data: null
                Unauthorized (401):
                  description: Missing or invalid API Key.
                  summary: Unauthorized (401)
                  value:
                    code: 401
                    msg: >-
                      Unauthorized - Authentication credentials are missing or
                      invalid
                    data: null
                Insufficient balance (402):
                  description: The balance does not cover the task.
                  summary: Insufficient balance (402)
                  value:
                    code: 402
                    msg: >-
                      Insufficient Credits - Account does not have enough
                      credits to perform the operation
                    data: null
                Rate limited (429):
                  description: Rate limit exceeded; retry later.
                  summary: Rate limited (429)
                  value:
                    code: 429
                    msg: >-
                      Rate Limited - Request limit has been exceeded for this
                      resource
                    data: null
                Server error (500):
                  description: >-
                    The service is temporarily unavailable; retry later. Not
                    charged.
                  summary: Server error (500)
                  value:
                    code: 500
                    msg: >-
                      Server Error - An unexpected error occurred while
                      processing the request
                    data: null
              schema:
                $ref: '#/components/schemas/PixVerseCreateTaskResponse'
          description: >-
            Always HTTP 200. With `code` `200` the task was created and
            `data.taskId` is its ID; any other `code` is an error with the
            reason in `msg` and `data` `null`.
          headers:
            X-Request-Id:
              description: ID of this request; include it when reporting issues.
              schema:
                type: string
components:
  schemas:
    PixVerseCreateTaskRequestPixVerseV6ImageToVideoInput:
      additionalProperties: false
      description: Request body of createTask.
      properties:
        model:
          default: pixverse-v6/image-to-video
          description: >-
            Model name; it decides the fields of `input`.


            **Allowed values:**

            - `pixverse-v6/image-to-video`: PixVerse V6 image-to-video (with
            effect templates)
          enum:
            - pixverse-v6/image-to-video
          type: string
        callBackUrl:
          description: >-
            Optional URL that receives a callback when the task finishes
            (success or failure); it must be a public `http` / `https` URL.
            Recommended in production; you can also just poll the query
            endpoint. See Task callback for the body and signature.
          type: string
        input:
          $ref: '#/components/schemas/PixVerseV6ImageToVideoInput'
          description: Generation parameters; the fields depend on `model`.
      required:
        - model
        - input
      type: object
    PixVerseCreateTaskResponse:
      additionalProperties: false
      description: Response of createTask; always HTTP 200.
      properties:
        code:
          description: >-
            Result code:

            - `200`: success

            - `401`: missing or invalid API Key

            - `402`: insufficient balance

            - `404`: the model does not exist or is not enabled

            - `405`: wrong HTTP method

            - `422`: invalid request, with the reason in `msg`; no task is
            created or charged

            - `429`: too many requests; retry later

            - `455`: service under maintenance

            - `500`: server error; retry later

            - `501`: generation failed

            - `505`: feature disabled
          format: int64
          type: integer
        msg:
          description: 'Message: `success`, or the English reason of an error.'
          type: string
        data:
          $ref: '#/components/schemas/PixVerseCreateTaskData'
          description: The task on success; `null` on error.
      required:
        - code
        - msg
        - data
      type: object
    PixVerseV6ImageToVideoInput:
      additionalProperties: false
      description: Generation parameters of `pixverse-v6/image-to-video`.
      properties:
        prompt:
          description: >-
            Prompt, required, 3–5,000 characters. Describe the subject, action,
            scene, camera movement and style; the more specific, the closer the
            result. With audio on you can write dialogue and sound effects.
          maxLength: 5000
          minLength: 3
          type: string
        image_urls:
          description: >-
            Image URLs: exactly one first-frame image without `template_id`; one
            or two images, as the template requires, with `template_id`. JPG,
            JPEG, PNG or WebP, up to 20 MB and 10,000 px per side, at public
            `http` / `https` URLs. The output video keeps the image's aspect
            ratio.
          items:
            type: string
          maxItems: 2
          minItems: 1
          type: array
        quality:
          description: >-
            Required output resolution, case-insensitive (`720P` equals `720p`).
            Higher resolutions cost more per second.


            **Allowed values:**

            - `360p`: 360p, the lowest price, for quick previews and prompt
            tuning

            - `540p`: 540p

            - `720p`: 720p HD

            - `1080p`: 1080p Full HD, the highest quality
          enum:
            - 360p
            - 540p
            - 720p
            - 1080p
          type: string
        duration:
          description: >-
            Video duration in seconds, an integer from `1` to `15`; billed per
            second. Required without `template_id`; must be omitted with
            `template_id` (the template sets the duration).
          format: int64
          maximum: 15
          minimum: 1
          type: integer
        generate_audio_switch:
          default: false
          description: >-
            Whether to generate audio that matches the picture (dialogue, sound
            effects and music); default `false`. With audio the with-audio price
            applies.
          type: boolean
        generate_multi_clip_switch:
          default: false
          description: >-
            Whether to generate a multi-shot video; default `false` (single
            shot). With it on the model cuts between shots following the prompt;
            the price is unchanged.
          type: boolean
        seed:
          description: >-
            Random seed, `0`–`2147483647`; random when omitted. The same
            parameters and seed help reproduce a result.
          format: int64
          maximum: 2147483647
          minimum: 0
          type: integer
        template_id:
          description: >-
            PixVerse effect template ID. With a template the template sets the
            duration, so `duration` must be omitted, and `image_urls` takes the
            one or two images the template needs. Without it the request is
            first-frame image-to-video.


            **Templates:**

            - `412736208886848`: Dive into the deep blue of love. Let every kiss
            turn into a dream. (2 images)

            - `411563216524736`: Skyline Track Flag. Unwavering. Next is the
            city-level entrance effect. (1 image)

            - `411316927927040`: Vibe Copines. Capture this vibe with tungtung.
            (1 image)

            - `411174903569216`: Crowd Focus. First person: the camera caught
            you. Upload a selfie or group photo to become the focus of the
            audience. (1 image)

            - `410999246341952`: Poke my little cutie. Pinch this little guy and
            watch it get cutely angry. (1 image)

            - `408891141511104`: Today is my birthday. Yes, I know you don't
            know me, but today is my birthday. (1 image)

            - `410317363057408`: Mini Football Hero. Turn any photo into a mini
            chibi football hero competing with giant players in a cinematic,
            hyper-realistic stadium. (1 image)

            - `410285445698304`: Magma Rise. Rise from the ashes. Fight fire
            with fire. (1 image)

            - `410133101388544`: Cyber Armor: Reborn in the Rain. Shatter the
            storm. Awaken the body of steel within. (1 image)

            - `409899296377728`: Product Landmark. Upload your product and turn
            it into a building. (1 image)

            - `408897485909952`: Mini Football Pitch. Upload your product and
            create a mini football pitch inside it. (1 image)

            - `408869061406656`: A kick through the world. Upload your product
            and let it shine on the night of the grand annual global
            competition. (1 image)

            - `408661207662528`: Small Town Footballer. Upload your product and
            enjoy the moment of victory. (1 image)

            - `409767750265728`: Crowned God in One Battle. You unexpectedly
            became the MVP of the game. (1 image)

            - `409766559675264`: Thriller Dance Steps. Upload a photo and watch
            it turn into an iconic viral dance trend. (1 image)

            - `409589071559552`: Dai Dai Dance. A vibe cheering dance: one
            front-facing photo joins the dance floor clip. (1 image)

            - `407804339389760`: Fluffy Chef. Upload your product and cook in
            the fluffy kitchen. (1 image)

            - `407658863287616`: Summer Postcard. Upload your product and join
            the summer special. (1 image)

            - `407474361215744`: Inhaled into Product Universe. Upload your
            product and enter the product universe. (1 image)

            - `407473438360320`: Fluffy Factory. Upload your product to make it
            in the fluffy factory. (1 image)

            - `407467702283008`: Surfing Summer. Upload your product photo and
            start surfing. (1 image)

            - `385844572217469`: Love Launcher. A Valentine's Day moment in one
            shot. (1 image)

            - `406428904874432`: Kitty Shop. Upload your product image and let
            the cute cat become your street vendor. (1 image)

            - `406423682060736`: Courtyard Makeover Party. Upload your courtyard
            and give it a magical makeover. (1 image)

            - `406411724685760`: Ski Joy. Upload a photo of your pet, toy or
            product and send it on a fun skiing adventure. (1 image)

            - `406372274350528`: Nail Lab. Upload your nail photos and let
            exclusive manicurists create exquisite nails for you. (1 image)

            - `406218913317312`: Rhythm Dash. Hit the beat, take the crown.
            Welcome to the perfect-score frenzy. (1 image)

            - `406218479198656`: Screen Killer King. The court needs a hero, so
            you break through the screen. (1 image)

            - `406064763308480`: Dynamic Football Poster. From selfie to jersey
            photo (single and multiplayer). (1 image)

            - `406413607395776`: Football Live King!. The moment you score a
            wonderful goal, supercar gifts pour down. (1 image)

            - `405662117814720`: Trophy Breakthrough. Upload your photo, become
            a champion football player, break through the screen and win the
            trophy. (1 image)

            - `406014934000064`: Post-match Sharp Comment. If the microphone is
            handed to you after the game, what would you say? (1 image)

            - `405658369331648`: Stadium Legend. Run, celebrate, create a
            legendary football moment. (1 image)

            - `405321470423488`: Step by Step. Step by step, shining with
            confidence. (1 image)

            - `405175211454656`: Superstar Lobby. Welcome to your championship
            season. (1 image)

            - `404955806201792`: Post-match Sharp Comment 2. If it's your turn
            for a post-match interview, what would you say about this game? (1
            image)

            - `404820147974080`: Top of the World. Hold the trophy high and
            become the well-deserved hero of the football feast. (2 images)

            - `398980393937856`: The Last Hug. The last hug before the tsunami
            comes. (2 images)

            - `403916646846400`: My Future has Infinite Possibilities. Embrace
            your infinite potential and shine your future. (1 image)

            - `403739217192896`: Apex Dance. Flat rhythm, decadent chaotic dance
            steps. (1 image)

            - `403560060358144`: Idol Ending Shot. One look up is a million
            direct shots. (1 image)

            - `403556618212098`: MotoGP Live. Live an unchoreographed moment. (1
            image)

            - `398965022284579`: Knee Slide. Celebrate the victory with an
            iconic, energetic knee-slide goal. (1 image)

            - `402201060373270`: Tunnel to Captain. Transform from an ordinary
            girl into a legendary football captain in a cinematic stadium
            journey. (1 image)

            - `403085292466285`: Golden Field Breaker. He is not on the list,
            but he still controls the scene. (1 image)

            - `402061828030966`: Trophy Celebration. Always wanted a huge
            trophy? Here you can at least get it digitally. (1 image)

            - `402888569901524`: Jump into the Crowd 2. Jump into the crowd. (1
            image)

            - `402155676592228`: World Champion Lift. You are the captain
            lifting the trophy: crowds of people, golden ribbons, pure victory.
            (1 image)

            - `402047865383360`: Sideline Ball Boy. Experience the game from the
            sidelines as a young talent ready to join in. (1 image)

            - `402046136040202`: Epic Save. Become a legendary goalkeeper and
            catch the ball with a stunning flying save. (1 image)
          type: string
      required:
        - prompt
        - image_urls
        - quality
      type: object
    PixVerseCreateTaskData:
      additionalProperties: false
      description: The created task.
      properties:
        taskId:
          description: >-
            Task ID (32 hex digits), used to query the task and to extend its
            video.
          type: string
      required:
        - taskId
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        API Key created in the DreamTo console, sent as `Authorization: Bearer
        <API Key>`.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.