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

# Create Task (Volc Compatible)

> Create a Seedance 2.0 task with a Volc-style REST body or Action request.

## Overview

These endpoints are for teams that already use the Volc-style Seedance task shape. They preserve the task-oriented request and response structure while using TokenLab authentication, billing, model availability, and task polling.

See also [Seedance 2.0 Video Models](/guides/seedance-2-video) and [Video Generation](/guides/video-generation).

## Authentication And Endpoints

* Use `Authorization: Bearer <TOKENLAB_API_KEY>`.
* Volc AK/SK signing is not accepted in this version. Requests with only AK/SK signing return a Volc-style authentication error.
* `Version` may be omitted. If provided, it must be `2024-01-01`.

| Mode          | Request                                                                 |
| ------------- | ----------------------------------------------------------------------- |
| REST create   | `POST /api/v3/contents/generations/tasks`                               |
| Action create | `POST /api/v3?Action=CreateContentsGenerationsTasks&Version=2024-01-01` |

## Content Rules

* `type: "text"` is the prompt text.
* `type: "image_url"` without `role`, or with `role: "first_frame"`, is treated as the first frame.
* `role: "last_frame"` must be paired with a first frame.
* `role: "reference_image"`, `reference_video`, and `reference_audio` are used as references.
* Do not mix first/last frame inputs with reference media in one request.

## Parameter Notes

* `ratio` accepts `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `21:9`, or `adaptive`.
* `duration` is the video length in seconds, including model-supported automatic duration values.
* `resolution` accepts `480p`, `720p`, `1080p`, or `4k` when supported by the selected Seedance model.
* `generate_audio` defaults to `true`; set it to `false` for a silent video.
* `watermark`, `return_last_frame`, `seed`, `priority`, `execution_expires_after`, and `safety_identifier` are accepted when valid for the selected model.
* `callback_url` is not supported yet. Poll task status instead.

## Image Preparation

When `content[]` contains image URLs, TokenLab prepares them as reusable materials when required by the selected Seedance model. If preparation is not complete within 60 seconds, the create request returns a retryable material-preparing error instead of submitting an incomplete video task.

## Create Response

```json theme={null}
{
  "id": "cgt-0123456789abcdef0123456789abcdef"
}
```

The create response contains only the compatibility task ID. Store it and poll the task endpoint.

## Example

### REST Create

```bash theme={null}
curl https://api.tokenlab.sh/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $TOKENLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {"type": "text", "text": "A cinematic forest at sunset"},
      {"type": "image_url", "role": "reference_image", "image_url": {"url": "https://example.com/ref.png"}}
    ],
    "ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "generate_audio": true
  }'
```

### Action Create

```bash theme={null}
curl "https://api.tokenlab.sh/api/v3?Action=CreateContentsGenerationsTasks&Version=2024-01-01" \
  -H "Authorization: Bearer $TOKENLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "content": [{"type": "text", "text": "A clean product reveal video"}],
    "ratio": "16:9",
    "duration": 5,
    "resolution": "720p"
  }'
```

## Next Step

Use the returned `cgt-...` ID with [Get Task (Volc Compatible)](/api-reference/video/get-volc-compatible-seedance-task) until the task reaches a terminal status.
