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

# doubao-seedance-2-0-fast-260128 (Text To Video)

## Authentication

1. Sign up for a GPTProto account at [https://gptproto.com](https://gptproto.com)
2. Navigate to the API Keys section in your dashboard
3. Generate a new API key (sk-xxxxx)
4. Copy and securely store your API key
   For authentication details, please refer to the [Authentication](https://docs.gptproto.com/authentication) section.

## Initiate Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://gptproto.com/api/v3/bytedance/doubao-seedance-2-0-fast-260128/text-to-video' \
  --header 'Authorization: GPTPROTO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "Multiple shots. A detective enters a dimly lit room, slow camera pan reveals scattered papers on a mahogany desk. Cut to close-up of a flickering candle, then wide shot of the detective picking up a blood-stained letter. Cinematic lighting, film noir style, 35mm lens.",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "seed": -1
  }'

  ```

  ```javascript JavaScript theme={null}
  const axios = require('axios');
  let data = JSON.stringify({
    "prompt": "Multiple shots. A detective enters a dimly lit room, slow camera pan reveals scattered papers on a mahogany desk. Cut to close-up of a flickering candle, then wide shot of the detective picking up a blood-stained letter. Cinematic lighting, film noir style, 35mm lens.",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "seed": -1
  });

  let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://gptproto.com/api/v3/bytedance/doubao-seedance-2-0-fast-260128/text-to-video',
    headers: { 
      'Authorization': 'GPTPROTO_API_KEY', 
      'Content-Type': 'application/json'
    },
    data : data
  };

  axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });


  ```

  ```python Python theme={null}
  import requests
  import json

  url = "https://gptproto.com/api/v3/bytedance/doubao-seedance-2-0-fast-260128/text-to-video"

  payload = json.dumps({
    "prompt": "Multiple shots. A detective enters a dimly lit room, slow camera pan reveals scattered papers on a mahogany desk. Cut to close-up of a flickering candle, then wide shot of the detective picking up a blood-stained letter. Cinematic lighting, film noir style, 35mm lens.",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "seed": -1
  })
  headers = {
    'Authorization': 'GPTPROTO_API_KEY',
    'Content-Type': 'application/json'
  }

  response = requests.request("POST", url, headers=headers, data=payload)

  print(response.text)


  ```

  ```go Go theme={null}
  package main

  import (
    "fmt"
    "strings"
    "net/http"
    "io"
  )

  func main() {

    url := "https://gptproto.com/api/v3/bytedance/doubao-seedance-2-0-fast-260128/text-to-video"
    method := "POST"

    payload := strings.NewReader(`{
    "prompt": "Multiple shots. A detective enters a dimly lit room, slow camera pan reveals scattered papers on a mahogany desk. Cut to close-up of a flickering candle, then wide shot of the detective picking up a blood-stained letter. Cinematic lighting, film noir style, 35mm lens.",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "seed": -1
  }`)

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
      fmt.Println(err)
      return
    }
    req.Header.Add("Authorization", "GPTPROTO_API_KEY")
    req.Header.Add("Content-Type", "application/json")

    res, err := client.Do(req)
    if err != nil {
      fmt.Println(err)
      return
    }
    defer res.Body.Close()

    body, err := io.ReadAll(res.Body)
    if err != nil {
      fmt.Println(err)
      return
    }
    fmt.Println(string(body))
  }

  ```
</CodeGroup>

## Query Result

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://gptproto.com/api/v3/predictions/{id}/result" \
    -H "Authorization: GPTPROTO_API_KEY" \
    -H "Content-Type: application/json"
  ```

  ```python Python theme={null}
  import requests
  import json

  url = "https://gptproto.com/api/v3/predictions/{id}/result"
  headers = {
      "Authorization: GPTPROTO_API_KEY",
      "Content-Type": "application/json"
  }

  response = requests.get(url, headers=headers)
  result = response.json()
  print(json.dumps(result, indent=2))
  ```

  ```javascript JavaScript theme={null}
  const url = "https://gptproto.com/api/v3/predictions/{id}/result";
  const headers = {
    "Authorization: GPTPROTO_API_KEY",
    "Content-Type": "application/json"
  };

  fetch(url, {
    method: "GET",
    headers: headers
  })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error("Error:", error));
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "io/ioutil"
      "net/http"
  )

  func main() {
      url := "https://gptproto.com/api/v3/predictions/{id}/result"

      req, _ := http.NewRequest("GET", url, nil)
      req.Header.Set("Authorization", "GPTPROTO_API_KEY")
      req.Header.Set("Content-Type", "application/json")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      body, _ := ioutil.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

After submitting your prediction request, the response will contain the id you need.\
You can find it in either:

* `data.id` – the unique identifier of the prediction
* `data.urls[0].get` – a ready-to-use GET URL that already embeds the id

<Accordion title="Response Example">
  ```json theme={null}
  {
      "data": {
          "id": "abc",
          "model": "model_name",
          "outputs": [],
          "urls": {
              "get": "https://gptproto.com/api/v3/predictions/abc/result"
          },
          "status": "created",
          "error": null,
          "executionTime": 0,
          "timings": {
              "inference": 0
          },
          "has_nsfw_contents": [],
          "created_at": "2026-01-01 00:00:00"
      },
      "message": "success",
      "code": 200
  }
  ```

  **Status Enum**

  | Status      | Description |
  | ----------- | ----------- |
  | `queued`    | Queued      |
  | `running`   | Running     |
  | `succeeded` | Succeeded   |
  | `failed`    | Failed      |
  | `expired`   | Expired     |
</Accordion>

## Parameters

> **Note:** Different models may support different parameter options. For more details, please refer to the [Model Field Compatibility](#model-field-compatibility) table.

<Tabs>
  <Tab title="Text to Video" icon="video">
    ### Core Parameters

    | Parameter        | Type    | Required | Default | Range                                                           | Description                                                                       |
    | ---------------- | ------- | -------- | ------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------- |
    | `prompt`         | string  | ✅ Yes    | -       | -                                                               | The positive prompt for the generation.                                           |
    | `aspect_ratio`   | string  | ❌ No     | `16:9`  | `21:9`<br />`16:9`<br />`4:3`<br />`1:1`<br />`3:4`<br />`9:16` | The aspect ratio of the generated media.                                          |
    | `duration`       | string  | ❌ No     | `5`     | `4 ~ 15`                                                        | The duration of the generated media in seconds.                                   |
    | `resolution`     | string  | ❌ No     | `720p`  | `720p`<br />`480p`<br />`1080p`                                 | Video resolution.                                                                 |
    | `generate_audio` | boolean | ❌ No     | `true`  | `false`, `true`                                                 | Whether to generate audio.                                                        |
    | `camera_fixed`   | boolean | ❌ No     | `false` | `false`, `true`                                                 | Whether to fix the camera position.                                               |
    | `seed`           | integer | ❌ No     | `-1`    | `-1 ~ 2147483647`                                               | The random seed to use for the generation. `-1` means a random seed will be used. |
  </Tab>

  <Tab title="Image to Video" icon="image">
    ### Video Generation Scenarios

    <CodeGroup>
      ```json First Frame theme={null}
        {
            "prompt": "A girl holding a fox opens her eyes and looks gently at the camera. The fox is held affectionately. The camera slowly pulls back as the girl's hair is blown by the wind. Wind sounds can be heard",
            "image": "https://example.com/ref_image_1.png"
        }
      ```

      ```json First & Last Frame theme={null}
        {
            "prompt": "The girl in the picture says 'cheese' to the camera with 360-degree surrounding camera movement",
            "image": "https://example.com/ref_image_1.png",
            "last_image": "https://example.com/ref_image_2.png"
        }
      ```
    </CodeGroup>

    ### Core Parameters

    | Parameter         | Type    | Required | Default | Range                                                           | Description                                                                       |
    | ----------------- | ------- | -------- | ------- | --------------------------------------------------------------- | --------------------------------------------------------------------------------- |
    | `prompt`          | string  | ✅ Yes    | -       | -                                                               | The positive prompt for the generation.                                           |
    | `image`           | string  | ✅ Yes    | -       | -                                                               | The input image URL for video generation.                                         |
    | `last_image`      | string  | ❌ No     | -       | -                                                               | The ending frame image URL (optional, for controlling video ending).              |
    | `aspect_ratio`    | string  | ❌ No     | `16:9`  | `21:9`<br />`16:9`<br />`4:3`<br />`1:1`<br />`3:4`<br />`9:16` | The aspect ratio of the generated media.                                          |
    | `duration`        | string  | ❌ No     | `5`     | `4 ~ 15`                                                        | The duration of the generated media in seconds.                                   |
    | `resolution`      | string  | ❌ No     | `720p`  | `720p`<br />`480p`<br />`1080p`                                 | Video resolution.                                                                 |
    | `generate_audio`  | boolean | ❌ No     | `true`  | `false`, `true`                                                 | Whether to generate audio.                                                        |
    | `camera_fixed`    | boolean | ❌ No     | `false` | `false`, `true`                                                 | Whether to fix the camera position.                                               |
    | `seed`            | integer | ❌ No     | `-1`    | `-1 ~ 2147483647`                                               | The random seed to use for the generation. `-1` means a random seed will be used. |
    | `is_upload_media` | boolean | ❌ No     | `false` | `false`, `true`                                                 | Whether the input image is uploaded media (base64/Data URI).                      |
  </Tab>

  <Tab title="Reference to Video" icon="layers">
    > **Note:** Reference scenarios are only supported by Seedance 2.0.

    ### Video Generation Scenarios

    <CodeGroup>
      ```json Image-only theme={null}
      {
          "prompt": "A cat walking on the beach at sunset, cinematic lighting",
          "images": [
              "https://example.com/ref_image_1.png",
              "https://example.com/ref_image_2.png"
          ]
      }
      ```

      ```json Image + Video theme={null}
      {
          "prompt": "A dog running through a park, following the style and motion of the reference video",
          "videos": [
              "https://example.com/ref_video.mp4"
          ],
          "images": [
              "https://example.com/ref_image_1.png"
          ],
          "audios": [
              "https://example.com/ref_audio.mp3"
          ]
      }
      ```
    </CodeGroup>

    ### Core Parameters

    | Parameter         | Type            | Required | Default | Range                                                           | Description                                                                                                                        |
    | ----------------- | --------------- | -------- | ------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
    | `prompt`          | string          | ✅ Yes    | -       | -                                                               | The positive prompt for the generation.                                                                                            |
    | `videos`          | array of string | ❌ No     | -       | -                                                               | Array of URLs to reference videos. At least one of `videos` or `images` is required.                                               |
    | `images`          | array of string | ❌ No     | -       | Max 10 items                                                    | Including reference images of the element, scene, style, etc. Maximum 10 images. At least one of `videos` or `images` is required. |
    | `audios`          | array of string | ❌ No     | -       | -                                                               | Reference audio URLs for audio style transfer.                                                                                     |
    | `aspect_ratio`    | string          | ❌ No     | `16:9`  | `21:9`<br />`16:9`<br />`4:3`<br />`1:1`<br />`3:4`<br />`9:16` | The aspect ratio of the generated media.                                                                                           |
    | `duration`        | string          | ❌ No     | `5`     | `4 ~ 15`                                                        | The duration of the generated media in seconds.                                                                                    |
    | `resolution`      | string          | ❌ No     | `720p`  | `720p`<br />`480p`<br />`1080p`                                 | Video resolution.                                                                                                                  |
    | `generate_audio`  | boolean         | ❌ No     | `true`  | `false`, `true`                                                 | Whether to generate audio.                                                                                                         |
    | `camera_fixed`    | boolean         | ❌ No     | `false` | `false`, `true`                                                 | Whether to fix the camera position.                                                                                                |
    | `seed`            | integer         | ❌ No     | `-1`    | `-1 ~ 2147483647`                                               | The random seed to use for the generation. `-1` means a random seed will be used.                                                  |
    | `is_upload_media` | boolean         | ❌ No     | `false` | `false`, `true`                                                 | Whether the input media is uploaded (base64/Data URI).                                                                             |
  </Tab>
</Tabs>

### Aspect Ratio & Resolution

> **Note:** 1080p is not supported in reference image scene for Seedance 1.0 lite. 1080p is not supported for Seedance 2.0 fast.

| Resolution | Aspect Ratio | Width x Height <br />Seedance 1.0 | Width x Height <br />Seedance 1.5 pro<br />Seedance 2.0 & 2.0 fast |
| ---------- | ------------ | --------------------------------- | ------------------------------------------------------------------ |
| 480p       | 16:9         | 864×480                           | 864×496                                                            |
| 480p       | 4:3          | 736×544                           | 752×560                                                            |
| 480p       | 1:1          | 640×640                           | 640×640                                                            |
| 480p       | 3:4          | 544×736                           | 560×752                                                            |
| 480p       | 9:16         | 480×864                           | 496×864                                                            |
| 480p       | 21:9         | 960×416                           | 992×432                                                            |
| 720p       | 16:9         | 1248×704                          | 1280×720                                                           |
| 720p       | 4:3          | 1120×832                          | 1112×834                                                           |
| 720p       | 1:1          | 960×960                           | 960×960                                                            |
| 720p       | 3:4          | 832×1120                          | 834×1112                                                           |
| 720p       | 9:16         | 704×1248                          | 720×1280                                                           |
| 720p       | 21:9         | 1504×640                          | 1470×630                                                           |
| 1080p      | 16:9         | 1920×1088                         | 1920×1088                                                          |
| 1080p      | 4:3          | 1664×1248                         | 1664×1248                                                          |
| 1080p      | 1:1          | 1440×1440                         | 1440×1440                                                          |
| 1080p      | 3:4          | 1248×1664                         | 1248×1664                                                          |
| 1080p      | 9:16         | 1088×1920                         | 1088×1920                                                          |
| 1080p      | 21:9         | 2176×928                          | 2176×928                                                           |

## Error Codes

### Common Error Codes

| Error Code | Error Name               | Description                                                                                                       |
| ---------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| 401        | Unauthorized             | API key is missing or invalid                                                                                     |
| 403        | Forbidden                | Your API key doesn't have permission to access this resource, or insufficient balance for the requested operation |
| 429        | Too Many Requests        | You've exceeded your rate limit                                                                                   |
| 500        | Internal server error    | An internal server error occurred                                                                                 |
| 503        | Content policy violation | Content blocked due to safety concerns (actual status code is 400)                                                |
