Cinematic Bullet Time with Seedance 2.5 Serverless API

Create High-Budget Cinematic Bullet Time Videos Quickly and Efficiently.

 1import requests
 2import time
 3import json
 4
 5api_key = "YOUR_API_KEY"
 6url = "https://api.segmind.com/workflows/v2/6aa39f4c40567a46cd7a29c1-v4"
 7
 8data = {
 9    "input_model_images": "https://images.segmind.com/uploads/49409bc0-d819-4edf-8ca9-6197fefb5786/727169e9-3a7a-4612-b7e9-5654def234ea-hf_20260910_085226_dbb79502-129d-48ad-b249-25ea54e9fcd1.png",
10    "input_prop_images": [
11        "https://images.segmind.com/uploads/49409bc0-d819-4edf-8ca9-6197fefb5786/b193d24d-5655-4792-9277-8c3fbdb485e9-hf_20260910_090242_dff0409b-5a97-4d8a-9560-e472de923b07.png",
12        "https://images.segmind.com/uploads/a6baef49-7280-4b43-99c8-36f24706ad9a/3a4503fa-ca17-45d0-b677-a9b1ea83a303-dfbeccae-83e1-4857-9e93-d2489ccc6d3e-hf_20260910_085932_8168f67d-52b6-4ffa-b194-0b7fbf1303b1.png",
13        "https://images.segmind.com/uploads/a6baef49-7280-4b43-99c8-36f24706ad9a/cded0116-ded1-4f9b-9e58-a5039c8b2237-87d2bd2e-475c-4372-a0b1-1566bc6b8a6d-hf_20260910_085901_29eeb17a-ebce-4edc-b270-d9776379851c.png"
14    ]
15}
16
17def poll_for_result(poll_url):
18    """Poll the API until the generation is complete"""
19    while True:
20        response = requests.get(
21            poll_url,
22            headers={'x-api-key': api_key}
23        )
24        result = response.json()
25
26        if result['status'] == 'COMPLETED':
27            # Parse the output (it's a JSON string)
28            outputs = json.loads(result['output'])
29            return outputs
30        elif result['status'] == 'FAILED':
31            raise Exception(result.get('error', 'Generation failed'))
32
33        # Wait 7 seconds before polling again
34        time.sleep(7)
35
36# Make the initial request
37response = requests.post(
38    url,
39    json=data,
40    headers={
41        'x-api-key': api_key,
42        'Content-Type': 'application/json'
43    }
44)
45
46if response.status_code == 200:
47    result = response.json()
48    print('Request queued:', result)
49
50    # Start polling for results
51    outputs = poll_for_result(result['poll_url'])
52    print('Generation complete:', outputs)
53else:
54    print(f"Error: {response.status_code}")
55    print(response.text)

API Endpoint

POSThttps://api.segmind.com/workflows/v2/6aa39f4c40567a46cd7a29c1-v4

Parameters

input_model_imagesoptional
string (uri)

Input Model Images

Default: "https://images.segmind.com/uploads/49409bc0-d819-4edf-8ca9-6197fefb5786/727169e9-3a7a-4612-b7e9-5654def234ea-hf_20260910_085226_dbb79502-129d-48ad-b249-25ea54e9fcd1.png"
input_prop_imagesoptional
array

Input Prop Images

Default: ["https://images.segmind.com/uploads/49409bc0-d819-4edf-8ca9-6197fefb5786/b193d24d-5655-4792-9277-8c3fbdb485e9-hf_20260910_090242_dff0409b-5a97-4d8a-9560-e472de923b07.png","https://images.segmind.com/uploads/a6baef49-7280-4b43-99c8-36f24706ad9a/3a4503fa-ca17-45d0-b677-a9b1ea83a303-dfbeccae-83e1-4857-9e93-d2489ccc6d3e-hf_20260910_085932_8168f67d-52b6-4ffa-b194-0b7fbf1303b1.png","https://images.segmind.com/uploads/a6baef49-7280-4b43-99c8-36f24706ad9a/cded0116-ded1-4f9b-9e58-a5039c8b2237-87d2bd2e-475c-4372-a0b1-1566bc6b8a6d-hf_20260910_085901_29eeb17a-ebce-4edc-b270-d9776379851c.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