Product Unboxing Video Creation with Seedance 2.0 Serverless API

Create Engaging Unboxing Videos Automatically with Seedance 2.0 and Claude 4.5.

 1import requests
 2import time
 3import json
 4
 5api_key = "YOUR_API_KEY"
 6url = "https://api.segmind.com/workflows/v2/6a38daf6cf390bec74617c22-v1"
 7
 8data = {
 9    "input_product_image": "https://segmind-inference-inputs.s3.amazonaws.com/885a8a46-382f-4d15-8b12-bde70fd88f3f-Screenshot 2026-06-16 144334.png",
10    "input_model_image": "https://segmind-inference-inputs.s3.amazonaws.com/555bdb2a-b40c-438b-bd3f-fb17bc09dd09-81386-output.jpg",
11    "input_prompt": "BMW X6 Folding Mountain Bike – Performance Meets Portability\nExperience the perfect fusion of style, strength, and versatility with the BMW X6 Folding Mountain Bike. Designed for riders who demand performance on every terrain, this bike combines a sleek aesthetic with rugged functionality — making it ideal for both urban commuting and off-road adventures.\n\nKey Features:\n🚲 Foldable Frame Design\n\nThe smart folding frame mechanism allows for effortless compact storage and easy transportation — perfect for commuters, travellers, and those with limited storage space.\nāš™ļø Multi-Speed Gear System\n\nEquipped with a rear derailleur and multi-speed drivetrain, the X6 delivers smooth and precise gear shifts across a wide range, letting you conquer both steep climbs and flat stretches with ease.\nšŸ›ž Six-Spoke Alloy Mag Wheels\n\nThe signature six-spoke integrated mag wheels offer superior strength, reduced weight, and a striking visual appeal that sets this bike apart from the rest.\nšŸ›‘ Dual Disc Brakes\n\nFront and rear disc brakes provide consistent, powerful stopping performance in all weather conditions — ensuring maximum rider safety.\nšŸ”§ Full Suspension System\n\nFront fork suspension and rear shock absorbers work together to absorb trail vibrations, delivering a smooth and comfortable ride even on rough, uneven surfaces.\nšŸ”ļø All-Terrain Tyres\n\nWide, knobby tyres with deep treads provide excellent grip and traction on muddy trails, gravel paths, and city streets alike.\nšŸ’§ Bottle Cage Included\n\nA built-in water bottle holder keeps you hydrated on the go without interrupting your ride.\nšŸŽØ Bold Black & White Design\n\nFinished in a premium black and white colour scheme with teal and red accents, this bike turns heads wherever you ride."
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

POSThttps://api.segmind.com/workflows/v2/6a38daf6cf390bec74617c22-v1

Parameters

input_product_imageoptional
string (uri)

Input Product Image

Default: "https://segmind-inference-inputs.s3.amazonaws.com/885a8a46-382f-4d15-8b12-bde70fd88f3f-Screenshot 2026-06-16 144334.png"
input_model_imageoptional
string (uri)

Input Model Image

Default: "https://segmind-inference-inputs.s3.amazonaws.com/555bdb2a-b40c-438b-bd3f-fb17bc09dd09-81386-output.jpg"
input_promptoptional
string

Input Prompt

Default: "BMW X6 Folding Mountain Bike – Performance Meets Portability\nExperience the perfect fusion of style, strength, and versatility with the BMW X6 Folding Mountain Bike. Designed for riders who demand performance on every terrain, this bike combines a sleek aesthetic with rugged functionality — making it ideal for both urban commuting and off-road adventures.\n\nKey Features:\n🚲 Foldable Frame Design\n\nThe smart folding frame mechanism allows for effortless compact storage and easy transportation — perfect for commuters, travellers, and those with limited storage space.\nāš™ļø Multi-Speed Gear System\n\nEquipped with a rear derailleur and multi-speed drivetrain, the X6 delivers smooth and precise gear shifts across a wide range, letting you conquer both steep climbs and flat stretches with ease.\nšŸ›ž Six-Spoke Alloy Mag Wheels\n\nThe signature six-spoke integrated mag wheels offer superior strength, reduced weight, and a striking visual appeal that sets this bike apart from the rest.\nšŸ›‘ Dual Disc Brakes\n\nFront and rear disc brakes provide consistent, powerful stopping performance in all weather conditions — ensuring maximum rider safety.\nšŸ”§ Full Suspension System\n\nFront fork suspension and rear shock absorbers work together to absorb trail vibrations, delivering a smooth and comfortable ride even on rough, uneven surfaces.\nšŸ”ļø All-Terrain Tyres\n\nWide, knobby tyres with deep treads provide excellent grip and traction on muddy trails, gravel paths, and city streets alike.\nšŸ’§ Bottle Cage Included\n\nA built-in water bottle holder keeps you hydrated on the go without interrupting your ride.\nšŸŽØ Bold Black & White Design\n\nFinished in a premium black and white colour scheme with teal and red accents, this bike turns heads wherever you ride."

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