Skip to main content
POST
cURL
Recasts an existing video: a director writes the edit prompt from the source, and a video-edit pass rebuilds who and what performs it. Send the source video and the replacement references; the output keeps the source length, ratio, motion and sound.

Options by model

The tokens each variant accepts. A field left out inherits the architecture default, clamped to the variant’s first listed token when the variant does not offer it.

Mentions

Write @handle in prompt to attach one of your saved entities, exactly as in the app. Each mention counts against the budget below; a mention that does not resolve, or that the chosen model does not support, is refused with 400 invalid_config before any gems are charged. See Characters and references.

Rules

A request that breaks one of these is refused with 400 invalid_config before any gems are charged.
  • videos and image are required.
  • The source video runs 4 to 30 seconds on magejutsu and 4 to 15 on magejutsu-lite, the faster and cheaper variant, and on magejutsu-feather, the cheapest and fastest, which runs motion_transfer only and renders at 480p and 720p. The output follows the source’s length and aspect ratio.
  • Every request runs the same director in the backend. Choose motion_transfer to rebuild the performers and keep the motion, or object_swap to change selected elements and keep the rest of the shot as filmed. The mode also decides how the source is prepared: a motion transfer guides the edit with each replaced performer’s movement and face, and an object swap edits the source as filmed. A clip the guidance cannot read, such as one with no person in it, renders from the source as filmed. There are no manual approval steps or draft renders.
  • Send up to 30 reference images across image and additional_images. The director reads every one, and the edit receives the ones its prompt uses: up to 27 on magejutsu, 9 on magejutsu-lite and 8 on magejutsu-feather.
  • The prompt is optional: without one, the director maps the references to the source by prominence and fit.
  • Original audio is restored by default; set keep_original_audio to false to retain generated audio.
  • The images are the replacement; mention each in the prompt by position (“image 1 is the person on the left”).
  • The source video is the only one accepted on a request; a longer clip is refused rather than trimmed.
Every field below that you leave out keeps its default. Option values are the tokens listed per field; a numeric token may be sent as a number. Fields the schema does not list pass through to the model unchanged. The exact charge for other settings is in the response’s billing.gems_charged, and the balance at GET /v1/account.

Authorizations

Authorization
string
header
required

Create a key in API → API Keys: select Create API key, name it in the popup, then select Create key. Copy the one-time key and send it as Authorization: Bearer mage_sk_…. Keys are for server-side code only.

Headers

Idempotency-Key
string

A key of your choosing, 1 to 255 characters, scoped to your API key. A retried submit with the same key returns the original request with 200 instead of charging again. The key identifies the first submission made with it; later bodies are not compared. A refusal recorded under the key (its envelope carries request_id) replays the same way, so a new attempt needs a new key.

Required string length: 1 - 255

Body

application/json

A partial config for Magejutsu.

prompt
string
default:""

Optional directions; leave out to let the model decide.

seed
integer | null

Integer seed for reproducible output; omit or send null for a random seed.

model_id
enum<string>
default:magejutsu

The model variant to generate with.

Available options:
magejutsu,
magejutsu-lite,
magejutsu-feather
resolution
enum<string>
default:720p

Output resolution token.

Available options:
480p,
720p,
1080p
mode
enum<string>
default:motion_transfer

One of the listed tokens.

Available options:
motion_transfer,
object_swap
image

The reference image. An https URL or a data URL.

additional_images
(string<uri> | string)[]

Additional reference images. Each an https URL or a data URL.

videos
(string<uri> | string)[]

The source videos. Each an https URL or a data URL.

keep_original_audio
boolean
default:true

Response

The request was accepted; poll status_url for the result. A retried submit whose Idempotency-Key was used before answers 200 with the same shape, the original request, and charges nothing.

request_id
string<uuid>
required

The request id, also the id in status_url and cancel_url.

status
enum<string>
required

queued and in_progress are live; completed, failed, and cancelled are final.

Available options:
queued,
in_progress,
completed,
failed,
cancelled
architecture
string
required

The architecture the request generates with.

model_id
string | null
required

The model variant, when the architecture has variants.

created_at
string<date-time>
required

When the request was accepted.

updated_at
string<date-time>
required

When the request last changed.

billing
object
required
result
object | null
required

The output once status is completed, else null.

error
object | null
required

Why the request failed once status is failed, else null.

status_url
string<uri>
required

Poll this URL for the request.

cancel_url
string<uri>
required

POST to this URL to stop the request.

Last modified on October 31, 2026