Starlight Precise 2.6
Starlight Precise 2.6 is Topaz Labs’ generative video enhancement model for upscaling and restoration with high fidelity. It improves faces, textures, and fine details while maintaining temporal consistency across frames. An input video and accurate source metadata are required, making it suited to refining generated footage and restoring archival video for higher-resolution delivery. Your use is subject to Topaz Labs's Terms & Privacy Policies.
View API reference- Price
- $0.09, Per secondLowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'topaz/starlight-precise-2.6', prompt: '', inputReferences: [ { data: 'https://example.com/input.mp4', mediaType: 'video/mp4' }, ], resolution: '1920x1080', providerOptions: { topaz: { source: { width: 1280, height: 720, duration: 5, frameRate: 30 }, }, },});Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Getting started
Enhance an existing video with experimental_generateVideo from AI SDK 6 or later. Set AI_GATEWAY_API_KEY; AI Gateway routes the request to Topaz and waits for the result.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video API setup.
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'topaz/starlight-precise-2.6', prompt: '', inputReferences: [ { data: 'https://example.com/input.mp4', mediaType: 'video/mp4' }, ], resolution: '1920x1080', providerOptions: { topaz: { source: { width: 1280, height: 720, duration: 5, frameRate: 30 }, }, },});Enhance a video
Supply your input video and the output dimensions.
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'topaz/starlight-precise-2.6', prompt: '', inputReferences: [ { data: 'https://example.com/input.mp4', mediaType: 'video/mp4' }, ], resolution: '1920x1080', providerOptions: { topaz: { source: { width: 1280, height: 720, duration: 5, frameRate: 30 }, }, },});| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Use an empty string; the SDK requires a prompt but Topaz does not use text. |
inputReferences | Array<{ data: string | Uint8Array | URL; mediaType: string }> | Yes | Exactly one input video. For MP4, use mediaType: "video/mp4". |
resolution | string | No | Output dimensions as width x height, e.g. 1920x1080. Required unless output.width/output.height or complete source metadata supplies them. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| video | — | URL, File bytes | 1 | — | Supply one existing video through inputReferences. |
Provider options
Starlight requires the actual input metadata under providerOptions.topaz.source. The SDK does not inspect the video.
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'topaz/starlight-precise-2.6', prompt: '', inputReferences: [ { data: 'https://example.com/input.mp4', mediaType: 'video/mp4' }, ], resolution: '1920x1080', providerOptions: { topaz: { source: { width: 1280, height: 720, duration: 5, frameRate: 30 }, }, },});Pass these fields under providerOptions.topaz.
| Parameter | Type | Required | Description |
|---|---|---|---|
source | { width: number; height: number; duration: number; frameRate: number; frameCount?: number } | Yes | Actual input width and height in pixels, duration in seconds, and frame rate. If supplied, all four fields are required. Set frameCount explicitly for variable-frame-rate input. |
output | { width?: number; height?: number } | No | Output dimensions; these take precedence over resolution. |
sharpness | number | No | Output sharpening from 1 to 5. Defaults to 5. |