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

# Get video · Jimeng compatible

> Check task status, handle failures and find the completed video.

## Polling and status

Replace `<TASK_ID>` with the returned `task_id`, keep the same `req_key` and poll every 10 to 15 seconds:

```bash theme={"system"}
curl "https://api.aiohub.org/jimeng/?Action=CVSync2AsyncGetResult&Version=2022-08-31" \
  -H "Authorization: Bearer <AIOHUB_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "req_key": "doubao-seedance-2-0-fast-260128",
    "task_id": "<TASK_ID>"
  }'
```

| `data.status` | Action |
| - | - |
| `SUBMITTED` / `QUEUED` / `IN_PROGRESS` | Keep polling |
| `SUCCESS` | Read `data.result_url` and download |
| `FAILURE` | Stop polling and read `data.fail_reason` |

Top-level `code: success` means the read succeeded, not that generation is complete. A successful task includes:

```json theme={"system"}
{
  "code": "success",
  "data": {
    "status": "SUCCESS",
    "result_url": "https://api.aiohub.org/v1/videos/task_example/content"
  }
}
```

After success, [download the video](/en/api/video-content).

## Failures and retries

After a polling disconnect, retry with the same `task_id`. On `FAILURE`, read `data.fail_reason`. Do not use `CVSync2AsyncSubmitTask` to retry a read. Files remain for 72 hours and task records for 7 days.

After a 429 or temporary service error, wait before retrying the read; do not create another task. If a task is missing, check the identifier and the account that owns the API key.


## OpenAPI

````yaml openapi/jimeng-result.en.json POST /jimeng/
openapi: 3.0.1
info:
  title: AIOHub Jimeng video API
  version: 1.0.0
servers:
  - url: https://api.aiohub.org
security: []
paths:
  /jimeng/:
    post:
      tags:
        - Jimeng video
      summary: Get Jimeng video task
      description: >
        Jimeng polling operation, selected by Action=CVSync2AsyncGetResult.


        Top-level code: success means the read succeeded. Check data.status:
        download data.result_url on SUCCESS and read data.fail_reason on
        FAILURE.
      operationId: getJimengSeedanceVideo
      parameters:
        - name: Action
          in: query
          required: true
          schema:
            type: string
            enum:
              - CVSync2AsyncGetResult
            default: CVSync2AsyncGetResult
          description: Operation name; use this page's fixed value.
        - name: Version
          in: query
          required: true
          schema:
            type: string
            enum:
              - '2022-08-31'
            default: '2022-08-31'
          description: Protocol version.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                req_key:
                  type: string
                  description: The model name used to create the task.
                task_id:
                  type: string
                  description: Top-level task_id from submission.
              required:
                - req_key
                - task_id
            example:
              req_key: doubao-seedance-2-0-fast-260128
              task_id: task_example
      responses:
        '200':
          description: Read succeeded; inspect data.status.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: success means the read succeeded, not the generation.
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - SUBMITTED
                          - QUEUED
                          - IN_PROGRESS
                          - SUCCESS
                          - FAILURE
                      progress:
                        type: string
                        description: Progress text, such as 100%.
                      result_url:
                        type: string
                        description: Authenticated HTTPS download URL on success.
                        format: uri
                      fail_reason:
                        type: string
                        description: Failure reason; inspect on FAILURE.
                      submit_time:
                        type: integer
                        format: int64
                      start_time:
                        type: integer
                        format: int64
                      finish_time:
                        type: integer
                        format: int64
                    required:
                      - task_id
                      - status
                      - fail_reason
                required:
                  - code
                  - data
              examples:
                pending:
                  summary: Pending
                  value:
                    code: success
                    message: ''
                    data:
                      task_id: task_example
                      status: IN_PROGRESS
                      progress: 50%
                      fail_reason: ''
                succeeded:
                  summary: Succeeded
                  value:
                    code: success
                    message: ''
                    data:
                      task_id: task_example
                      status: SUCCESS
                      progress: 100%
                      fail_reason: ''
                      result_url: https://api.aiohub.org/v1/videos/task_example/content
                failed:
                  summary: Failed
                  value:
                    code: success
                    message: ''
                    data:
                      task_id: task_example
                      status: FAILURE
                      fail_reason: Video generation failed
        '400':
          description: Invalid fields or task not found; check task_id and account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceTaskError'
        '401':
          description: Missing or invalid API key.
        '429':
          description: Too many requests; wait before retrying.
      security:
        - BearerAuth: []
components:
  schemas:
    SeedanceTaskError:
      type: object
      description: Error response of the video task endpoints.
      properties:
        code:
          type: string
          description: Error code
          example: invalid_duration
        message:
          type: string
          description: Error message
          example: duration must be between 4 and 30 seconds for this model
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key (sk-xxx)

````

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