AI Video Jump Transition Creator with Kling AI 2.5 Turbo
Create seamless, cinematic jump transition videos from text and images using Kling AI 2.5 Turbo.
~$0.5678
1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/693110993fe28df5bd2771e3-v1"
7
8data = {
9 "First_Frame_Input_Image": "https://segmind-inference-inputs.s3.amazonaws.com/a33d187d-5be1-44f2-a2e7-f5d186b7c818-fd00cfb3-bd3f-4f5c-ac21-f6e760e2508e.jpg",
10 "Last_Frame_Input_Image": "https://segmind-inference-inputs.s3.amazonaws.com/41d4f36f-7861-41ae-8368-3123a32e2874-0ac5cc0a-aef3-47d0-b398-bc18fa0610f0.jpg",
11 "Input_Prompt": "Create a smooth 5-second character transition animation. Begin with the first-frame character standing naturally. The character suddenly jumps upward, keeping full consistency with the first frame’s face, hairstyle, body shape, and lighting. As the character rises, show a brief floating moment in mid-air, with subtle weightlessness.\n\nAs the character starts coming down, build anticipation with natural physics and controlled camera motion (no rotation). At the moment of impact with the ground, trigger a fast and dramatic costume transformation, where the outfit rapidly shifts into the final-frame costume with a clean, high-energy shockwave effect—no additional props, no style change, only a costume swap.\n\nWhen the character lands, the transformation finishes instantly. The character settles down into a stable standing pose, fully matching the final frame look, final outfit, and final background. Maintain realistic motion, consistent anatomy, clean lighting, and no distortion during transition. Ensure the entire sequence—from jump to landing—completes in under 5 seconds.\nRealistic movement, clean costume transition, physically accurate jump"
12}
13
14def poll_for_result(poll_url):
15 """Poll the API until the generation is complete"""
16 while True:
17 response = requests.get(
18 poll_url,
19 headers={'Authorization': f'Bearer {api_key}'}
20 )
21 result = response.json()
22
23 if result['status'] == 'COMPLETED':
24 # Parse the output (it's a JSON string)
25 outputs = json.loads(result['output'])
26 return outputs
27 elif result['status'] == 'FAILED':
28 raise Exception(result.get('error', 'Generation failed'))
29
30 # Wait 7 seconds before polling again
31 time.sleep(7)
32
33# Make the initial request
34response = requests.post(
35 url,
36 json=data,
37 headers={
38 'Authorization': f'Bearer {api_key}',
39 'Content-Type': 'application/json'
40 }
41)
42
43if response.status_code == 200:
44 result = response.json()
45 print('Request queued:', result)
46
47 # Start polling for results
48 outputs = poll_for_result(result['poll_url'])
49 print('Generation complete:', outputs)
50else:
51 print(f"Error: {response.status_code}")
52 print(response.text) 1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/693110993fe28df5bd2771e3-v1"
7
8data = {
9 "First_Frame_Input_Image": "https://segmind-inference-inputs.s3.amazonaws.com/a33d187d-5be1-44f2-a2e7-f5d186b7c818-fd00cfb3-bd3f-4f5c-ac21-f6e760e2508e.jpg",
10 "Last_Frame_Input_Image": "https://segmind-inference-inputs.s3.amazonaws.com/41d4f36f-7861-41ae-8368-3123a32e2874-0ac5cc0a-aef3-47d0-b398-bc18fa0610f0.jpg",
11 "Input_Prompt": "Create a smooth 5-second character transition animation. Begin with the first-frame character standing naturally. The character suddenly jumps upward, keeping full consistency with the first frame’s face, hairstyle, body shape, and lighting. As the character rises, show a brief floating moment in mid-air, with subtle weightlessness.\n\nAs the character starts coming down, build anticipation with natural physics and controlled camera motion (no rotation). At the moment of impact with the ground, trigger a fast and dramatic costume transformation, where the outfit rapidly shifts into the final-frame costume with a clean, high-energy shockwave effect—no additional props, no style change, only a costume swap.\n\nWhen the character lands, the transformation finishes instantly. The character settles down into a stable standing pose, fully matching the final frame look, final outfit, and final background. Maintain realistic motion, consistent anatomy, clean lighting, and no distortion during transition. Ensure the entire sequence—from jump to landing—completes in under 5 seconds.\nRealistic movement, clean costume transition, physically accurate jump"
12}
13
14def poll_for_result(poll_url):
15 """Poll the API until the generation is complete"""
16 while True:
17 response = requests.get(
18 poll_url,
19 headers={'Authorization': f'Bearer {api_key}'}
20 )
21 result = response.json()
22
23 if result['status'] == 'COMPLETED':
24 # Parse the output (it's a JSON string)
25 outputs = json.loads(result['output'])
26 return outputs
27 elif result['status'] == 'FAILED':
28 raise Exception(result.get('error', 'Generation failed'))
29
30 # Wait 7 seconds before polling again
31 time.sleep(7)
32
33# Make the initial request
34response = requests.post(
35 url,
36 json=data,
37 headers={
38 'Authorization': f'Bearer {api_key}',
39 'Content-Type': 'application/json'
40 }
41)
42
43if response.status_code == 200:
44 result = response.json()
45 print('Request queued:', result)
46
47 # Start polling for results
48 outputs = poll_for_result(result['poll_url'])
49 print('Generation complete:', outputs)
50else:
51 print(f"Error: {response.status_code}")
52 print(response.text)API Endpoint
POST
https://api.segmind.com/workflows/693110993fe28df5bd2771e3-v1Parameters
First_Frame_Input_Imageoptionalstring (uri)First Frame Input Image
Default:
"https://segmind-inference-inputs.s3.amazonaws.com/a33d187d-5be1-44f2-a2e7-f5d186b7c818-fd00cfb3-bd3f-4f5c-ac21-f6e760e2508e.jpg"Last_Frame_Input_Imageoptionalstring (uri)Last Frame Input Image
Default:
"https://segmind-inference-inputs.s3.amazonaws.com/41d4f36f-7861-41ae-8368-3123a32e2874-0ac5cc0a-aef3-47d0-b398-bc18fa0610f0.jpg"Input_PromptoptionalstringInput Prompt
Default:
"Create a smooth 5-second character transition animation. Begin with the first-frame character standing naturally. The character suddenly jumps upward, keeping full consistency with the first frame’s face, hairstyle, body shape, and lighting. As the character rises, show a brief floating moment in mid-air, with subtle weightlessness.\n\nAs the character starts coming down, build anticipation with natural physics and controlled camera motion (no rotation). At the moment of impact with the ground, trigger a fast and dramatic costume transformation, where the outfit rapidly shifts into the final-frame costume with a clean, high-energy shockwave effect—no additional props, no style change, only a costume swap.\n\nWhen the character lands, the transformation finishes instantly. The character settles down into a stable standing pose, fully matching the final frame look, final outfit, and final background. Maintain realistic motion, consistent anatomy, clean lighting, and no distortion during transition. Ensure the entire sequence—from jump to landing—completes in under 5 seconds.\nRealistic movement, clean costume transition, physically accurate jump"Response Format
Returns: Polling-based asynchronous response
Initial request returns a poll_url. Poll every 7 seconds until status is COMPLETED.
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
400
Bad Request
Invalid parameters or request format
401
Unauthorized
Missing or invalid API key
403
Forbidden
Insufficient permissions
404
Not Found
Workflow not found
406
Insufficient Credits
Not enough credits to process request
429
Rate Limited
Too many requests
500
Server Error
Internal server error
502
Bad Gateway
Service temporarily unavailable
504
Timeout
Request timed out