FlashVSR

FlashVSR enhances video quality in real-time, processing high-resolution content

~174.66s
~$1.181
 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

POSThttps://api.segmind.com/v1/flashvsr

Parameters

videorequired
string (uri)

Input video to upscale. Supports URL or video file; max duration: 60 secs.

color_fixoptional
boolean

Enable color correction for video consistency. Recommended for natural visuals.

Default: true
local_rangeoptional
integer

Set frame attention range. Higher for temporal accuracy.

Default: 12Range: 5 - 15
modeoptional
string

Choose quality or speed. 'full' is high quality; 'tiny' is faster.

Default: "tiny"
Allowed values :
"full""tiny"
scaleoptional
integer

Set upscaling level. 4 for max detail, 2 for balance.

Default: 2
Allowed values :
1234
seedoptional
integer

Set seed for reproducibility. Use -1 for random.

Default: 42Range: -1 - 99999999

Response Type

Returns: Video

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

Model or endpoint 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