AnyInt Docs
API Reference

Kling video

Create Kling video tasks through AnyInt's OpenAI-style video route. Use the Transtreams native routes only when you need provider-native payload control.

Kling video generation is an asynchronous task flow. Create a task first, store the returned video ID, then poll the video status route until the task reaches a terminal state.

For new integrations, use the OpenAI-style video route. It accepts public AnyInt model IDs such as kling-3.0 and kling-v3-omni and adapts the request to the underlying Kling provider route.

Base URL

https://api.anyint.ai

Authentication

Authorization: Bearer <ANYINT_API_KEY>
RoutePurpose
POST /openai/v1/videosCreate a Kling video task
GET /openai/v1/videos/{video_id}Query task status
GET /openai/v1/videos/{video_id}/contentDownload generated video content after completion

Request fields

FieldTypeRequiredMeaningExample
modelstringYesAnyInt video model ID available to your account. Use kling-3.0 for Standard/Pro Kling video or kling-v3-omni for Omni.kling-3.0
promptstringYesText instruction describing the generated video.A cinematic paper airplane flying through a blue sky.
durationinteger or stringOptionalTarget video duration in seconds. Supported values depend on the selected model.5
aspect_ratiostringOptionalOutput aspect ratio when supported.16:9
modestringOptionalEdition selector when supported. Use std or pro.std
generate_audiobooleanOptionalWhether to request audio when the selected route supports it.false
soundstringOptionalAudio mode for Omni-compatible requests.off
imagestringOptionalPublic HTTPS image URL used as the first-frame or image-to-video reference.https://your-domain.com/source.png
input_referencestringOptionalPublic HTTPS image URL or supported image input used as a reference.https://your-domain.com/source.png
frame_imagesarrayOptionalStructured frame references. Use role or frame_type to identify the frame role when needed.[{"url":"https://...","role":"first_frame"}]
input_referencesarrayOptionalAdditional image, video, or audio references when the selected model supports them.[{"url":"https://...","type":"video"}]

Text-to-video example

curl -X POST "https://api.anyint.ai/openai/v1/videos" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0",
    "prompt": "A cinematic paper airplane flying slowly through a blue sky, stable camera, soft daylight.",
    "duration": "5",
    "aspect_ratio": "16:9",
    "mode": "std",
    "generate_audio": false
  }'

Image-to-video example

Use a publicly reachable HTTPS image URL from your own storage.

curl -X POST "https://api.anyint.ai/openai/v1/videos" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0",
    "prompt": "Animate the subject with a slow cinematic dolly-in while keeping the background consistent.",
    "image": "https://your-domain.com/source-image.png",
    "duration": "5",
    "aspect_ratio": "16:9",
    "mode": "pro",
    "generate_audio": false
  }'

Omni reference example

Use kling-v3-omni when you need the Omni video model.

curl -X POST "https://api.anyint.ai/openai/v1/videos" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v3-omni",
    "prompt": "Make the character in the reference image turn toward the camera in an animated film style.",
    "input_reference": "https://your-domain.com/person.png",
    "frame_images": [
      {
        "url": "https://your-domain.com/person.png",
        "role": "first_frame"
      }
    ],
    "duration": "5",
    "aspect_ratio": "16:9",
    "sound": "off"
  }'

Create response

Store the returned id. Use it as {video_id} in later status and content requests.

FieldMeaning
idVideo task ID to store for polling
objectObject type, usually video
statusInitial task status, such as processing
modelModel ID used for the task
errorError details when task creation fails

Example response:

{
  "id": "video_...",
  "object": "video",
  "status": "processing",
  "model": "kling-3.0",
  "error": null
}

Query status

curl -X GET "https://api.anyint.ai/openai/v1/videos/$VIDEO_ID" \
  -H "Authorization: Bearer $ANYINT_API_KEY"

Query response fields

FieldMeaning
idVideo task ID
statusCurrent task state. Treat completed as success and failed, cancelled, or canceled as terminal failure states.
progressProgress value when returned by the provider
download_urlContent route for the generated video when the task has completed
errorFailure details when the task fails

Example completed response:

{
  "id": "video_...",
  "object": "video",
  "status": "completed",
  "progress": 100,
  "model": "kling-3.0",
  "download_url": "/v1/videos/video_.../content",
  "error": null
}

If download_url is relative, resolve it against the OpenAI-compatible API prefix:

curl -L "https://api.anyint.ai/openai$DOWNLOAD_URL" \
  -H "Authorization: Bearer $ANYINT_API_KEY" \
  --output kling-video.mp4

Transtreams native routes

The provider-native Transtreams routes remain available when you need the native request shape:

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

Use native routes only when your integration already depends on Transtreams-native fields such as model_name, image_list, or video_list. New integrations should prefer /openai/v1/videos.

For native Standard/Pro requests, use model_name: "kling-v3" with mode: "std" or "pro". For native Omni requests, use model_name: "kling-v3-omni" and the /videos/omni-video route.

Common mistakes

  • Sending Kling video requests to Chat Completions or Responses routes.
  • Using /transtreams/kling/... for a new integration when /openai/v1/videos is sufficient.
  • Sending kling-v3-std as native model_name instead of model_name: "kling-v3" plus mode: "std".
  • Sending kling-v3-omni to a native Standard/Pro route instead of /transtreams/kling/v1/videos/omni-video.
  • Treating a processing response as a completed video. Always poll until a terminal status.
  • Fetching a relative download_url without the /openai prefix or without the Authorization header.

On this page