|Docs

Deliver in 4K or HDR from an invideo cut

You end up with a 4K or HDR master of a cut made in invideo, also called an upscale or an SDR to HDR conversion. export makes a 1080p MP4. Your agent upscales that file or converts it to HDR with a model, or sends the project to Premiere Pro or DaVinci Resolve and the delivery happens there.

Use invideo for this when the cut, the captions and the music live on an invideo timeline, and you want the bigger master without rebuilding the edit in another app.

Quickest path

Set up your agent first with invideo for AI agents. Then give it this prompt:

Check this timeline and export it at 1080p. Then upscale the export to 4K.Tell me the price before you start the upscale.

In a chat app, your agent gives you the URL of the new file, and you download it from invideo. In a terminal, the agent saves it to a folder with invideo notebook show <sequence-url> --out <dir>.

What you need

Decide the delivery before the agent starts. Gather these:

  • The cut. A timeline on the branch you approved.
  • The target. 4K SDR, HDR10 or HLG, or a ProRes or DNxHR file for an editor or a broadcaster.
  • The delivery spec. The platform's or the client's spec, in words: size, color space, codec.
  • An editing app, for the app route. Premiere Pro or DaVinci Resolve, with the original camera files.

Steps

Three routes lead to the master. Pick one:

  • Upscale to 4K with a model. Export at 1080p, then a model upscales the file.
  • Convert to HDR with a model. Export at 1080p, then a model makes an HDR file, also as ProRes or DNxHR.
  • Deliver from an editing app. Export the project file, then render the master in Premiere Pro or DaVinci Resolve.

Upscale to 4K

  1. Check and export at 1080p

    The agent runs check_timeline and capture at the cuts. Then it calls export with format video, options quality 1080 and encode_quality best, and an idempotency_key. Expected result: an export card with status completed.

  2. Pick the upscale model

    The agent runs find_models with the job in words, picks one, and reads its inputs with get_model. A good pick is topaz_starlight_fast_3, with resolution set to 4k. Your agent can search for others with find_models. Expected result: the model's inputs, with video and resolution.

  3. Price the upscale

    The agent calls generate with dry_run: true, the card's URL as video, and resolution 4k. Your agent runs a dry run first. For any call that costs 1 credit or more, it tells you the price and waits for your yes. A call under 1 credit runs without asking, and your agent tells you what it cost. Expected result: status priced and a price.

  4. Run the upscale

    With your yes, the agent calls generate with max_credits set to that price and an idempotency_key. Expected result: a thread URL, then a sequence URL when the file lands. The agent reads that URL with read, and never calls generate again to check.

  5. Check the master

    The agent runs media metadata on the new sequence URL for its size, and video.frames at a few times to look at detail. Expected result: the size you asked for, and frames with no smeared faces or text.

media video.upscale is the shorter route. It takes the card's URL and runs its default model, or one from its own model list, such as byteplus_vod_upscale. It takes dry_run, max_credits and an idempotency_key the same way. The size it reaches depends on the model, so the agent checks with metadata after.

Convert to HDR

The steps are the same, with an HDR model. A good pick is topaz_hyperion_2_5_sdr_hdr. Its output_format takes hdr10_hevc_mp4, hlg_hevc_mp4 or prores_422_hq. For DNxHR, ltx_video_hdr_upscale takes output_format dnxhr_444, and also gives ProRes and HLG. Your agent can search for others with find_models. For the best result, grade the timeline in rec2020 with set_timeline_working_space before the export.

Deliver from an editing app

The agent calls export with format premiere or davinci and options media_packaging zip. You open the project in the app and point the clips at the original camera files. Then you render 4K, HDR, ProRes or DNxHR from the app. For an SDR ProRes or DNxHR master, this is the route. Export to Premiere Pro, DaVinci Resolve or Final Cut Pro gives the steps. Changes made in the app come back with import_timeline, see Use DaVinci Resolve with invideo.

The upscale route from a terminal:

invideo agent register <project-url> --name <name>export INVIDEO_AS=<name>invideo edit check <edit-url>invideo edit export <edit-url> --format video --quality 1080 \  --encode-quality best --idempotency-key "master-1080" --jsoninvideo status <card-url> --waitinvideo gen models <project-url> --query "upscale a video to 4K"invideo gen model <project-url> --model topaz_starlight_fast_3invideo gen run <page-url> --model topaz_starlight_fast_3 --dry-run \  -i video=<card-url> -i resolution=4kinvideo gen run <page-url> --model topaz_starlight_fast_3 \  -i video=<card-url> -i resolution=4k \  --max-credits <price> --idempotency-key "master-4k"invideo status <thread-url> --waitinvideo media metadata <sequence-url>invideo notebook show <sequence-url> --out ./master

Where each value comes from:

  • <project-url> comes from list_projects or invideo project new. <name> is the name you chose in invideo agent register.
  • <edit-url> is the URL of the branch you approved. <card-url> is .sequences[0] of the export answer.
  • <page-url> is a page that invideo notebook show <project-url> lists. <price> is the estimated_credits the dry run returns.
  • <thread-url> is the url of the paid gen run. <sequence-url> is the file that lands in that thread.

For HDR, swap in --model topaz_hyperion_2_5_sdr_hdr and -i output_format=hlg_hevc_mp4. The shorter route is invideo media video.upscale <card-url> --dry-run, then the same command with --max-credits <price> --idempotency-key <key>.

Cost and time

Edits and exports are free. Generation and transcripts cost credits. Paid stock costs a small credit charge, or one of your workspace's iStock licenses. Your agent runs a dry run first and tells you the price before it spends anything.

On this page, the upscale and the HDR conversion cost credits: topaz_starlight_fast_3, topaz_hyperion_2_5_sdr_hdr, ltx_video_hdr_upscale and media video.upscale. They charge per second of the source video, so a long cut costs more than a short one, and a bigger result costs more than a smaller one. The export and the app route cost nothing in invideo. An upscale of a short video takes a few minutes. A long video takes longer, so the agent tells you when the file lands. See Credits.

If something goes wrong

SymptomFix
export refuses a quality above 1080export stops at 1080p. Export at 1080, then upscale the file.
"video: expected the URL of a sequence in this project holding a video"Pass the export card's URL or a sequence URL, not an asset URL from the media bin.
media says "a project file has none"video.upscale takes a sequence, not a file from the media bin. Pass the export card's URL, or add the file to a page with invideo asset add first.
The dry run price is higher than you expectedThe price grows with the length. Export a shorter range with start and end, or pick a cheaper model from find_models.
Faces or text look smeared after the upscaleTry another model from find_models, or the app route with the original camera files.
get_model or generate refuses the model as not foundModels retire. Run find_models with the job in words, use the best match, and tell the person which model you used.
Exit code 6, or status is heldA safety review, not a refusal. Wait, then run invideo status <url> --wait again. Do not resend. If it ends failed, change the input the review flagged.
Avoid: call generate again to check on a runInstead: read the thread or sequence URL with read. A second generate starts a second paid run.
Avoid: resend after a timeoutInstead: retry with the same idempotency_key. It finds the first run.

Prompts to try

An HDR version for a platform that takes it:

Export this branch at 1080p, then make an HLG HDR version of it. Tell methe price first, and show me frames from the HDR file next to the export.

A ProRes file for a broadcaster:

Export this cut at 1080p and convert it to ProRes 422 HQ HDR with a model.Price it first. If the price is high, tell me the app route instead.

A colorist finish:

Export this timeline as a DaVinci Resolve project with its media in a zip.Our colorist will grade and deliver the 4K master from Resolve.

When to use something else

invideo's export makes MP4 at 1080p or lower, with no alpha. For an SDR ProRes or DNxHR master, an IMF package or a broadcast spec check, deliver from DaVinci Resolve or Premiere Pro. For a transparent version, use another tool.