FlashVSR
FlashVSR enhances video quality in real-time, processing high-resolution content
1import requests
2import json
3
4url = "https://api.segmind.com/v1/flashvsr"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "video": "https://segmind-resources.s3.amazonaws.com/input/da981ec9-cb58-4a1d-b56f-49f4e0f38ac7-flash_720.mp4",
12 "mode": "tiny",
13 "scale": 2,
14 "color_fix": true,
15 "local_range": 12,
16 "seed": 42
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/flashvsr"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "video": "https://segmind-resources.s3.amazonaws.com/input/da981ec9-cb58-4a1d-b56f-49f4e0f38ac7-flash_720.mp4",
12 "mode": "tiny",
13 "scale": 2,
14 "color_fix": true,
15 "local_range": 12,
16 "seed": 42
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text)API Endpoint
https://api.segmind.com/v1/flashvsrParameters
videorequiredstring (uri)Input video to upscale. Supports URL or video file; max duration: 60 secs.
color_fixoptionalbooleanEnable color correction for video consistency. Recommended for natural visuals.
truelocal_rangeoptionalintegerSet frame attention range. Higher for temporal accuracy.
12Range: 5 - 15modeoptionalstringChoose quality or speed. 'full' is high quality; 'tiny' is faster.
"tiny""full""tiny"scaleoptionalintegerSet upscaling level. 4 for max detail, 2 for balance.
21234seedoptionalintegerSet seed for reproducibility. Use -1 for random.
42Range: -1 - 99999999Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out