Skip to main content
POST
https://gptproto.com
/
api
/
v3
/
kwaivgi
/
kling-v2.6-pro
/
image-to-video
kling-v2.6-pro (Image To Video)
curl --request POST \
  --url https://gptproto.com/api/v3/kwaivgi/kling-v2.6-pro/image-to-video

API Key Authentication

  1. Sign up for a GPTProto account at 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 section.

Initiate Request

curl --location 'https://gptproto.com/api/v3/kwaivgi/kling-v2.6-pro/image-to-video' \
--header 'Authorization: GPTPROTO_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "cat say:“hi! welcome to gptproto”",
  "image": "https://tos.gptproto.com/resource/cat.png",
  "last_image": "",
  "negative_prompt": "",
  "sound": true,
  "voice_list": [
    {
      "voice_id": "837076832956186666"
    }
  ],
  "duration": 5
}'

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.
curl -X GET "https://gptproto.com/api/v3/predictions/{id}/result" \
  -H "Authorization: GPTPROTO_API_KEY" \
  -H "Content-Type: application/json"
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

Response Example

{
    "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

ParameterTypeRequiredDefaultRangeDescription
promptstring✅ Yes--The positive prompt for the generation. Must not exceed 2,500 characters.
negative_promptstring❌ No--The negative prompt for the generation. Must not exceed 2,500 characters.
imagestring❌ No--Source image for image-to-video generation.
soundboolean❌ Notruetrue, falseWhether to include synchronized sound with the video.
aspect_ratiostring❌ No16:916:9, 1:1, 9:16The aspect ratio of the generated video. This parameter is required when the image-to-video or video editing features are not used.
durationinteger❌ No55, 10The duration of the generated media in seconds.
voice_listarray❌ 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 to get the voices id.
voice_list.voice_idstring✅ Yes--The voice id to use for the generated video. A video generation task can reference up to 2 voices at most

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

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"
}'

Query Custom Voice Result

curl -X GET "https://gptproto.com/api/v3/predictions/{id}/result" \
  -H "Authorization: GPTPROTO_API_KEY" \
  -H "Content-Type: application/json"
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.
{
    "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.
{
    "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 CodeError NameDescription
401UnauthorizedAPI key is missing or invalid
403ForbiddenYour API key doesn’t have permission to access this resource, or insufficient balance for the requested operation
429Too Many RequestsYou’ve exceeded your rate limit
500Internal server errorAn internal server error occurred
503Content policy violationContent blocked due to safety concerns (actual status code is 400)