Build with Magi 2
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/jobs' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "magi-2",
"input": {
"generation_mode": "t2v",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9",
"generate_audio": true,
"prompt": "<prompt>"
}
}'Inputs & settings
promptstringRequiredDescribe the action, camera and sound in up to 15,000 characters.
generation_modestringUse t2v for text, i2v for frames, or multimodal for references.
Options: t2v, i2v, multimodal
durationintegerresolutionstringOptions: 1080p
aspect_ratiostringOptions: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
generate_audiobooleanfirst_frame_urlstringRequired in Frames mode. Sets the output aspect ratio.
last_frame_urlstringOptional in Frames mode.
reference_image_urlsarrayJPG, PNG or WebP. Refs mode requires at least one image, video, or audio clip.
reference_video_urlsarrayMP4 or MOV, 2 to 30 seconds each and 30 seconds total.
reference_audio_urlsarrayMP3 or WAV, 2 to 30 seconds each and 30 seconds total.
seedintegerLeave blank for a random seed.
Full input schema
{
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"description": "Describe the action, camera and sound in up to 15,000 characters."
},
"generation_mode": {
"type": "string",
"title": "Mode",
"enum": [
"t2v",
"i2v",
"multimodal"
],
"default": "t2v",
"description": "Use t2v for text, i2v for frames, or multimodal for references."
},
"duration": {
"type": "integer",
"title": "Duration",
"default": 5,
"minimum": 4,
"maximum": 30
},
"resolution": {
"type": "string",
"title": "Resolution",
"default": "1080p",
"enum": [
"1080p"
]
},
"aspect_ratio": {
"type": "string",
"title": "Aspect Ratio",
"default": "16:9",
"enum": [
"21:9",
"16:9",
"4:3",
"1:1",
"3:4",
"9:16"
]
},
"generate_audio": {
"type": "boolean",
"title": "Generate Audio",
"default": true
},
"first_frame_url": {
"type": "string",
"title": "Start frame URL",
"format": "uri",
"description": "Required in Frames mode. Sets the output aspect ratio."
},
"last_frame_url": {
"type": "string",
"title": "End frame URL",
"format": "uri",
"description": "Optional in Frames mode."
},
"reference_image_urls": {
"type": "array",
"title": "Reference images",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 10,
"description": "JPG, PNG or WebP. Refs mode requires at least one image, video, or audio clip."
},
"reference_video_urls": {
"type": "array",
"title": "Reference videos",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 5,
"description": "MP4 or MOV, 2 to 30 seconds each and 30 seconds total."
},
"reference_audio_urls": {
"type": "array",
"title": "Reference audio",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 5,
"description": "MP3 or WAV, 2 to 30 seconds each and 30 seconds total."
},
"seed": {
"type": "integer",
"title": "Seed",
"minimum": 0,
"maximum": 2147483647,
"description": "Leave blank for a random seed."
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






