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

# Viduq2-Turbo - Start End Frame - gptproto

> Rapid viduq2 turbo start end frame. Efficiently generate smooth, pro-level motion between two key frames.

## 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/vidu/viduq2-turbo/start-end-frame' \
  --header 'Authorization: GPTPROTO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "The dog ran forward, and finally turned into a Ghibli style.",
    "image": "https://oss.gptproto.com/2025/11/12/1683f22c967d43a5b7c1dac9b50a1fe3.png",
    "last_image": "https://oss.gptproto.com/2025/11/12/39c41d8e0421458ba848f1aaea47b4ac.png",
    "duration": 5,
    "seed": 1,
    "resolution": "720p"
  }'

  ```

  ```javascript JavaScript theme={null}
  const axios = require('axios');
  let data = JSON.stringify({
    "prompt": "The dog ran forward, and finally turned into a Ghibli style.",
    "image": "https://oss.gptproto.com/2025/11/12/1683f22c967d43a5b7c1dac9b50a1fe3.png",
    "last_image": "https://oss.gptproto.com/2025/11/12/39c41d8e0421458ba848f1aaea47b4ac.png",
    "duration": 5,
    "seed": 1,
    "resolution": "720p"
  });

  let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://gptproto.com/api/v3/vidu/viduq2-turbo/start-end-frame',
    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/vidu/viduq2-turbo/start-end-frame"

  payload = json.dumps({
    "prompt": "The dog ran forward, and finally turned into a Ghibli style.",
    "image": "https://oss.gptproto.com/2025/11/12/1683f22c967d43a5b7c1dac9b50a1fe3.png",
    "last_image": "https://oss.gptproto.com/2025/11/12/39c41d8e0421458ba848f1aaea47b4ac.png",
    "duration": 5,
    "seed": 1,
    "resolution": "720p"
  })
  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/vidu/viduq2-turbo/start-end-frame"
    method := "POST"

    payload := strings.NewReader(`{
    "prompt": "The dog ran forward, and finally turned into a Ghibli style.",
    "image": "https://oss.gptproto.com/2025/11/12/1683f22c967d43a5b7c1dac9b50a1fe3.png",
    "last_image": "https://oss.gptproto.com/2025/11/12/39c41d8e0421458ba848f1aaea47b4ac.png",
    "duration": 5,
    "seed": 1,
    "resolution": "720p"
  }`)

    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

If the request that generated your content includes the parameter `enable_sync_mode` set to `true` (some models do not support this parameter, but you still need to query the result by id), you **must** call the Query Result endpoint to retrieve the final output.

<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": "completed",
          "error": null,
          "executionTime": 0,
          "timings": {
              "inference": 0
          },
          "has_nsfw_contents": [],
          "created_at": "2026-01-01 00:00:00"
      },
      "message": "success",
      "code": 200
  }
  ```
</Accordion>

## Parameters

### Path Parameters

Endpoint: `https://gptproto.com/api/v3/vidu/{model}/{scene}`
<Note>Body parameters may vary depending on the scene. Incorrect scene selection may cause parameters to fail. Please choose the appropriate scene based on your actual needs.</Note>

| scene                | example                                                       | Available Models                                                             |
| -------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `text-to-video`      | `https://gptproto.com/api/v3/vidu/{model}/text-to-video`      | `viduq2` <br />`viduq3-pro`                                                  |
| `reference-to-video` | `https://gptproto.com/api/v3/vidu/{model}/reference-to-video` | `viduq2`                                                                     |
| `image-to-video`     | `https://gptproto.com/api/v3/vidu/{model}/image-to-video`     | `viduq3-pro` <br />`viduq2-pro-fast` <br />`viduq2-pro` <br />`viduq2-turbo` |
| `start-end-framed`   | `https://gptproto.com/api/v3/vidu/{model}/start-end-frame`    | `viduq2-pro-fast` <br />`viduq2-pro` <br />`viduq2-turbo`                    |

### Core Parameters

<Note>Parameter support varies by model and scene. See the [Model Scene Compatibility Matrix](#model-scene-compatibility-matrix) for detailed information about which parameters are supported for each model and scene combination.</Note>

| Parameter      | Type    | Required | Default | Range               | Description                                                                    |
| -------------- | ------- | -------- | ------- | ------------------- | ------------------------------------------------------------------------------ |
| `prompt`       | string  | ✅ Yes    | -       | -                   | The positive prompt for the generation.                                        |
| `resolution`   | string  | ❌ No     | `720p`  | `540p, 720p, 1080p` | The resolution of the generated media.                                         |
| `duration`     | number  | ❌ No     | `5`     | `1 ~ 10`            | The duration of the generated media in seconds.                                |
| `aspect_ratio` | string  | ❌ No     | `4:3`   | `3:4, 4:3`          | The aspect ratio of the generated media.                                       |
| `bgm`          | boolean | ❌ No     | `false` | `true, false`       | The background music for generating the output.                                |
| `audio`        | boolean | ❌ No     | `false` | `true, false`       | The audio for generating the output.                                           |
| `seed`         | integer | ❌ No     | `1`     | `1 ~ 2147483647`    | The random seed to use for the generation. 1 means a random seed will be used. |

### image input Parameters

| Parameter             | Type   | Required | Default | Range | Description                                                                                                                                                                                                                                                                                                |
| --------------------- | ------ | -------- | ------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `image`               | string | ✅ Yes    | -       | -     | The start image for generating the output.                                                                                                                                                                                                                                                                 |
| `last_image`          | string | ✅ Yes    | -       | -     | The end image for generating the output.                                                                                                                                                                                                                                                                   |
| `subjects`            | array  | ✅ Yes    | -       | 1\~7  | Information about the subjects in the images.                                                                                                                                                                                                                                                              |
| >>`subjects.id`       | string | ✅ Yes    | -       | -     | Usable in prompts via @subjectId.                                                                                                                                                                                                                                                                          |
| >>`subjects.images`   | array  | ✅ Yes    | -       | 1\~3  | URLs of images corresponding to the subject. Each subject supports up to 3 images.                                                                                                                                                                                                                         |
| >>`subjects.voice_id` | string | ❌ No     | -       | -     | Used to determine the voice character in the video. The system will automatically recommend a suitable voice, and optional values can be found in the [Voice List](https://shengshu.feishu.cn/sheets/WM45sosS7hEj2mtAATvclDAWnNb). If a voice\_id is specified, the audio parameter must be set to `true`. |

## Model Scene Compatibility Matrix

The following table shows which parameters are supported for each model and scene combination. D = Default value, R = Range of supported values.

| Model               | text-to-video                                                                                                                                                                                                                    | reference-to-video                                                                                                                                                                           | image-to-video                                                                                                                                                                                           | start-end-framed                                                                                                                                                                                              |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **viduq2**          | • **duration:** D=5, R=1-10<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** D=16:9, R=16:9/9:16/3:4/4:3/1:1<br />• **audio:** Not effective<br />• **bgm:** D=false, not effective when duration=9-10 | • **duration:** D=5, R=1-10<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** D=16:9, R=any ratio supported<br />• **audio:** D=false<br />• **bgm:** Not effective | ❌ Not supported                                                                                                                                                                                          | ❌ Not supported                                                                                                                                                                                               |
| **viduq2-pro-fast** | ❌ Not supported                                                                                                                                                                                                                  | ❌ Not supported                                                                                                                                                                              | • **duration:** D=5, R=1-10<br />• **resolution:** D=720p, R=720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** D=false<br />• **bgm:** D=false, not effective when duration=9-10      | • **duration:** D=5, R=1-8<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** Not effective<br />• **bgm:** D=false, not effective when duration=9-10 |
| **viduq2-turbo**    | ❌ Not supported                                                                                                                                                                                                                  | ❌ Not supported                                                                                                                                                                              | • **duration:** D=5, R=1-10<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** D=false<br />• **bgm:** D=false, not effective when duration=9-10 | • **duration:** D=5, R=1-8<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** Not effective<br />• **bgm:** D=false, not effective when duration=9-10 |
| **viduq2-pro**      | ❌ Not supported                                                                                                                                                                                                                  | ❌ Not supported                                                                                                                                                                              | • **duration:** D=5, R=1-10<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** D=false<br />• **bgm:** D=false, not effective when duration=9-10 | • **duration:** D=5, R=1-8<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** Not effective<br />• **bgm:** D=false, not effective when duration=9-10 |
| **viduq3-pro**      | • **duration:** D=5, R=1-16<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** D=16:9, R=16:9/9:16/3:4/4:3/1:1<br />• **audio:** D=true<br />• **bgm:** Not effective                                    | ❌ Not supported                                                                                                                                                                              | • **duration:** D=5, R=1-16<br />• **resolution:** D=720p, R=540p/720p/1080p<br />• **aspect\_ratio:** Not effective<br />• **audio:** D=true<br />• **bgm:** Not effective                              | ❌ Not supported                                                                                                                                                                                               |

### Key Highlights

* **viduq2**: Supports text-to-video and reference-to-video scenarios only
* **viduq2-pro/pro-fast/turbo**: Specialized for image-to-video and start-end-framed modes
* **viduq3-pro**: Most versatile, supports text-to-video and image-to-video with audio support and up to 16 seconds duration

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