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

# Create video · Ark / Seedance

> Submit a Seedance video task using Ark / Seedance, with examples, input limits and full parameters.

Use this format for a new integration or for reference audio, reference video and video editing. See [Video models and pricing](/en/api/video-models).

## Setup

Use `https://api.aiohub.org`. Every request carries `Authorization: Bearer <AIOHUB_API_KEY>`. Replace the placeholder with your full `sk-` API key and choose a key group that can access the model.

## Example request

Start with a text-only request so no image setup is needed.

```bash theme={"system"}
curl https://api.aiohub.org/v1/contents/generations/tasks \
  -H "Authorization: Bearer <AIOHUB_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-5-260628",
    "content": [{"type": "text", "text": "A blue ceramic cup on a wooden table in daylight."}],
    "resolution": "720p",
    "ratio": "16:9",
    "duration": 5
  }'
```

Creation returns an `id`. Save it for polling; the video is not ready yet.

```json theme={"system"}
{"id": "task_example"}
```

After saving the task identifier, [poll the task](/en/api/video-ark-get).

## Image, audio and video inputs

An Ark / Seedance task request carries a `content[]` array of a text prompt and reference media. Each media item names its `role`:

| Media | `role` values |
| - | - |
| `image_url` | `first_frame` (default when omitted), `last_frame`, `reference_image` |
| `video_url` | `reference_video` |
| `audio_url` | `reference_audio` |

Media `url` values are HTTPS URLs. Images and audio also accept base64 data URLs such as `data:image/png;base64,...`. Each item may be up to 100 MB.

| Input | 2.5 | 2.0, 2.0 fast, 2.0 mini |
| - | - | - |
| Text only | yes | yes |
| One `first_frame` image | yes, any ratio | yes, any ratio |
| `first_frame` + `last_frame` | yes, `ratio: adaptive` | yes, any ratio |
| `reference_image` images only | 1 to 30 | 1 to 9 |
| Reference images with videos or audio | up to 30 images, 10 videos, 10 audios | up to 9 images, 3 videos, 3 audios |
| `reference_audio` only | 1 to 10 | |
| Video edit (`omni_reference_task_type: "edit"`) | one `reference_video`, `ratio: adaptive`, `duration: -1` | |

Images sent next to a video or audio need `role: reference_image`. Reference clips are 2 to 30 s each and 30 s in total on 2.5, and 2 to 15 s each and 15 s in total on the 2.0 series. An edit source video is 4 to 30 s and the output follows its length.

## Status callbacks

Set `callback_url` at creation to receive the task object by POST on status changes. Requests carry `User-Agent: AIOHub-LibTV-Callback/1`. Respond with 2xx within 5 seconds; failed deliveries are retried up to three times.

<Note>If creation times out without a task identifier, check the [usage log](https://api.aiohub.org/console/log) before resubmitting to avoid duplicate generation and charges. Correct parameters after a 400 and check the API key after a 401. See [Authentication](/en/api/authentication) for access and quota requirements.</Note>


## OpenAPI

````yaml openapi/relay.en.json POST /v1/contents/generations/tasks
openapi: 3.0.1
info:
  title: AIOHub API
  description: AIOHub public API
  version: 1.0.0
servers:
  - url: https://api.aiohub.org
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI Chat
  - name: OpenAI Responses
  - name: Image generation
  - name: OpenAI Images
  - name: Video generation
  - name: Claude Messages
  - name: Gemini API
  - name: OpenAI Embeddings
  - name: Text completions
  - name: OpenAI Audio
  - name: Realtime API
paths:
  /v1/contents/generations/tasks:
    post:
      tags:
        - Video generation
      summary: Create a video task
      description: >
        Submit a Seedance video generation task and get back its ID. The task
        runs asynchronously; read it by ID to poll the status and download the
        result.


        Models, resolutions, durations, input combinations and pricing are
        described in [Video models and pricing](/en/api/video-models).
        Validation failures return 400 and are not charged.
      operationId: createSeedanceVideoTask
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SeedanceCreateTaskRequest'
            examples:
              text:
                summary: Text to video
                value:
                  model: doubao-seedance-2-5-260628
                  content:
                    - type: text
                      text: >-
                        A blue ceramic cup on a wooden table in daylight, slow
                        camera push-in.
                  resolution: 720p
                  ratio: '16:9'
                  duration: 5
              first_frame:
                summary: First-frame image to video
                value:
                  model: doubao-seedance-2-5-260628
                  content:
                    - type: text
                      text: >-
                        A blue ceramic cup on a wooden table in daylight, slow
                        camera push-in.
                    - type: image_url
                      image_url:
                        url: https://example.com/first.png
                      role: first_frame
                  resolution: 720p
                  ratio: adaptive
                  duration: 5
                  generate_audio: true
              reference:
                summary: Reference image and audio
                value:
                  model: doubao-seedance-2-5-260628
                  content:
                    - type: text
                      text: >-
                        A blue ceramic cup on a wooden table in daylight, slow
                        camera push-in.
                    - type: image_url
                      image_url:
                        url: https://example.com/style.png
                      role: reference_image
                    - type: audio_url
                      audio_url:
                        url: https://example.com/voice.wav
                      role: reference_audio
                  resolution: 1080p
                  duration: 8
      responses:
        '200':
          description: Task created
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task ID
                required:
                  - id
              example:
                id: task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ
        '400':
          description: >-
            A field or value is outside the supported range. `code` is one of
            `unsupported_field`, `invalid_request`, `invalid_duration`,
            `unsupported_resolution`, `unsupported_ratio`, `invalid_media_mode`,
            `unsupported_media_carrier` or `invalid_media`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeedanceTaskError'
          headers: {}
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
        '403':
          description: Insufficient balance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
        '429':
          description: Upstream capacity is saturated, retry later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
        '503':
          description: >-
            The API key's group has no channel for the model; check the key
            group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    SeedanceCreateTaskRequest:
      type: object
      required:
        - model
        - content
      properties:
        model:
          type: string
          example: doubao-seedance-2-5-260628
          description: >-
            Video model name. See [Video generation](/en/api/video#models) for
            the models and their limits.
        content:
          type: array
          items:
            $ref: '#/components/schemas/SeedanceContentItem'
          description: >-
            Prompt and reference media. Text-to-video needs one `text` item
            only.
        resolution:
          type: string
          enum:
            - 480p
            - 720p
            - 1080p
            - 4k
          default: 720p
          description: Output resolution. The allowed values depend on the model.
        ratio:
          type: string
          enum:
            - adaptive
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - '21:9'
          default: adaptive
          description: >-
            Aspect ratio. `adaptive` lets the model follow the prompt or the
            input image.
        duration:
          type: integer
          default: 5
          description: >-
            Duration in whole seconds. The allowed range depends on the model.
            Video edit tasks use `-1`.
        generate_audio:
          type: boolean
          default: true
          description: Whether to generate audio.
        omni_reference_task_type:
          type: string
          enum:
            - auto
            - reference
            - edit
          default: auto
          description: >-
            How reference media is used. `edit` edits a single
            `reference_video`.
        return_last_frame:
          type: boolean
          default: false
          description: >-
            When `true`, the task result includes `content.last_frame_url`, a
            JPEG of the final frame.
        tools:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - web_search
          description: >-
            Set to `[{"type": "web_search"}]` to let the model search the web
            while generating.
        priority:
          type: integer
          minimum: 0
          maximum: 9
          default: 0
          description: >-
            Queue priority. Higher values dequeue earlier; running tasks are not
            preempted.
        callback_url:
          type: string
          format: uri
          description: >-
            Public HTTPS URL. AIOHub POSTs the task object to it on each status
            change; reply with 2xx within 5 seconds or the delivery is retried
            up to three times.
        safety_identifier:
          type: string
          maxLength: 64
          description: >-
            Stable end-user identifier, up to 64 characters, echoed in task
            reads.
    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
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameters
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
    SeedanceContentItem:
      type: object
      description: 'One `content[]` item: a text prompt or a reference media item.'
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image_url
            - video_url
            - audio_url
          description: Item type.
        text:
          type: string
          description: >-
            Prompt text, required when `type` is `text`. Several text items are
            joined with newlines, up to 20000 characters in total.
        image_url:
          type: object
          properties:
            url:
              type: string
              description: >-
                HTTPS URL, or a base64 data URL such as
                `data:image/png;base64,...`. Each media item may be up to 100
                MB.
          description: Required when `type` is `image_url`.
        video_url:
          type: object
          properties:
            url:
              type: string
              description: HTTPS URL of the video. Each media item may be up to 100 MB.
          description: Required when `type` is `video_url`.
        audio_url:
          type: object
          properties:
            url:
              type: string
              description: >-
                HTTPS URL, or a base64 data URL such as
                `data:audio/wav;base64,...`. Each media item may be up to 100
                MB.
          description: Required when `type` is `audio_url`.
        role:
          type: string
          enum:
            - first_frame
            - last_frame
            - reference_image
            - reference_video
            - reference_audio
          description: >-
            How the media is used. Images default to `first_frame`; images sent
            next to a video or audio need `reference_image`. Videos are always
            `reference_video` and audio is always `reference_audio`.
  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.