About Video Relighter
The Video Relighter API takes an existing clip and returns the same footage under different light. It has no prompt: a preset picks the look, light_direction places the sun for daylight presets, and resolution sets both the output size and the per-second rate. Framing, motion, length and the audio track come from the source, which makes it safe to drop into a post-production pipeline after an edit is locked.
Call it with the model name popnow/relight-video-v1/video-edit on POST /jobs/createTask, from $0.024.
Introduction
Video Relighter changes when and how a clip seems to have been shot. Daylight presets keep it daytime but move and reshape the sun: hard and high, low and warm, soft and overcast, or behind the subject. Night presets take the same take into the evening, with moonlight, a starry sky, street lamps, the glow of a city or blue hour. The people, the framing and every camera move come from your footage.
Request
{
"video_url": "https://example.com/terrace.mp4",
"preset": "golden_hour",
"light_direction": "left",
"resolution": "720p"
}Only video_url is required. preset defaults to hard_sunlight, light_direction to right and resolution to 720p.
Presets
- Daylight:
hard_sunlight,noon_sun,low_sun,golden_hour,soft_daylight,warm_afternoon,cool_daylight,overcast,backlight,hazy_backlight. - Night:
moonlight,starry,street_lights,city_glow,blue_hour.
light_direction places the sun at front, front-right, right, back-right, behind, back-left, left or front-left of the camera. Night presets ignore it.
What we saw in testing
A 5-second 1358×678 clip of a woman on a seaside terrace, shot in late-afternoon light, came back after about 85 seconds with backlight and the sun behind at 720p: a bright sky, a rim of light in her hair and a lens flare, at the same size and 25 fps with the original audio. With moonlight at 1080p the same clip became a starry night at 2038×1018 in about three and a half minutes. A 480×480 studio clip on a white backdrop came back at 640×640 with golden_hour, and the plain backdrop had been turned into a sunlit courtyard.
Tips
- Outdoor footage with sky in shot gives the most convincing light.
- Run a 480p pass to choose the preset and sun side, then render the final at 720p or 1080p.
- Keep
seedfixed while you compare presets so fewer things change between runs.
Request parameters
| Parameter | Required | Description |
|---|---|---|
light_direction | No | Where the sun comes from relative to the camera. Used by daylight presets; night presets ignore it. front · front-right · right · back-right · behind · back-left · left · front-left · Default: right |
preset | No | Choose from the presets available for this model. hard_sunlight · noon_sun · low_sun · golden_hour · soft_daylight · warm_afternoon · cool_daylight · overcast · backlight · hazy_backlight · moonlight · starry · street_lights · city_glow · blue_hour · Default: hard_sunlight |
resolution | No | Choose an available output size. 480p · 720p · 1080p · Default: 720p |
seed | No | Use the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647 |
video_url | Yes | The clip to work on. |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per second |
|---|---|
| resolution 480p | $0.024 |
| resolution 720p | $0.048 |
| resolution 1080p | $0.12 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
API quick start
Call the Video Relighter API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model popnow/relight-video-v1/video-edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "popnow/relight-video-v1/video-edit",
"input": {
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"preset": "hard_sunlight",
"light_direction": "right",
"resolution": "720p"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
What to build with the Video Relighter API
- A day-for-night button in a video editor: send the selected clip with preset blue_hour or street_lights and replace it on the timeline when the task returns.
- A continuity fixer that relights every clip in a sequence to the same preset and direction so footage shot across a day cuts together.
- Preset previews: render 480p versions with a fixed seed for each preset, let the user pick one, then re-run the winner at 1080p.
Video Relighter parameter notes
- preset defaults to hard_sunlight. The five night values (moonlight, starry, street_lights, city_glow, blue_hour) ignore light_direction, so hide that control when one of them is selected.
- light_direction accepts eight values relative to the camera, from front to behind; it defaults to right.
- resolution keeps the source aspect ratio and scales smaller sources up; 480p, 720p and 1080p carry different per-second rates.
- seed reduces variation when comparing presets but does not guarantee identical frames, so cache the outputs your users approve.
How Video Relighter API pricing adds up
Billing follows the duration of the source clip at the chosen resolution, with a three-second minimum and a 120-second maximum. The quote reserves the maximum for the cap until the clip is measured; the settled charge reflects the real length, so read the final cost from recordInfo.
- resolution 480p, 5-second clip: $0.12 each, $12.00 for 100 clips
- resolution 1080p, 5-second clip: $0.60 each, $60.00 for 100 clips
Async jobs, webhooks and rate limits
Every Video Relighter request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for popnow/relight-video-v1/video-edit never runs or bills twice.
Common Video Relighter API errors
| errorCode | What it usually means and how to fix it |
|---|---|
invalid_asset | The video must be MP4, WebM or QuickTime between 1 and 120 seconds and reachable over HTTPS. Check length before upload and split longer footage. |
invalid_request | preset and light_direction only accept the listed values. Map your UI labels to the exact enum strings rather than sending display text. |
generation_failed | Retry once with the same parameters; if it fails again, try another preset or a shorter section of the clip. |
Video Relighter API questions
How much does the Video Relighter API cost?
Video Relighter costs $0.024 per second. Prices by option: 480p $0.024 per second, 720p $0.048 per second, 1080p $0.12 per second. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What is the model name for Video Relighter in the API?
Put popnow/relight-video-v1/video-edit for Edit Video in the model field of POST /jobs/createTask.
Does the Video Relighter API keep the original audio?
Yes. The returned MP4 keeps the source soundtrack, length, framing and camera motion; only the lighting changes.
Can I pass a text description of the light?
No. Lighting is chosen with preset and light_direction only. For prompt-based relighting of a still image, use the Relight photo model.
Why does the quote show a larger amount than my clip costs?
The quote reserves the 120-second cap before the source is measured. The task settles at the clip's real duration.
What are the limits of the Video Relighter API?
Resolutions: 480p · 720p · 1080p; Longest input clip: 120 s. Requests outside these limits are rejected before anything is charged.
Can I try Video Relighter without writing code?
Run Video Relighter in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.
All Video Relighter models
Relight changes the light in a single photo from a written description. Video Relighter works on moving footage and keeps every frame in the same new light, chosen from presets rather than a prompt.