Introduction
What this endpoint does
It relights a video you already have. A daylight preset re-lights the scene for a chosen sun and direction; a night preset renders the same shot again after dark. People, framing, camera movement and timing come from your clip.
Inputs that matter
video_url points to the source footage (maximum two minutes). preset picks the look, light_direction the side the sun comes from (daylight presets only), and resolution the output size and price. seed is optional.
What you get back
One MP4 at the source aspect ratio, length and frame rate, with the original audio.
| Field | Value |
|---|---|
| Input | Video |
| Output | Video |
| Endpoint | Video edit |
| Presets | 10 daylight, 5 night |
| Sun direction | 8 positions around the camera |
| Resolution | 480p, 720p or 1080p, source aspect ratio kept |
| Billing | Input clip length (rounded up, 3 s floor) × resolution rate |
Key features & highlights
Late-afternoon sun, backlight, then moonlight
We sent a 5-second clip of a woman on a seaside terrace twice. With backlight and the sun set behind her, the sky turned bright, her hair caught a rim of light and a flare crossed the frame. With moonlight, the same shot became night with stars over the sea. Her turn toward the camera, the balustrade and the coastline stayed where they were.
Day-for-night without grading by hand
moonlight, starry, street_lights, city_glow and blue_hour render the shot again as evening or night rather than darkening it, so the sky, highlights and skin tones change together. On our terrace clip moonlight added a field of stars, dimmed the sea and kept a soft light on her face and robe. The sun direction is ignored for these five.
Performance and camera stay yours
Nothing about the action is re-staged. The person turns at the same moment, the camera drifts the same way and the cut points stay where your editor left them, so a relit clip drops straight back into the timeline.
Request parameters
| Parameter | Required | Description |
|---|---|---|
video_url | Yes | The clip to relight: an MP4 or WebM upload or a direct file link, at most 120 seconds. A longer clip is rejected before processing, at no charge. at least 1 characters |
preset | No | The lighting look. Daylight: |
light_direction | No | Where the sun comes from relative to the camera: front, front-right, right (default), back-right, behind, back-left, left or front-left. |
resolution | No | Output size: 480p, 720p (default) or 1080p, by pixel count with the source aspect ratio kept; smaller sources are scaled up. |
seed | No | Optional whole number. Keeping it fixed lets you compare presets with one less variable; it does not guarantee identical frames. |
Pricing
Charged per rounded-up second of the uploaded clip at your chosen output resolution, subject to a 3-second floor. Submissions longer than 120 seconds are rejected immediately without billing. Preset, sun direction and seed do not alter the rate, and failed runs carry no charge.
| Specification | Price |
|---|---|
| $0.024 / second |
| $0.048 / second |
| $0.12 / second |
Use cases
Rescue a shoot with the wrong weather
Turn a flat overcast take into warm afternoon sun, or soften a harsh noon exterior into soft daylight, without going back to the location.
Day-for-night
Make a daytime exterior read as moonlight, starlight or a street-lit evening while the action, framing and timing of the take stay the same.
Match shots in an edit
Bring clips filmed at different hours to one sun direction and colour so a sequence cuts together.
Prompt guide & pro tips
Start with outdoor footage
Exteriors give the cleanest results because the tool rebuilds sunlight and sky. Trim the clip to the part you need first; up to 120 seconds are accepted.
Pick a look, then the sun's side
Choose a daylight preset such as
golden_houror overcast and say where the sun sits relative to the camera, from front to behind. Night presets need no direction.Check at 480p, deliver at 720p or 1080p
The price per second rises with resolution, so try the preset on a cheap 480p pass and run the keeper at the size you need.
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.
Task flow
Jobs run asynchronously: submit the lighting task, poll status until completion, and fetch the relit MP4 from SpicyAPI media storage. Charges scale with source duration and target resolution, while failed jobs incur no fee.
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.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "spicyapi/relight-video-v1/video-edit",
"input": {
"light_direction": "right",
"preset": "hard_sunlight",
"resolution": "720p",
"video_url": "https://example.com/reference.mp4"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.



