Replace character in video
replace_character_in_videoUse only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors.
Replaces a subject in a video with a character from a reference image, or transfers the video's motion onto that character. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable. Use the named attachment fields first for ChatGPT files. Ask which file goes where if their roles are unclear. If a file fails, ask the user to attach it again and keep the requested settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional project name for identifying this output. Omit to use the API's default project name. | Character Replace - dateTime |
| model | No | Model to use. Defaults to `wan-animate`. * **`wan-animate`**: 480p, 720p. Supports `points` subject selection. * **`kling-3.0`**: 720p, 1080p. Clips of 3–30 seconds in `animate` mode or 3–10 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected. * **`kling-4.0`**: 720p, 1080p. Clips of 3–30 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected. * **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–60 seconds in `animate` mode or 1–30 seconds in `replace` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored. | wan-animate |
| style | No | Optional style controls for replace vs animate mode and subject selection. | |
| video | No | Attach the video from ChatGPT for this input. | |
| assets | No | Source video and reference character image for the job. | |
| resolution | No | Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model. | |
| end_seconds | Yes | End time of your clip (seconds). Must be greater than start_seconds. Free plans are currently limited to 10 seconds of clip (`end_seconds` minus `start_seconds`), enforced by the API and may change. When the user gave no duration, choose one within it. Keep an explicitly requested longer one, explain the Free limit and ask before changing it. Do not default to the source video's full length. | |
| start_seconds | No | Start time of your clip (seconds). Must be ≥ 0. | |
| character_image | No | Attach the character image from ChatGPT for this input. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads. | |
| credits_charged | Yes | The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund. |