Segmind Exciton Serverless API
Give a stand-in's acting take to any actor. Upload the take, your actor and a set, and get the scene with the same beats, timing and eye line.
~8m 17s
~$3.0952
1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/v2/6b003ffdf0c55f2ccb518a98-v2"
7
8data = {
9 "take": "https://images.segmind.com/public/8afe091b535dc7632b83da85e50c2e1a.mp4",
10 "actor_sheet": "https://images.segmind.com/public/3a8aace91e644bc610d07248dd52d8ab.jpeg",
11 "scene_image": "https://images.segmind.com/public/2dead4f4f97137a8c43fe9da190dd3f4.jpeg",
12 "scene_notes": "Late afternoon in an old farmhouse kitchen. Warm low sunlight comes through the window on the left and the background is out of focus.",
13 "performance_intent": "Pleading desperately with someone, then breaking down on the edge of tears.",
14 "direction": "Directed notes (recommended)",
15 "acting_size": "As performed",
16 "resolution": "1080p",
17 "delivery": "H.264 mp4 (plays everywhere)"
18}
19
20def poll_for_result(poll_url):
21 """Poll the API until the generation is complete"""
22 while True:
23 response = requests.get(
24 poll_url,
25 headers={'x-api-key': api_key}
26 )
27 result = response.json()
28
29 if result['status'] == 'COMPLETED':
30 # Parse the output (it's a JSON string)
31 outputs = json.loads(result['output'])
32 return outputs
33 elif result['status'] == 'FAILED':
34 raise Exception(result.get('error', 'Generation failed'))
35
36 # Wait 7 seconds before polling again
37 time.sleep(7)
38
39# Make the initial request
40response = requests.post(
41 url,
42 json=data,
43 headers={
44 'x-api-key': api_key,
45 'Content-Type': 'application/json'
46 }
47)
48
49if response.status_code == 200:
50 result = response.json()
51 print('Request queued:', result)
52
53 # Start polling for results
54 outputs = poll_for_result(result['poll_url'])
55 print('Generation complete:', outputs)
56else:
57 print(f"Error: {response.status_code}")
58 print(response.text) 1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/v2/6b003ffdf0c55f2ccb518a98-v2"
7
8data = {
9 "take": "https://images.segmind.com/public/8afe091b535dc7632b83da85e50c2e1a.mp4",
10 "actor_sheet": "https://images.segmind.com/public/3a8aace91e644bc610d07248dd52d8ab.jpeg",
11 "scene_image": "https://images.segmind.com/public/2dead4f4f97137a8c43fe9da190dd3f4.jpeg",
12 "scene_notes": "Late afternoon in an old farmhouse kitchen. Warm low sunlight comes through the window on the left and the background is out of focus.",
13 "performance_intent": "Pleading desperately with someone, then breaking down on the edge of tears.",
14 "direction": "Directed notes (recommended)",
15 "acting_size": "As performed",
16 "resolution": "1080p",
17 "delivery": "H.264 mp4 (plays everywhere)"
18}
19
20def poll_for_result(poll_url):
21 """Poll the API until the generation is complete"""
22 while True:
23 response = requests.get(
24 poll_url,
25 headers={'x-api-key': api_key}
26 )
27 result = response.json()
28
29 if result['status'] == 'COMPLETED':
30 # Parse the output (it's a JSON string)
31 outputs = json.loads(result['output'])
32 return outputs
33 elif result['status'] == 'FAILED':
34 raise Exception(result.get('error', 'Generation failed'))
35
36 # Wait 7 seconds before polling again
37 time.sleep(7)
38
39# Make the initial request
40response = requests.post(
41 url,
42 json=data,
43 headers={
44 'x-api-key': api_key,
45 'Content-Type': 'application/json'
46 }
47)
48
49if response.status_code == 200:
50 result = response.json()
51 print('Request queued:', result)
52
53 # Start polling for results
54 outputs = poll_for_result(result['poll_url'])
55 print('Generation complete:', outputs)
56else:
57 print(f"Error: {response.status_code}")
58 print(response.text)API Endpoint
POST
https://api.segmind.com/workflows/v2/6b003ffdf0c55f2ccb518a98-v2Parameters
takeoptionalstring (uri)Take
Default:
"https://images.segmind.com/public/8afe091b535dc7632b83da85e50c2e1a.mp4"actor_sheetoptionalstring (uri)Actor Sheet
Default:
"https://images.segmind.com/public/3a8aace91e644bc610d07248dd52d8ab.jpeg"scene_imageoptionalstring (uri)Scene Image
Default:
"https://images.segmind.com/public/2dead4f4f97137a8c43fe9da190dd3f4.jpeg"scene_notesoptionalstringScene Notes
Default:
"Late afternoon in an old farmhouse kitchen. Warm low sunlight comes through the window on the left and the background is out of focus."performance_intentoptionalstringPerformance Intent
Default:
"Pleading desperately with someone, then breaking down on the edge of tears."directionoptionalstringDirection
Default:
"Directed notes (recommended)"acting_sizeoptionalstringActing Size
Default:
"As performed"resolutionoptionalstringResolution
Default:
"1080p"deliveryoptionalstringDelivery
Default:
"H.264 mp4 (plays everywhere)"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