- Third-party
Topaz Labs Starlight Fast 2 (slf-2) enhances and upscales source video to 1080p or 4K with faster processing than Starlight Precise. It is designed for video restoration workflows where turnaround time is important.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing |
|
const response = await env.AI.run(
'topaz/starlight-fast-2',
{
end_index: 120,
frame_count: 150,
frame_rate: 29.97,
source_container: 'mp4',
source_height: 360,
source_width: 640,
start_index: 0,
target_resolution: '1920x1080',
upscaling_factor: 2,
video_uri:
'https://replicate.delivery/pbxt/PetLEVcclEkT5H9A3tYETZyAMT5GE2Sa4m6sQqPDpj8vgHga/animatediff.B572L3lv.mp4',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "topaz/starlight-fast-2",
"input": {
"end_index": 120,
"frame_count": 150,
"frame_rate": 29.97,
"source_container": "mp4",
"source_height": 360,
"source_width": 640,
"start_index": 0,
"target_resolution": "1920x1080",
"upscaling_factor": 2,
"video_uri": "https://replicate.delivery/pbxt/PetLEVcclEkT5H9A3tYETZyAMT5GE2Sa4m6sQqPDpj8vgHga/animatediff.B572L3lv.mp4"
}
}'{
"state": "Completed",
"result": {
"video": "https://examples.aig.cloudflare.com/topaz/starlight-fast-2/fast-video-enhancement.mp4"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}video_uri
stringrequiredformat: uriHTTPS URI of the source video to enhancesource_container
stringrequiredenum: 3gp, avi, dv, flv, m1v, m2t, m2ts, m2v, m4v, mkv, mov, mp4, mpeg, mpg, mts, mxf, ser, ts, vob, webm, wmvContainer format of the source videosource_width
integerrequiredexclusiveMinimum: 0maximum: 9007199254740991Width of the source video in pixelssource_height
integerrequiredexclusiveMinimum: 0maximum: 9007199254740991Height of the source video in pixelsframe_count
integerrequiredexclusiveMinimum: 0maximum: 9007199254740991Total frame count of the source video (used by Topaz for credit estimation)frame_rate
numberrequiredexclusiveMinimum: 0Frame rate of the source video in frames per second (e.g. 29.97)target_resolution
stringrequireddefault: 1920x1080enum: 1920x1080, 3840x2160Target output resolutionupscaling_factor
numberrequireddefault: 1minimum: 1maximum: 8Output resolution multiplier relative to the source videostart_index
integerrequireddefault: 0minimum: 0maximum: 9007199254740991First source frame to processend_index
integerrequireddefault: 1000000minimum: 0maximum: 9007199254740991Last source frame to processvideo
stringformat: uriURL to the enhanced video