Skip to content

Mage API · Video model

Magejutsu API

Recast any video, keeping its motion

POST https://api.mage.space/v1/magejutsu/generate

At a glance

The Magejutsu API runs Magejutsu and 2 other variants through Mage at POST https://api.mage.space/v1/magejutsu/generate. A request at the default settings costs 1,856 Gems (about $1.856), with no subscription. Magejutsu takes saved characters, references by @handle in the prompt.

  • VideoOutput
  • 3Variants
  • 1,856Gems per clip, default
  • $1.856About, in USD

Overview

What the Magejutsu API does

Recasts a video you already have: send the clip and photos of who or what replaces it, and the motion, camera, timing and sound stay as filmed. Sources run 4 to 30 seconds.

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.

It accepts image, additional_images, videos as inputs.

Quick start

Call the Magejutsu API

Set MAGE_API_KEY, submit to /magejutsu/generate, and poll status_url until the request completes.

cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/magejutsu/generate' \
  --header "Authorization: Bearer $MAGE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
  "videos": [
    "https://example.com/input.jpg"
  ],
  "image": "https://example.com/input.jpg",
  "model_id": "magejutsu"
}' | jq -r '.status_url')

# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"
TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';

const mage = new Mage(); // reads MAGE_API_KEY

const request = await mage.run('magejutsu', {
  prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
  videos: [
    'https://example.com/input.jpg',
  ],
  image: 'https://example.com/input.jpg',
  model_id: 'magejutsu',
});

console.log(request.result.url);
Python
# pip install mage-space
from mage_space import Mage

mage = Mage()  # reads MAGE_API_KEY

request = mage.run("magejutsu", {
    "prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
    "videos": [
        "https://example.com/input.jpg",
    ],
    "image": "https://example.com/input.jpg",
    "model_id": "magejutsu",
})

print(request["result"]["url"])

Models

Magejutsu model_id values

Send model_id to pick a variant. A request without one runs the default.

model_idNameDefault
magejutsuMagejutsuYes
magejutsu-liteMagejutsu Lite
magejutsu-featherMagejutsu Feather

Options

Magejutsu parameters

Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.

FieldValues
resolution480p, 720p, 1080p
modemotion_transfer, object_swap

Inputs

Media inputs Magejutsu accepts

Send each as an https URL, a data URL, or an upload of up to 100 MB.

FieldRole
imageThe reference image.
additional_imagesAdditional reference images.
videosThe source videos.

Rules

What the Magejutsu API enforces

  • 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.

More video models

Other video generation APIs on Mage

  • Video · from 147 Gems

    Melon API

    Anime in motion, with optional audio

  • Video · from 30 Gems

    MiniMax-H3 API

    Fast open video with stereo sound

  • Video · from 173 Gems

    Plum API

    Sound on every clip, up to 2K

  • Video · from 360 Gems

    Raspberry API

    Characters brought to life from a first frame

  • Video · from 40 Gems

    Wan Video v2.2 API

    Open-weights video with a Lightning variant

  • Video · from 189 Gems

    Berry API

    Video that stays true to your references

FAQ

Frequently asked questions

How much does the Magejutsu API cost?
A Magejutsu request at the default settings (Magejutsu) costs 1,856 Gems, about $1.856. Other resolutions, durations, and variants change the price; the response reports the exact charge. A generation that fails is refunded; one Mage's content policy blocks is not.
What is the Magejutsu API endpoint?
POST https://api.mage.space/v1/magejutsu/generate with an Authorization: Bearer header carrying your Mage API key. The response includes a status_url to poll for the result.
Which Magejutsu models can I call?
magejutsu (Magejutsu), magejutsu-lite (Magejutsu Lite), magejutsu-feather (Magejutsu Feather). The default is Magejutsu.
Does Magejutsu support reference images or characters?
Magejutsu accepts image, additional_images, videos. Magejutsu takes saved characters, references by @handle in the prompt.
Can I use Magejutsu from Claude or ChatGPT?
Yes. Connect the Mage MCP server to Claude, ChatGPT, Claude Code, Grok, or Cursor and ask for Magejutsu by name. Your assistant reads its options with get_model and quotes the price before it generates.
How long are Magejutsu results kept?
Results and inputs are kept for 30 days. Download anything you want to keep to your own storage.

Start building with Mage

One account, one Gems balance, every model. Pay only for what you generate.