---
name: up4k-upscale
description: Upscale local MP4/MOV videos to 4K with the Upscaler CLI or MCP, with explicit self-likeness consent and structured results.
---

# Upscaler

Use when the user requests 4K upscaling of local videos or folders. Node.js 20+ and an unlocked Upscaler account with credits are required. API access opens after one paid top-up order of at least 199,000 VND; Creator accounts unlock automatically; /api/v1/me access shows the current state.

Job responses include `credits` and `charge` (decimal credits actually debited). Source admission errors are `source_dimensions_missing`, `source_short_side` and `source_aspect_ratio`. Read https://up4k.io/developers and https://up4k.io/openapi.json for the current API contract. Set UP4K_API_KEY; alternatively run `npx -y up4k@latest login` interactively to save the key. Headless scripts need no login. API, CLI and MCP do not require general terms acceptance.

Ask the user whether the upload contains their own image or voice. Never guess self-likeness or accept consent for them. Then run:

```sh
npx -y up4k@latest upscale <path> --self-likeness no|yes --json
```

Replace no|yes with their answer. With yes, obtain explicit likeness consent; only then use --yes-self-likeness-consent in a headless run. Keep keys out of logs, frontend code and URLs. Documentation examples use cx_live_... as a placeholder.

Read stdout as NDJSON: one JSON object per line. Events are scan, skipped, created, uploaded, queued, progress, done, failed, summary. Prompts and consent statements go to stderr. Report downloaded output paths from done events and summarize failures; exit status 1 indicates failures or an early stop. Default output is adjacent to the source, named `clip 4K.mp4`. Preserve .up4k-state.json for recovery. Do not invent success from queued/progress.

For MCP, configure `npx -y up4k@latest mcp` with env UP4K_API_KEY. Every tool returns structuredContent and JSON text; upscale results are in structuredContent.results. No remote MCP endpoint is provided.

For REST uploads, send `consent:{selfLikeness:false}` only when the user answers no. If they answer yes, obtain explicit agreement to `/api/v1/me`'s `consent.self_likeness_statement` before sending `consent:{selfLikeness:true,selfLikenessConsent:true}`. General terms fields are not required; legacy terms metadata in `/me` is informational.

On no_credits, duration_limit, api_locked, rate_limited or active_limit after the command stops, report the error and required user action. Do not loop: ask for credits/access, a shorter video, or a later retry as appropriate; honor Retry-After and wait for active jobs. The CLI already has bounded network/rate-limit retries. Wallet accounts have no daily processing cap; credits limit usage. Results expire after 2 hours, so download promptly. Webhook receivers must verify the raw-body HMAC and deduplicate the stable event id.
