## Basic model info - Model name: topazlabs/topazlabs video-upscaler - Model description: Professional-grade video upscaling using Topaz technology. Enhance your videos with high-quality upscaling. - Endpoint name: video-upscale ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/topazlabs/video-upscaler/latest.json) ### Model input schema The model input schema is: ```json { "properties": { "compression": { "anyOf": [ { "maximum": 1, "minimum": 0, "multipleOf": 0.01, "type": "number" }, { "type": "null" } ], "description": "Compression artifact removal level (0–1)", "title": "Compression", "x-sr-order": 501 }, "enhance_model": { "default": "Proteus", "description": "Video enhancement model: Proteus (best for most videos), Artemis HQ/MQ/LQ (denoise + sharpen, high/medium/low quality), Nyx/Nyx Fast/Nyx XL/Nyx HF (dedicated denoising variants), Gaia HQ/CG (rendered and CGI content), Gaia 2 (animation and motion graphics, half price), Starlight variants (generative diffusion-based upscaling)", "enum": [ "Proteus", "Artemis HQ", "Artemis MQ", "Artemis LQ", "Nyx", "Nyx Fast", "Nyx XL", "Nyx HF", "Gaia HQ", "Gaia CG", "Gaia 2", "Starlight Precise 1", "Starlight Precise 2", "Starlight Precise 2.5", "Starlight HQ", "Starlight Mini", "Starlight Sharp", "Starlight Fast 1", "Starlight Fast 2" ], "title": "Enhance Model", "type": "string", "x-sr-order": 402 }, "grain": { "anyOf": [ { "maximum": 1, "minimum": 0, "multipleOf": 0.01, "type": "number" }, { "type": "null" } ], "description": "Film grain amount (0–1)", "title": "Grain", "x-sr-order": 504 }, "H264_output": { "default": false, "description": "Output using H264 codec instead of the default H265", "title": "H264 Output", "type": "boolean", "x-sr-order": 506 }, "halo": { "anyOf": [ { "maximum": 1, "minimum": 0, "multipleOf": 0.01, "type": "number" }, { "type": "null" } ], "description": "Halo reduction level (0–1)", "title": "Halo", "x-sr-order": 503 }, "noise": { "anyOf": [ { "maximum": 1, "minimum": 0, "multipleOf": 0.01, "type": "number" }, { "type": "null" } ], "description": "Noise reduction level (0–1)", "title": "Noise", "x-sr-order": 502 }, "recover_detail": { "anyOf": [ { "maximum": 1, "minimum": 0, "multipleOf": 0.01, "type": "number" }, { "type": "null" } ], "description": "Recover original detail level (0–1). Higher values preserve more of the source detail", "title": "Recover Detail", "x-sr-order": 505 }, "target_fps": { "anyOf": [ { "maximum": 60, "minimum": 16, "type": "integer" }, { "type": "null" } ], "description": "Target FPS for frame interpolation (16–60). If set, frame interpolation is enabled. Note: 60fps doubles the cost", "title": "Target Fps", "x-sr-order": 403 }, "upscale_factor": { "anyOf": [ { "enum": [ "None", "2x", "4x" ], "type": "string" }, { "maximum": 4, "minimum": 1, "type": "number" } ], "default": "2x", "description": "How much to upscale the video. None = enhance only (no resize), 2x = double resolution, 4x = quadruple resolution, or a float between 1.0–4.0", "title": "Upscale Factor", "x-sr-order": 401 }, "video": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "Video file to upscale", "title": "Video", "x-sr-order": 201 } }, "required": [ "video" ], "title": "VideoUpscalerInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "properties": { "width": { "title": "Width", "type": "integer" }, "height": { "title": "Height", "type": "integer" }, "output_video_dur": { "title": "Output Video Dur", "type": "integer" }, "units": { "title": "Units", "type": "number" }, "video": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" } }, "required": [ "video", "output_video_dur", "width", "height", "units" ], "title": "VideoUpscalerOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "compression": null, "enhance_model": "Proteus", "grain": null, "H264_output": false, "halo": null, "noise": null, "recover_detail": null, "target_fps": null, "upscale_factor": "2x", "video": "" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("topazlabs/video-upscaler/video-upscale", { input: { video: '', upscale_factor: '2x', enhance_model: 'Proteus', target_fps: null, compression: null, noise: null, halo: null, grain: null, recover_detail: null, H264_output: false }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "topazlabs/video-upscaler/video-upscale", arguments={ "video": "", "upscale_factor": "2x", "enhance_model": "Proteus", "target_fps": None, "compression": None, "noise": None, "halo": None, "grain": None, "recover_detail": None, "H264_output": False }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "topazlabs/video-upscaler/video-upscale", SubscribeOptions.builder() .input(Map.of( "video", "", "upscale_factor", "2x", "enhance_model", "Proteus", "target_fps", null, "compression", null, "noise", null, "halo", null, "grain", null, "recover_detail", null, "H264_output", false)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "topazlabs/video-upscaler/video-upscale", input = mapOf( "video" to "", "upscale_factor" to "2x", "enhance_model" to "Proteus", "target_fps" to null, "compression" to null, "noise" to null, "halo" to null, "grain" to null, "recover_detail" to null, "H264_output" to false), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/topazlabs/video-upscaler/video-upscale \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"video":"","upscale_factor":"2x","enhance_model":"Proteus","target_fps":null,"compression":null,"noise":null,"halo":null,"grain":null,"recover_detail":null,"H264_output":false}' ``` ## Model readme undefined