AnyInt Docs
API Reference

Kling video

Use Kling V3 Standard/Pro and Kling: Video v3.0 Omni through AnyInt's Transtreams gateway routes. Create video tasks first, then poll the matching task result endpoint.

Kling video generation is exposed as an asynchronous Transtreams task flow. It is not a chat-completions endpoint.

Use kling-v3 plus mode for the Standard/Pro text-to-video and image-to-video routes. Use kling-v3-omni for the model displayed as Kling: Video v3.0 Omni, and call the native Omni route.

Routes

RoutePurpose
POST /transtreams/kling/v1/videos/text2videoCreate a text-to-video task
POST /transtreams/kling/v1/videos/image2videoCreate an image-to-video task
GET /transtreams/kling/v1/videos/text2video/{task_id}Query a text-to-video task
GET /transtreams/kling/v1/videos/image2video/{task_id}Query an image-to-video task
POST /transtreams/kling/v1/videos/omni-videoCreate a Kling V3 Omni video task
GET /transtreams/kling/v1/videos/omni-video/{task_id}Query a Kling V3 Omni video task

Authentication

Authorization: Bearer <ANYINT_API_KEY>

Common request fields

FieldTypeRequiredMeaningExample
model_namestringYesNative Kling model name for the selected route.kling-v3
modelstringRecommendedModel ID used by some clients for tracking or compatibility. Keep it aligned with model_name.kling-v3
promptstringYesText instruction describing the generated video.A cinematic night street scene...
modestringStandard/Pro routesEdition selector. Use std for Standard or pro for Pro when documented for the model.std
durationinteger or stringOptionalTarget video duration in seconds. Supported values depend on the selected model.5
aspect_ratiostringOptionalOutput aspect ratio when supported.16:9
generate_audiobooleanOptionalWhether the route should generate audio when supported.false
soundstringOmni routesAudio mode for Omni requests.off
voice_idstringOptionalVoice identifier when generating audio for supported routes.voice_demo_1

Image and video reference fields

FieldTypeRouteMeaningExample
imagestringimage2videoPublic HTTPS image URL used as the source frame.https://your-domain.com/source.png
image_listarrayomni-videoReference images for Omni video. Use prompt markers such as <<<image_1>>>.[{"image_url":"https://...","type":"first_frame"}]
image_list[].image_urlstringomni-videoPublic HTTPS image URL or supported Base64 input.https://your-domain.com/person.png
image_list[].typestringomni-videoFrame role. Use first_frame or end_frame when supported.first_frame
video_listarrayomni-videoReference videos for motion or style guidance.[{"video_url":"https://..."}]
video_list[].video_urlstringomni-videoPublic HTTPS reference video URL.https://your-domain.com/reference.mp4

Text-to-video example

Use model_name: "kling-v3" and set the edition with mode. If the model catalog shows kling-v3-std or kling-v3-pro, call the upstream route with model_name: "kling-v3" and mode: "std" or "pro".

curl -X POST "https://gateway.api.anyint.ai/transtreams/kling/v1/videos/text2video" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "kling-v3",
    "model": "kling-v3",
    "mode": "std",
    "prompt": "A cinematic night street scene with rain, neon reflections, and slow camera movement.",
    "duration": 5,
    "aspect_ratio": "16:9",
    "generate_audio": false
  }'

Image-to-video example

Replace image with a publicly reachable HTTPS image URL from your own storage.

curl -X POST "https://gateway.api.anyint.ai/transtreams/kling/v1/videos/image2video" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "kling-v3",
    "model": "kling-v3",
    "mode": "pro",
    "prompt": "Animate the subject with a slow cinematic dolly-in.",
    "image": "https://your-domain.com/source-image.png",
    "duration": 5,
    "generate_audio": true,
    "voice_id": "voice_demo_1"
  }'

Kling V3 Omni video example

The model catalog displays Omni as Kling: Video v3.0 Omni. Send model_name: "kling-v3-omni" and call /videos/omni-video; do not reuse the Standard/Pro /videos/text2video route for Omni.

curl -X POST "https://gateway.api.anyint.ai/transtreams/kling/v1/videos/omni-video" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "kling-v3-omni",
    "model": "kling-v3-omni",
    "prompt": "A cinematic Tokyo street at night with neon reflections on wet pavement.",
    "mode": "std",
    "duration": "5",
    "aspect_ratio": "16:9",
    "sound": "off"
  }'

When using a reference video, include video_list.

{
  "model_name": "kling-v3-omni",
  "model": "kling-v3-omni",
  "prompt": "Preserve the reference motion and restyle it as a cyberpunk city scene.",
  "mode": "pro",
  "duration": "5",
  "sound": "off",
  "video_list": [
    { "video_url": "https://your-domain.com/reference.mp4" }
  ]
}

When using reference images with Omni video, include image_list. Do not send image_url as a top-level field, and do not use reference_image_urls for this route. Reference images from the prompt with <<<image_1>>>, <<<image_2>>>, and so on.

{
  "model_name": "kling-v3-omni",
  "model": "kling-v3-omni",
  "prompt": "Make the person in <<<image_1>>> wave toward the camera while keeping the background consistent.",
  "mode": "pro",
  "duration": "5",
  "aspect_ratio": "16:9",
  "sound": "off",
  "image_list": [
    {
      "image_url": "https://your-domain.com/person.png",
      "type": "first_frame"
    }
  ]
}

Each image_list item must include image_url, which can be a public HTTPS image URL or Base64 input. The optional type can be first_frame or end_frame; when using an end frame, also provide a first frame.

Query a task

The create response can return the task ID as task_id, id, data.task_id, or result.task_id.

Create response fields

FieldMeaning
task_idTask ID to store for polling when returned at the top level
idAlternate task identifier field used by some compatible responses
data.task_idNested task ID variant
result.task_idNested task ID variant
status or task_statusInitial task state
curl -X GET "https://gateway.api.anyint.ai/transtreams/kling/v1/videos/text2video/$TASK_ID" \
  -H "Authorization: Bearer $ANYINT_API_KEY"

For image-to-video tasks, use /transtreams/kling/v1/videos/image2video/$TASK_ID.

For Omni video tasks, use /transtreams/kling/v1/videos/omni-video/$TASK_ID.

Common status fields are task_status and status. Treat succeed, succeeded, success, finished, and completed as success states. Generated video URLs commonly appear in task_result.videos[0].url.

Query response fields

FieldMeaning
task_id or idTask identifier
task_status or statusCurrent task status
task_result.videos[].urlGenerated video URL when the task succeeds
created_atCreation timestamp when returned
updated_atLast update timestamp when returned
error or messageFailure details when the task fails

Common mistakes

  • Sending kling-v3-std as the upstream model_name instead of model_name: "kling-v3" plus mode: "std".
  • Sending kling-v3-omni to /videos/text2video instead of /videos/omni-video.
  • Sending image_url instead of image on the image-to-video route.
  • Sending top-level image_url or reference_image_urls to the Omni video route instead of image_list[].image_url.
  • Polling /videos/generations/{task_id} instead of the matching native route, such as /videos/text2video/{task_id}.
  • Reusing OpenAI chat-completions examples for Kling video models.

On this page