> ## 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.

# Get task

> Returns the task status and result. A failed generation still returns HTTP 200 with `status` `failed`.

Suggested polling: every 3 s for the first 30 s, every 5 s up to 2 min, then every 10 s.



## OpenAPI

````yaml /openapi/en/seedance-2-5-flash.json get /api/v3/contents/generations/tasks/{id}
openapi: 3.1.0
info:
  description: >-
    DreamTo Open Platform API. Generated from the Gateway source
    (apps/gateway/internal/service/seedance_v3_contract.go); do not edit by
    hand.
  title: Seedance 2.5 Flash · DreamTo Open Platform API
  version: v3
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Seedance 2 video generation
paths:
  /api/v3/contents/generations/tasks/{id}:
    get:
      tags:
        - Seedance 2 video generation
      summary: Get task
      description: >-
        Returns the task status and result. A failed generation still returns
        HTTP 200 with `status` `failed`.


        Suggested polling: every 3 s for the first 30 s, every 5 s up to 2 min,
        then every 10 s.
      operationId: seedanceGetTask
      parameters:
        - description: >-
            Task ID, the `id` returned at creation (prefixed with `task_`). A
            missing or foreign task returns 404 `not_found`.
          example: task_8c1d2e3f4a5b6c7d8e9f0a1b
          in: path
          name: id
          required: true
          schema:
            examples:
              - task_8c1d2e3f4a5b6c7d8e9f0a1b
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                Running:
                  summary: Running
                  value:
                    id: task_8c1d2e3f4a5b6c7d8e9f0a1b
                    model: seedance-2.5-flash
                    status: running
                    created_at: 1794384000
                    updated_at: 1794384004
                    request_id: req_b2c4d6e8f0a1b3c5d7e9f1a2
                Succeeded:
                  summary: Succeeded
                  value:
                    id: task_8c1d2e3f4a5b6c7d8e9f0a1b
                    model: seedance-2.5-flash
                    status: succeeded
                    content:
                      video_url: https://example-cdn.com/videos/2026/11/11/output.mp4
                    created_at: 1794384000
                    updated_at: 1794384196
                    duration: 5
                    ratio: '16:9'
                    resolution: 720p
                    output_format: mp4
                    usage:
                      completion_tokens: 108900
                      total_tokens: 108900
                    request_id: req_b2c4d6e8f0a1b3c5d7e9f1a2
                Failed:
                  summary: Failed
                  value:
                    id: task_8c1d2e3f4a5b6c7d8e9f0a1b
                    model: seedance-2.5-flash
                    status: failed
                    error:
                      code: task_failed
                      message: Video generation failed, please retry
                    created_at: 1794384000
                    updated_at: 1794384120
                    request_id: req_b2c4d6e8f0a1b3c5d7e9f1a2
              schema:
                $ref: '#/components/schemas/SeedanceV3TaskResponse'
          description: Success
          headers:
            X-Request-Id:
              description: >-
                Unique ID of this request (prefixed with `req_`). Present on
                every response, success or failure; include it and the task `id`
                when contacting support.
              schema:
                type: string
        '401':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: unauthorized
                      message: Invalid API key
                      type: authentication_error
                      http_status: 401
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: '`unauthorized`: missing or invalid API Key'
        '403':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: forbidden
                      message: No permission to access this resource
                      type: permission_error
                      http_status: 403
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: '`forbidden`: no permission for this resource'
        '404':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: not_found
                      message: Task not found
                      type: invalid_request_error
                      http_status: 404
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: '`not_found`: task not found, or model unknown / not enabled'
        '429':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: rate_limit_exceeded
                      message: Rate limit exceeded. Please try again later.
                      type: rate_limit_error
                      http_status: 429
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: '`rate_limit_exceeded`: too many requests, retry later'
        '500':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: api_error
                      message: Internal server error, please retry later
                      type: api_error
                      http_status: 500
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: '`api_error`: internal error, retryable'
        '503':
          content:
            application/json:
              examples:
                example:
                  value:
                    error:
                      code: service_unavailable
                      message: Service temporarily unavailable, please retry later
                      type: api_error
                      http_status: 503
                      request_id: req_3f9a1c2b7d4e5f60718293a4
                    request_id: req_3f9a1c2b7d4e5f60718293a4
              schema:
                $ref: '#/components/schemas/SeedanceV3ErrorResponse'
          description: >-
            `service_unavailable`: temporarily unavailable (502 / 503 / 504),
            retryable
components:
  schemas:
    SeedanceV3TaskResponse:
      additionalProperties: false
      description: >-
        Get-task response: the task object plus the `request_id` of this
        request.
      properties:
        id:
          description: Task ID (prefixed with `task_`).
          examples:
            - task_8c1d2e3f4a5b6c7d8e9f0a1b
          type: string
        model:
          description: The `model` given at creation, echoed unchanged.
          examples:
            - seedance-2.0
          type: string
        status:
          description: >-
            Task status. Branch on it: keep polling on `running`, read
            `content.video_url` on `succeeded`, read `error.message` on
            `failed`.


            **Allowed values:**

            - `running`: In progress (queued or generating); keep polling

            - `succeeded`: Succeeded; read `content.video_url`

            - `failed`: Failed; read `error.message`
          enum:
            - running
            - succeeded
            - failed
          type: string
        content:
          $ref: '#/components/schemas/SeedanceV3TaskOutput'
          description: Generated output, present only when `succeeded`.
        error:
          $ref: '#/components/schemas/SeedanceV3TaskError'
          description: Failure details, present only when `failed`.
        created_at:
          description: Task creation time, Unix timestamp in seconds.
          examples:
            - 1794384000
          format: int64
          type: integer
        updated_at:
          description: Last update time, Unix timestamp in seconds.
          examples:
            - 1794384196
          format: int64
          type: integer
        duration:
          description: >-
            Actual duration of the generated video in seconds. Authoritative
            when the request used `duration: -1` (smart duration).
          format: int64
          type: integer
        frames_per_second:
          description: Frame rate (FPS) of the generated video.
          format: int64
          type: integer
        ratio:
          description: Actual aspect ratio of the generated video, e.g. `16:9`.
          type: string
        resolution:
          description: Resolution of the generated video, e.g. `720p`.
          type: string
        seed:
          description: >-
            Seed actually used; pass it as `seed` in a new task to reproduce a
            similar result.
          format: int64
          type: integer
        generate_audio:
          description: Whether audio was generated.
          type: boolean
        output_format:
          description: Output container format, e.g. `mp4`.
          type: string
        service_tier:
          description: Service tier actually used (when reported by the model side).
          type: string
        priority:
          description: Task priority (when reported by the model side).
          format: int64
          type: integer
        execution_expires_after:
          description: Execution timeout in seconds (when reported by the model side).
          format: int64
          type: integer
        usage:
          $ref: '#/components/schemas/SeedanceV3TaskUsage'
          description: Token usage, present once the task has been metered.
        request_id:
          description: >-
            ID of this request (prefixed with `req_`), same as the
            `X-Request-Id` header. Include it and the task `id` when contacting
            support.
          examples:
            - req_b2c4d6e8f0a1b3c5d7e9f1a2
          type: string
      required:
        - request_id
        - id
        - model
        - status
        - created_at
        - updated_at
      type: object
    SeedanceV3ErrorResponse:
      additionalProperties: false
      description: >-
        Error response. Branch on the HTTP status first (retry / fix parameters
        / top up), then on `error.code` and `error.param`.
      properties:
        error:
          $ref: '#/components/schemas/SeedanceV3ErrorBody'
          description: Error object.
        request_id:
          description: >-
            ID of this request (prefixed with `req_`), same as the
            `X-Request-Id` header. Include it and the task `id` when contacting
            support.
          examples:
            - req_3f9a1c2b7d4e5f60718293a4
          type: string
      required:
        - error
        - request_id
      type: object
    SeedanceV3TaskOutput:
      additionalProperties: false
      description: Generated output.
      properties:
        video_url:
          description: >-
            Direct download URL of the generated video. Download it to your own
            storage soon after success; do not use it as a long-term URL.
          format: uri
          type: string
        last_frame_url:
          description: >-
            Last frame image URL, present only when `return_last_frame: true`
            was requested and a frame is available.
          format: uri
          type: string
      type: object
    SeedanceV3TaskError:
      additionalProperties: false
      description: Task failure details.
      properties:
        code:
          description: >-
            Error code, always `task_failed` for a failed task. The query
            endpoint still returns HTTP 200.
          enum:
            - task_failed
          type: string
        message:
          description: >-
            Readable failure reason, e.g. non-compliant material or a model
            limit exceeded; "Video generation failed, please retry" when
            unknown.
          type: string
      required:
        - code
        - message
      type: object
    SeedanceV3TaskUsage:
      additionalProperties: false
      description: Token usage. Fields that are 0 are omitted.
      properties:
        prompt_tokens:
          description: Tokens consumed by the input (prompt and reference media).
          format: int64
          type: integer
        completion_tokens:
          description: >-
            Tokens consumed by the generated video; depends on resolution,
            duration and frame rate.
          format: int64
          type: integer
        cache_tokens:
          description: Cached tokens.
          format: int64
          type: integer
        total_tokens:
          description: Total tokens.
          format: int64
          type: integer
        thoughts_tokens:
          description: Tokens consumed by model reasoning (thinking).
          format: int64
          type: integer
      type: object
    SeedanceV3ErrorBody:
      additionalProperties: false
      description: Error object.
      properties:
        code:
          description: >-
            Error code: `invalid_parameter` (validation failed),
            `invalid_request`, `unauthorized`, `insufficient_balance`,
            `forbidden`, `not_found`, `rate_limit_exceeded`, `api_error`,
            `service_unavailable`.
          examples:
            - invalid_parameter
          type: string
        message:
          description: Readable error description that can be shown to users.
          type: string
        type:
          description: >-
            Error category: `invalid_request_error`, `authentication_error`,
            `insufficient_balance_error`, `permission_error`,
            `rate_limit_error`, `api_error`.
          examples:
            - invalid_request_error
          type: string
        http_status:
          description: Same as the HTTP status code of the response.
          examples:
            - 400
          format: int64
          type: integer
        request_id:
          description: >-
            Request ID, same as the `X-Request-Id` header; include it when
            contacting support.
          examples:
            - req_3f9a1c2b7d4e5f60718293a4
          type: string
        param:
          description: >-
            The offending request field, present only for validation errors,
            e.g. `duration`, `content[1]`.
          examples:
            - duration
          type: string
      required:
        - code
        - message
        - type
        - http_status
        - request_id
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        Send `Authorization: Bearer <API Key>`. Create API Keys in the DreamTo
        console; all Keys of an account share the asset library.
      scheme: bearer
      type: http

````

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