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
| Route | Purpose |
|---|---|
POST /transtreams/kling/v1/videos/text2video | Create a text-to-video task |
POST /transtreams/kling/v1/videos/image2video | Create 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-video | Create 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
| Field | Type | Required | Meaning | Example |
|---|---|---|---|---|
model_name | string | Yes | Native Kling model name for the selected route. | kling-v3 |
model | string | Recommended | Model ID used by some clients for tracking or compatibility. Keep it aligned with model_name. | kling-v3 |
prompt | string | Yes | Text instruction describing the generated video. | A cinematic night street scene... |
mode | string | Standard/Pro routes | Edition selector. Use std for Standard or pro for Pro when documented for the model. | std |
duration | integer or string | Optional | Target video duration in seconds. Supported values depend on the selected model. | 5 |
aspect_ratio | string | Optional | Output aspect ratio when supported. | 16:9 |
generate_audio | boolean | Optional | Whether the route should generate audio when supported. | false |
sound | string | Omni routes | Audio mode for Omni requests. | off |
voice_id | string | Optional | Voice identifier when generating audio for supported routes. | voice_demo_1 |
Image and video reference fields
| Field | Type | Route | Meaning | Example |
|---|---|---|---|---|
image | string | image2video | Public HTTPS image URL used as the source frame. | https://your-domain.com/source.png |
image_list | array | omni-video | Reference images for Omni video. Use prompt markers such as <<<image_1>>>. | [{"image_url":"https://...","type":"first_frame"}] |
image_list[].image_url | string | omni-video | Public HTTPS image URL or supported Base64 input. | https://your-domain.com/person.png |
image_list[].type | string | omni-video | Frame role. Use first_frame or end_frame when supported. | first_frame |
video_list | array | omni-video | Reference videos for motion or style guidance. | [{"video_url":"https://..."}] |
video_list[].video_url | string | omni-video | Public 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
| Field | Meaning |
|---|---|
task_id | Task ID to store for polling when returned at the top level |
id | Alternate task identifier field used by some compatible responses |
data.task_id | Nested task ID variant |
result.task_id | Nested task ID variant |
status or task_status | Initial 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
| Field | Meaning |
|---|---|
task_id or id | Task identifier |
task_status or status | Current task status |
task_result.videos[].url | Generated video URL when the task succeeds |
created_at | Creation timestamp when returned |
updated_at | Last update timestamp when returned |
error or message | Failure details when the task fails |
Common mistakes
- Sending
kling-v3-stdas the upstreammodel_nameinstead ofmodel_name: "kling-v3"plusmode: "std". - Sending
kling-v3-omnito/videos/text2videoinstead of/videos/omni-video. - Sending
image_urlinstead ofimageon the image-to-video route. - Sending top-level
image_urlorreference_image_urlsto the Omni video route instead ofimage_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.
Gemini Compatible API
AnyInt exposes Gemini-compatible routes under the /gemini/v1beta prefix. Treat these as provider-native routes and validate them in your environment before production use.
Media APIs
AnyInt publishes media-generation routes through DashScope and Transtreams Kling. These are not chat-completion endpoints. They have their own request bodies, and Kling and video generation routes are task-based.