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

# Kling-V2.6-Std - Image To Video - gptproto

> Reliable kling v2.6 standard image to video. High-quality AI animation for creating dynamic video assets from images.

## 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.md) section.

## Initiate Request

```bash cURL theme={null}
curl --location 'https://gptproto.com/api/v3/kwaivgi/kling-v2.6-std/image-to-video' \
--header 'Authorization: GPTPROTO_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "Put a hat on the cat",
  "image": "https://tos.gptproto.com/resource/cat.png",
  "negative_prompt": "",
  "duration": 5
}'

```

```javascript JavaScript theme={null}
const axios = require('axios');
let data = JSON.stringify({
  "prompt": "Put a hat on the cat",
  "image": "https://tos.gptproto.com/resource/cat.png",
  "negative_prompt": "",
  "duration": 5
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://gptproto.com/api/v3/kwaivgi/kling-v2.6-std/image-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/kwaivgi/kling-v2.6-std/image-to-video"

payload = json.dumps({
  "prompt": "Put a hat on the cat",
  "image": "https://tos.gptproto.com/resource/cat.png",
  "negative_prompt": "",
  "duration": 5
})
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/kwaivgi/kling-v2.6-std/image-to-video"
  method := "POST"

  payload := strings.NewReader(`{
  "prompt": "Put a hat on the cat",
  "image": "https://tos.gptproto.com/resource/cat.png",
  "negative_prompt": "",
  "duration": 5
}`)

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

```

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

```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))
}
```

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] 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
> }
> ```

## Parameters

| Parameter | Type | Required | Default | Range | Description |
| - | - | - | - | - | - |
| `prompt` | string | ✅ Yes | - | - | The positive prompt for the generation. Must not exceed 2,500 characters. |
| `negative_prompt` | string | ❌ No | - | - | The negative prompt for the generation. Must not exceed 2,500 characters. |
| `image` | string | ❌ No | - | - | Source image for image-to-video generation. |
| `sound` | boolean | ❌ No | `true` | `true, false` | Whether to include synchronized sound with the video. |
| `aspect_ratio` | string | ❌ No | `16:9` | `16:9, 1:1, 9:16` | The aspect ratio of the generated video. **This parameter is required when the image-to-video or video editing features are not used.** |
| `duration` | integer | ❌ No | `5` | `3-15` | The duration of the generated media in seconds. |
| `guidance_scale` | number | ❌ No | - | `0-1` | The guidance scale for the generation. Controls how closely the output follows the prompt. |
| `multi_prompt` | array | ❌ No | - | - | A list of segmented prompts for multi-scene video generation. Each segment specifies its own prompt and duration. **Only supported by V3.0 (`kling-v3.0`).** |
| `multi_prompt[].index` | integer | ✅ Yes | - | - | The index of the segment, starting from 1. |
| `multi_prompt[].prompt` | string | ✅ Yes | - | - | The prompt for this specific segment. |
| `multi_prompt[].duration` | string | ✅ Yes | - | - | The duration of this segment in seconds. The sum of all segment durations should match the total `duration`. |
| `voice_list` | array | ❌ No | - | - | The list of voices id to use for the generated video, Only V2.6 and subsequent versions of the model supports the current parameters. see [Custom Voice](#custom-voice-only-v2-6-and-subsequent-versions) to get the voices id. |
| `voice_list.voice_id` | string | ✅ Yes | - | - | The voice id to use for the generated video. A video generation task can reference up to 2 voices at most |

### Multi-Prompt (V3.0 Only)

```json Multi-Prompt theme={null}
{
  "prompt": "A cyberpunk girl walking through neon-lit alleyways, rain falling, close-up of her eyes, camera pans to her silhouette, smoke in the background, futuristic music vibe",
  "negative_prompt": "blur, distort, and low quality",
  "aspect_ratio": "16:9",
  "duration": 5,
  "guidance_scale": 0.5,
  "sound": false,
  "multi_prompt": [
    {
      "index": 1,
      "prompt": "Two friends talking under a streetlight at night. Warm glow, casual poses, no dialogue.",
      "duration": "2"
    },
    {
      "index": 2,
      "prompt": "A runner sprinting through a forest, leaves flying. Low-angle shot, focus on movement.",
      "duration": "3"
    }
  ]
}
```

## Custom Voice (Only V2.6 and subsequent versions)

`voice_list` is List of tones referenced when generating videos,The value of voice\_id parameter is returned through the [voice customization interface](#custom-voice-interface)
You can customize your voice by calling the endpoint below; please note:

* `audio` parameter Supports .mp3 / .wav audio file and .mp4 / .mov video file.
* The voice needs to be clean and free of noise, with only one type of human voice present, with a duration of no less than 5 seconds and no longer than 30 seconds.

### Custom Voice interface

```bash cURL theme={null}
curl --location --request POST 'https://gptproto.com/api/v3/kwaivgi/kling_custom_voice/create_voice' \
--header 'Authorization: GPTPROTO_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "audio": "https://oss.gptproto.com/ai/api654ed87e-2e5c-4d2d-979f-fed8b741a8f4.mp3"
}'
```

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

url = "https://gptproto.com/api/v3/kwaivgi/kling_custom_voice/create_voice"
headers = {
    "Authorization": "GPTPROTO_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "audio": "https://oss.gptproto.com/ai/api654ed87e-2e5c-4d2d-979f-fed8b741a8f4.mp3"
}

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

```javascript JavaScript theme={null}
const url = "https://gptproto.com/api/v3/kwaivgi/kling_custom_voice/create_voice";
const headers = {
  "Authorization": "GPTPROTO_API_KEY",
  "Content-Type": "application/json"
};
const data = {
    "audio": "https://oss.gptproto.com/ai/api654ed87e-2e5c-4d2d-979f-fed8b741a8f4.mp3"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
  .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"
    "net/http"
    "strings"
)

func main() {
    url := "https://gptproto.com/api/v3/kwaivgi/kling_custom_voice/create_voice"

    data := map[string]string{
        "audio": "https://oss.gptproto.com/ai/api654ed87e-2e5c-4d2d-979f-fed8b741a8f4.mp3",
    }
    jsonData, _ := json.Marshal(data)

    req, _ := http.NewRequest("POST", url, strings.NewReader(string(jsonData)))
    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()

    fmt.Println("Status:", resp.Status)
}
```

### Query Custom Voice Result

```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))
}
```

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

### Custom Voice interface response

`data.id` is the voice id you need.

```json theme={null}
{
    "data": {
        "id": "123123",
        "model": "kling_custom_voice",
        "outputs": [
            "838227563994169418"
        ],
        "urls": {
            "get": "https://gptproto.com/api/v3/predictions/123123/result"
        },
        "status": "succeed",
        "error": null,
        "executionTime": 0,
        "timings": null,
        "has_nsfw_contents": [],
        "created_at": "2026-01-08T21:05:34"
    },
    "message": "success",
    "code": 200
}
```

### How to use the voice id

Add the voice id to the `voice_list` parameter when calling the video generation interface.

```json theme={null}
{
    "prompt": "A man is playing a guitar",
    "aspect_ratio": "16:9",
    "duration": 5,
    "sound": true, // The premise of using voice_list is that the sound parameter must be true
    "voice_list": [
        "838227563994169418"
    ]
}
```

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


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