Cinematic 3D Roll Transitions using Seedance 1.0 Pro

Transform static images into cinematic videos with dynamic 3D roll transitions using Seedance 1.0 Pro.

 1import requests
 2import time
 3import json
 4
 5api_key = "YOUR_API_KEY"
 6url = "https://api.segmind.com/workflows/694911b31fe46313cef71b3b-v1"
 7
 8data = {
 9    "Input_Prompt": "The video begins on the first image as a locked, stable frame.\n\nAfter a brief moment, the virtual camera initiates a powerful 3D rolling spin, rotating aggressively along the Z-axis (roll) while subtly drifting forward in space.\n\nThe spin lasts approximately 2 seconds, accelerating as it progresses. The rotation is intentionally disorienting, with the entire frame fully consumed by motion — edges blur, perspective warps, and depth exaggerates as if the camera itself is tumbling in 3D space.\n\nThis is not a seamless transition — it should feel like a long Premiere Pro preset spin transition, mechanical and dramatic rather than smooth or organic.\n\nAt the peak of rotational energy, mid-spin, the scene hard-cuts to the second image without stopping the rotation.\n\nThe spin continues uninterrupted after the cut, preserving momentum and direction, creating the illusion that the rotational force itself triggered the scene shift.\n\nAs the rotation decelerates, the camera stabilizes, resolving cleanly into the second image’s final frame.\n\nThe transition must read as a true 3D 360-degree camera roll, not a 2D spin or crossfade. The motion should feel heavy, cinematic, and preset-driven — bold, noticeable, and energetic.",
10    "Input_Image_1": "https://segmind-inference-inputs.s3.amazonaws.com/8c665181-954d-43ee-b7fe-cf577f5842e4-Gemini_Generated_Image_ecqiececqiececqi.png",
11    "Input_Image_2": "https://segmind-inference-inputs.s3.amazonaws.com/df72c48c-34bb-4115-a1d7-aa545efb70ab-9aea2c52-b399-47a5-b283-de732420095f.png",
12    "Input_Image_3": "https://segmind-inference-inputs.s3.amazonaws.com/dafae00e-7286-470f-bc8b-8464fc43b649-2c058ab8-e8a0-41c9-b79b-dcf0b13c5844.png"
13}
14
15def poll_for_result(poll_url):
16    """Poll the API until the generation is complete"""
17    while True:
18        response = requests.get(
19            poll_url,
20            headers={'Authorization': f'Bearer {api_key}'}
21        )
22        result = response.json()
23
24        if result['status'] == 'COMPLETED':
25            # Parse the output (it's a JSON string)
26            outputs = json.loads(result['output'])
27            return outputs
28        elif result['status'] == 'FAILED':
29            raise Exception(result.get('error', 'Generation failed'))
30
31        # Wait 7 seconds before polling again
32        time.sleep(7)
33
34# Make the initial request
35response = requests.post(
36    url,
37    json=data,
38    headers={
39        'Authorization': f'Bearer {api_key}',
40        'Content-Type': 'application/json'
41    }
42)
43
44if response.status_code == 200:
45    result = response.json()
46    print('Request queued:', result)
47
48    # Start polling for results
49    outputs = poll_for_result(result['poll_url'])
50    print('Generation complete:', outputs)
51else:
52    print(f"Error: {response.status_code}")
53    print(response.text)

API Endpoint

POSThttps://api.segmind.com/workflows/694911b31fe46313cef71b3b-v1

Parameters

Input_Promptoptional
string

Input Prompt

Default: "The video begins on the first image as a locked, stable frame.\n\nAfter a brief moment, the virtual camera initiates a powerful 3D rolling spin, rotating aggressively along the Z-axis (roll) while subtly drifting forward in space.\n\nThe spin lasts approximately 2 seconds, accelerating as it progresses. The rotation is intentionally disorienting, with the entire frame fully consumed by motion — edges blur, perspective warps, and depth exaggerates as if the camera itself is tumbling in 3D space.\n\nThis is not a seamless transition — it should feel like a long Premiere Pro preset spin transition, mechanical and dramatic rather than smooth or organic.\n\nAt the peak of rotational energy, mid-spin, the scene hard-cuts to the second image without stopping the rotation.\n\nThe spin continues uninterrupted after the cut, preserving momentum and direction, creating the illusion that the rotational force itself triggered the scene shift.\n\nAs the rotation decelerates, the camera stabilizes, resolving cleanly into the second image’s final frame.\n\nThe transition must read as a true 3D 360-degree camera roll, not a 2D spin or crossfade. The motion should feel heavy, cinematic, and preset-driven — bold, noticeable, and energetic."
Input_Image_1optional
string (uri)

Input Image 1

Default: "https://segmind-inference-inputs.s3.amazonaws.com/8c665181-954d-43ee-b7fe-cf577f5842e4-Gemini_Generated_Image_ecqiececqiececqi.png"
Input_Image_2optional
string (uri)

Input Image 2

Default: "https://segmind-inference-inputs.s3.amazonaws.com/df72c48c-34bb-4115-a1d7-aa545efb70ab-9aea2c52-b399-47a5-b283-de732420095f.png"
Input_Image_3optional
string (uri)

Input Image 3

Default: "https://segmind-inference-inputs.s3.amazonaws.com/dafae00e-7286-470f-bc8b-8464fc43b649-2c058ab8-e8a0-41c9-b79b-dcf0b13c5844.png"

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