Skip to main content
Video restoration and upscaling model focused on preserving fine detail and temporal consistency while improving clarity. Upscales input video to 1080p, 2K, or 4K and lets you control the output frame rate (up to 60 fps). Model name: topazlabs-upscale-starlight-2-5-video

Endpoint

POST /api/ai/videos/generate
Video upscaling is synchronous — the request blocks until the video is ready. Processing time depends on the input video length and target resolution. It is recommended to use /ai/queue instead for long-running jobs, so that you don’t have long running http requests.

Request Parameters

ParameterTypeRequiredDefaultDescription
modelstringyes"topazlabs-upscale-starlight-2-5-video"
input_videostring (URI)yesURL of the video to upscale.
resolutionstringno"4k"Target output resolution: "1080p", "2k", or "4k".
target_fpsintegerno24Target frame rate (1–60 fps).
response_formatstringno"url""url" returns a hosted URL. "b64_json" returns base64-encoded video bytes inline.
target_namespacestringnocurrent userNamespace to save results and bill to. Can be an organization name.

Resolution and Pricing

ResolutionCost per Second
1080p$0.0374
2K$0.1494
4K$0.1494
Higher resolutions (2K and 4K) are billed at the high-res rate.

Examples

Upscale to 4K (default)

import requests

response = requests.post(
    "https://hub.oxen.ai/api/ai/videos/generate",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "topazlabs-upscale-starlight-2-5-video",
        "input_video": "https://example.com/my-video.mp4",
    },
)

data = response.json()
print("Video URL:", data["videos"][0]["url"])

Upscale to 1080p at 60 fps

import requests

response = requests.post(
    "https://hub.oxen.ai/api/ai/videos/generate",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "topazlabs-upscale-starlight-2-5-video",
        "input_video": "https://example.com/my-video.mp4",
        "resolution": "1080p",
        "target_fps": 60,
    },
)

data = response.json()
print("Video URL:", data["videos"][0]["url"])

Response (response_format: "url")

{
  "created": 1775090723,
  "model": "topazlabs-upscale-starlight-2-5-video",
  "videos": [
    {
      "url": "https://hub.oxen.ai/api/repos/.../files/.../video.mp4?..."
    }
  ]
}
The URL is a temporary link that expires after a period of time.

Response (response_format: "b64_json")

{
  "created": 1775090723,
  "model": "topazlabs-upscale-starlight-2-5-video",
  "videos": [
    {
      "b64_json": "<base64-encoded mp4 bytes>"
    }
  ]
}

Using with /ai/queue

Recommended for longer videos. Returns immediately, processes in the background.

Enqueue

import requests

response = requests.post(
    "https://hub.oxen.ai/api/ai/queue",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "topazlabs-upscale-starlight-2-5-video",
        "input_video": "https://example.com/my-video.mp4",
        "resolution": "4k",
        "target_fps": 30,
        "num_generations": 1,
    },
)

generations = response.json()["generations"]
for g in generations:
    print(f"ID: {g['generation_id']}, Status: {g['status']}")

Poll

import requests

response = requests.get(
    "https://hub.oxen.ai/api/ai/queue",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"model": "topazlabs-upscale-starlight-2-5-video"},
)

status = response.json()
print(f"Remaining: {status['count']}")
When finished, the generation disappears from the list. A count of 0 means all generations are complete.

Cancel

import requests

generation_id = "4ef840a4-..."
response = requests.delete(
    f"https://hub.oxen.ai/api/ai/queue/{generation_id}",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

print(response.json())

Errors

ErrorCauseFix
Field requiredMissing input_videoProvide a video URL
Invalid resolutionUnsupported resolution valueUse "1080p", "2k", or "4k"
target_fps must be between 1 and 60FPS out of rangeUse a value between 1 and 60
num_generations must be an integer between 1 and 4Invalid count (via /ai/queue)Use 1–4