curl --request POST \
--url https://api.mage.space/v1/magejutsu/generate \
--header 'Authorization: Bearer <token>' \
--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"
}
'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',
});
console.log(request.result.url);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",
})
print(request["result"]["url"])const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
})
};
fetch('https://api.mage.space/v1/magejutsu/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff",
"status": "in_progress",
"architecture": "magejutsu",
"model_id": "magejutsu",
"created_at": "2026-09-17T14:52:48.000Z",
"updated_at": "2026-09-17T14:52:49.000Z",
"billing": {
"mode": "gems",
"gems_charged": 1586
},
"result": null,
"error": null,
"status_url": "https://api.mage.space/v1/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/status",
"cancel_url": "https://api.mage.space/v1/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/cancel"
}{
"error": {
"code": "invalid_config",
"message": "`resolution` must be one of: 768P, 2K."
}
}{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "insufficient_gems",
"message": "This generation costs 40 gems and the account balance is too low.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff",
"gems_required": 40
}
}{
"error": {
"code": "content_blocked",
"message": "The request was blocked by Mage's content policy.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "architecture_retired",
"message": "This architecture has been retired.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "too_many_requests",
"message": "At most 20 generations may be in flight at once for this account; 20 are running now."
}
}{
"error": {
"code": "content_blocked",
"message": "The request was blocked by an external content restriction.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}Magejutsu
Generate video with Magejutsu through the Mage API: the fields of POST /v1/magejutsu/generate, its options by model, the rules it enforces, and its gem price.
curl --request POST \
--url https://api.mage.space/v1/magejutsu/generate \
--header 'Authorization: Bearer <token>' \
--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"
}
'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',
});
console.log(request.result.url);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",
})
print(request["result"]["url"])const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
})
};
fetch('https://api.mage.space/v1/magejutsu/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff",
"status": "in_progress",
"architecture": "magejutsu",
"model_id": "magejutsu",
"created_at": "2026-09-17T14:52:48.000Z",
"updated_at": "2026-09-17T14:52:49.000Z",
"billing": {
"mode": "gems",
"gems_charged": 1586
},
"result": null,
"error": null,
"status_url": "https://api.mage.space/v1/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/status",
"cancel_url": "https://api.mage.space/v1/requests/d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff/cancel"
}{
"error": {
"code": "invalid_config",
"message": "`resolution` must be one of: 768P, 2K."
}
}{
"error": {
"code": "unauthorized",
"message": "The API key is invalid or has been revoked."
}
}{
"error": {
"code": "insufficient_gems",
"message": "This generation costs 40 gems and the account balance is too low.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff",
"gems_required": 40
}
}{
"error": {
"code": "content_blocked",
"message": "The request was blocked by Mage's content policy.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "architecture_retired",
"message": "This architecture has been retired.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "too_many_requests",
"message": "At most 20 generations may be in flight at once for this account; 20 are running now."
}
}{
"error": {
"code": "content_blocked",
"message": "The request was blocked by an external content restriction.",
"request_id": "d7e6c0f3-6699-4f6c-bb45-2ad7fd9158ff"
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side. Retry, and contact support if it persists."
}
}| Detail | |
|---|---|
| Type | Video |
| Models | magejutsu (Magejutsu, default), magejutsu-lite (Magejutsu Lite), magejutsu-feather (Magejutsu Feather) |
| Image inputs | image (reference image), additional_images (additional reference images) |
| Video inputs | videos (source videos) |
| Gems | Video-edit cost plus a flat 200-Gem processing fee per run, including direction, guidance, and image tasks |
| Model page | Magejutsu |
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.| Model | resolution |
|---|---|
magejutsu | 480p, 720p, 1080p |
magejutsu-lite | 480p, 720p, 1080p |
magejutsu-feather | 480p, 720p |
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.
| Mention | Models | Budget |
|---|---|---|
| Characters | All models | 30 images, characters, and references per request |
| References | All models | 30 images, characters, and references per request |
{
"prompt": "@ana walking through a night market, wearing @red-coat"
}
Rules
A request that breaks one of these is refused with400 invalid_config before any gems are charged.
videosandimageare 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.
billing.gems_charged, and the balance at GET /v1/account.Authorizations
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
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.
1 - 255Body
A partial config for Magejutsu.
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.

