Skip to content

Lightx · Relight

Integrate

Model id lightx/relight
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/lightx/relight?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $0.49 490 API credits your files are measured before the run Run it on this page

Get API key
Open model Video to Video Reference inputs #video-to-video

Video relighting driven by a prompt, reference frame, HDR image or background image

Open model · Video

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

Optional text prompt; Light-X automatically captions the video when no prompt is provided.

•required video_url
Drop a file, or

Input video's URL.

Advanced relit_cond_type · relit_cond_img_url · ref_id · seed · enable_safety_checker · relight_parameters
relit_cond_type default ic

Type of condition used for relighting.

Conditioning image URL required by the 'ref', 'hdr', and 'bg' settings of relight_condition_type; in 'bg' mode, it supplies the background.

default 0

Relighting reference selected by frame index, with the generated frame count serving as an exclusive upper bound. That count defaults to 49.

Seed that makes generation reproducible. Setting it to None selects a seed randomly.

Relighting settings whose use depends on relight_condition_type: 'ic' requires them, whereas 'bg' ignores them and requires a background image URL instead.

POST /run/lightx/relight?wait=20 quote → $0.49
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/lightx/relight?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Lightx · Relight

Changes the lighting of an input video. `relit_cond_type` picks the condition: ic (uses `relight_parameters`), ref, hdr or bg, where the last three need a conditioning image in `relit_cond_img_url`. `ref_id` (0 to 48) selects the reference frame for ref mode. A text `prompt` is optional and the video is auto-captioned when it is left out.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
video_urlrequired video
Typeurl · video
Input video's URL.
promptoptional
Typestring | null
Optional text prompt; Light-X automatically captions the video when no prompt is provided.
seedoptional
Typeinteger | null
Seed that makes generation reproducible. Setting it to None selects a seed randomly.
relit_cond_typeoptional
Typeenum
Defaultic
icrefhdrbg
Type of condition used for relighting.
relight_parametersoptional
Typeobject
Relighting settings whose use depends on relight_condition_type: 'ic' requires them, whereas 'bg' ignores them and requires a background image URL instead.
relight_parameters.relight_promptrequired
Typestring
Text prompt specifying the lighting conditions to produce.
relight_parameters.bg_sourceoptional
Typeenum
DefaultLeft
LeftRightTopBottom
Light-source direction for IC-light.
relight_parameters.cfgoptional
Typenumber
Default2
1 – 10
Scale of classifier-free guidance applied during relighting.
relight_parameters.use_sky_maskoptional
Typeboolean
Defaultfalse
Sky masking toggle for outdoor scenes.
relit_cond_img_urloptional
Typestring | null
Conditioning image URL required by the 'ref', 'hdr', and 'bg' settings of relight_condition_type; in 'bg' mode, it supplies the background.
ref_idoptional
Typeinteger
Default0
0 – 48
Relighting reference selected by frame index, with the generated frame count serving as an exclusive upper bound. That count defaults to 49.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Screening can be relaxed by setting false, provided the caller is authorized.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "lightx/relight",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 490,
    "usd": "0.49",
    "charged": 490,
    "refunded": 0
  },
  "input": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "seed": 42,
    "input_video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "viz_video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
video
object {url, content_type, file_name, file_size}Video file produced by generation.
seed
integerSeed value applied during generation.
input_video
object {url, content_type, file_name, file_size} | nullNormalized or processed input video, optionally returned when the pipeline produces it.
viz_video
object {url, content_type, file_name, file_size} | nullVisualization or debugging video, optionally returned when the pipeline produces it.

More models: Video to Video

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/lightx/relight.md. All models and guides: https://doitong.com/developers/llms.txt