Character Replace
Changed onWhat this API does
Create the same Character Replace you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
Good for
- Automation and batch processing
- Adding character replace into apps, pipelines, or tools
How it works (3 steps)
- Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.
- Send a request to create a character replace job with the basic fields.
- Check the job status until it's complete, then download the result from downloads.
Key options
- Inputs: usually a file, sometimes a YouTube link, depending on project type
- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.
- Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt
Cost
Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.
For detailed examples, see the product page.
Request
- Base URLhttps://api.magichour.ai
- URLhttps://api.magichour.ai/v1/character-replace
- AuthHTTP bearer
Request body
Example request
{
"name": "My Character Replace video",
"end_seconds": 5,
"model": "wan-animate",
"resolution": "480p",
"assets": {
"video_file_path": "api-assets/id/1234.mp4",
"image_file_path": "api-assets/id/5678.png"
},
"style": {
"mode": "replace",
"selection_mode": "auto"
}
}Response
Success
Example response
{
"id": "cuid-example",
"credits_charged": 450
}Changes
- info
added the new optional request property
/ - info
added the new
minimax-h3enum value to the request property
- info
- info
added the new optional request property
- info
added the new
1080penum value to the request property
- info