Architectural Video Presentations with Nano Banana and InfiniteTalk
Transform User-Generated Content into Immersive Architectural Presentation Videos with Nano Banana 2 and Infinite talk
~$0.5706
1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/69b3a8f4e90fc09c1a796076-v1"
7
8data = {
9 "Input_Image": [
10 "https://segmind-inference-inputs.s3.amazonaws.com/bd657628-3890-47ef-8d5c-02c760881a7a-df5b75bb-f352-4e04-9385-f74f503ce8f8.png",
11 "https://segmind-inference-inputs.s3.amazonaws.com/4f223367-ffcf-4edd-834e-9f9450783638-hf_20260219_114702_f0f039ae-91d0-46b5-b9f1-a5d21afecfc0.jpeg"
12 ],
13 "Voiceover_Script": "Step into a space designed for warmth, comfort, and quiet luxury, while natural stone walls and warm timber ceilings create a calming retreat. A central fire pit offers cozy gatherings even in the coldest weather, and plush seating invites you to relax, unwind, and fully experience the beauty outside."
14}
15
16def poll_for_result(poll_url):
17 """Poll the API until the generation is complete"""
18 while True:
19 response = requests.get(
20 poll_url,
21 headers={'Authorization': f'Bearer {api_key}'}
22 )
23 result = response.json()
24
25 if result['status'] == 'COMPLETED':
26 # Parse the output (it's a JSON string)
27 outputs = json.loads(result['output'])
28 return outputs
29 elif result['status'] == 'FAILED':
30 raise Exception(result.get('error', 'Generation failed'))
31
32 # Wait 7 seconds before polling again
33 time.sleep(7)
34
35# Make the initial request
36response = requests.post(
37 url,
38 json=data,
39 headers={
40 'Authorization': f'Bearer {api_key}',
41 'Content-Type': 'application/json'
42 }
43)
44
45if response.status_code == 200:
46 result = response.json()
47 print('Request queued:', result)
48
49 # Start polling for results
50 outputs = poll_for_result(result['poll_url'])
51 print('Generation complete:', outputs)
52else:
53 print(f"Error: {response.status_code}")
54 print(response.text) 1import requests
2import time
3import json
4
5api_key = "YOUR_API_KEY"
6url = "https://api.segmind.com/workflows/69b3a8f4e90fc09c1a796076-v1"
7
8data = {
9 "Input_Image": [
10 "https://segmind-inference-inputs.s3.amazonaws.com/bd657628-3890-47ef-8d5c-02c760881a7a-df5b75bb-f352-4e04-9385-f74f503ce8f8.png",
11 "https://segmind-inference-inputs.s3.amazonaws.com/4f223367-ffcf-4edd-834e-9f9450783638-hf_20260219_114702_f0f039ae-91d0-46b5-b9f1-a5d21afecfc0.jpeg"
12 ],
13 "Voiceover_Script": "Step into a space designed for warmth, comfort, and quiet luxury, while natural stone walls and warm timber ceilings create a calming retreat. A central fire pit offers cozy gatherings even in the coldest weather, and plush seating invites you to relax, unwind, and fully experience the beauty outside."
14}
15
16def poll_for_result(poll_url):
17 """Poll the API until the generation is complete"""
18 while True:
19 response = requests.get(
20 poll_url,
21 headers={'Authorization': f'Bearer {api_key}'}
22 )
23 result = response.json()
24
25 if result['status'] == 'COMPLETED':
26 # Parse the output (it's a JSON string)
27 outputs = json.loads(result['output'])
28 return outputs
29 elif result['status'] == 'FAILED':
30 raise Exception(result.get('error', 'Generation failed'))
31
32 # Wait 7 seconds before polling again
33 time.sleep(7)
34
35# Make the initial request
36response = requests.post(
37 url,
38 json=data,
39 headers={
40 'Authorization': f'Bearer {api_key}',
41 'Content-Type': 'application/json'
42 }
43)
44
45if response.status_code == 200:
46 result = response.json()
47 print('Request queued:', result)
48
49 # Start polling for results
50 outputs = poll_for_result(result['poll_url'])
51 print('Generation complete:', outputs)
52else:
53 print(f"Error: {response.status_code}")
54 print(response.text)API Endpoint
POST
https://api.segmind.com/workflows/69b3a8f4e90fc09c1a796076-v1Parameters
Input_ImageoptionalarrayInput Image
Default:
["https://segmind-inference-inputs.s3.amazonaws.com/bd657628-3890-47ef-8d5c-02c760881a7a-df5b75bb-f352-4e04-9385-f74f503ce8f8.png","https://segmind-inference-inputs.s3.amazonaws.com/4f223367-ffcf-4edd-834e-9f9450783638-hf_20260219_114702_f0f039ae-91d0-46b5-b9f1-a5d21afecfc0.jpeg"]Voiceover_ScriptoptionalstringVoiceover Script
Default:
"Step into a space designed for warmth, comfort, and quiet luxury, while natural stone walls and warm timber ceilings create a calming retreat. A central fire pit offers cozy gatherings even in the coldest weather, and plush seating invites you to relax, unwind, and fully experience the beauty outside."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