API Doc-ElkAPI
  1. kling (video)
API Doc-ElkAPI
  • Quick Start
    • Quick Start
    • Must-read for beginners
    • ElkAPI Announcement
  • API Reference
    • Error status code description
    • OpenAI Format
      • Veo3-chat format
      • seedance
      • response
      • generate video
      • image
      • Image Editing (gpt-image-1)
      • embed
      • Realtime
      • Get model list
      • Response ID to obtain results
      • Hunyuan3D
    • Anthropic Format
      • Anthropic Claude
    • Midjourney Image Generation
      • Quick teaching-complete process in one go
      • Task Query
        • pagination query
        • Specify ID to obtain task
      • Submit Imagine task
      • Submit video task
      • Submit editing task
      • Submit Action Task
      • Submit Blend task
      • Submit Describe task
      • Submit Modal
    • Image Generation
      • ideogram(images)
        • Official documentation (updated in real time)
        • Generate 3.0 (illustrated in the text)
        • Reframe 3.0 (Refactoring)
        • Replace Background 3.0
        • Remix 3.0 (Mixed Graph)
        • Edit 3.0 (Edit)
        • Generate (text and image)
        • Remix (mixed image)
        • Upscale (enlarged high-definition)
        • Describe
        • Edit
      • Flux(images)
        • Create Task - General
        • generate image
        • Fine tuning (temporarily unavailable)
        • query task
        • Generate image (replica format)
      • Replicate(image)
        • Create Task - General
        • Create task - float kontext pro, max
        • Create task-black forest labs/flux-1.1-pro
        • Create task-black forest labs/flux-1.1-pro ultra
        • query task
        • Create task
      • Recraft(images)
        • Generate Image
        • Vectorize Image
        • Remove Background
        • Clarity Upscale
        • Create style
        • Generative Upscale
    • Music Generation
      • Suno
        • Set suno version
        • Suno API Scenario Application Guide
        • Generate lyrics
        • Generate music
        • Upload music
        • Song Splicing
        • Full track acoustic separation
        • Single track acoustic separation
        • Create a new Persona
        • Query a single task
        • Generate MP4 MV video
        • Retrieve WAV format files
        • Timing: Lyrics, audio timeline
        • Batch query task
        • Create music using persona_id
      • Udio (not available yet)
        • Generate music
        • Query a single task
    • Video Generation
      • veo3
        • veo3-chat format
        • Submit video generation task
        • Check the video generation status
      • Dream Test
        • seedance
      • runway(video)
        • Official format
          • Generate videos from images
          • Get detailed task information
        • Reverse format
          • Generate (text)
          • Generate (refer to image)
          • Video2video video to video style redrawing
          • Act one emoji transfer
          • Feed - Get Task
      • kling (video)
        • Callback Protocol
        • image expansion
          POST
        • generate image
          POST
        • text-to-video
          POST
        • image-to-video
          POST
        • Video extension
          POST
        • Virtual try on
          POST
        • lip-sync
          POST
        • video effects
          POST
        • Query task (single)
          GET
      • luma (video)
        • Official API format
          • generate video
          • Single query task
      • MiniMax Conch (video)
        • Official Documentation
        • video generation
        • query task
        • File Download
      • PIKA(video)
        • Universal version
          • generate video
          • Query video tasks
        • Generate (reference video/extended video)
        • Generate (refer to image)
        • Generate (text)
        • feed
      • sora
        • Reverse format
          • Create video
          • Generate Video
          • Query video tasks
    • Audio
      • Text to audio conversion
      • audio to text
      • Create translation
  • Integration Guide
    • Best Practices
      • Claude code access instructions
      • ElkAPI Account Balance Query API Usage Instructions
      • Retry logic documentation using ElkAPI and OpenAI's official API
      • Midjorney Calling Best Practices
      • Runway Call Best Practices
    • Application Integration Guide
  • Pricing and Billing
    • About Price
    • About Grouping
  • Help Center
    • Help Center
    • Interface stability
    • Common Misconceptions
    • Use confusion
    • Privacy Policy
    • Terms of Service
  1. kling (video)

image-to-video

POST
https://api.elkapi.com/kling/v1/videos/image2video
This document is not updated in real-time. Please refer to the official document for the complete version: https://app.klingai.com/cn/dev/document-api/apiReference/model/textToVideo

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Successful Response
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.elkapi.com/kling/v1/videos/image2video' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw 'eg1: {
  "model_name": "kling-v1",
  "mode": "pro",
  "duration": "5",
  "image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
  "prompt": "The astronauts got up and left.",
  "cfg_scale": 0.5,
  "static_mask": "https://h2.inkwai.com/bs2/upload-ylab-stunt/ai_portal/1732888177/cOLNrShrSO/static_mask.png",
  "dynamic_masks": [
    {
      "mask": "https://h2.inkwai.com/bs2/upload-ylab-stunt/ai_portal/1732888130/WU8spl23dA/dynamic_mask_1.png",
      "trajectories": [
        {
          "x": 279,
          "y": 219
        },
        {
          "x": 417,
          "y": 65
        }
      ]
    }
  ]
}

eg2: {
  "model_name": "kling-v2-master",
  "duration": "5",
  "image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
  "prompt": "The astronauts got up and left."
}'
Response Response Example
{
	"code": 0, 
  "message": "string",
  "request_id": "string", 
  "data":{
  	"task_id": "string", 
    "task_status": "string", 
    "task_status_msg": "string", 
    "task_info": { 
      "external_task_id": "string"
    },
    "task_result":{
      "videos":[
        {
        	"id": "string",
      		"url": "string", 
      		"duration": "string" 
        }
      ]
    }
    "created_at": 1722769557708, 
    "updated_at": 1722769557708, 
  }
}
Previous
text-to-video
Next
Video extension
Built with