Skip to main content
POST
MAGI-2

Parameters and input modes

model and input are required; omitted optional fields use model defaults. See the Body section below for full field definitions.

Special modes

  • Reference limits & targeting: reference_to_video accepts up to 10 images, 5 videos (2–30s each, ≤30s total), and 5 audio clips (2–30s each, ≤30s total); cite assets in prompt as @Image1, @Video1, @Audio1. English prompts are recommended.

Use cases

Submit an example to POST /api/v1/tasks/create_task with your own prompt and media URLs.
Track results via Query task or callback_url (Webhook security); see Create task for submission errors. Output URLs remain valid for 14 days; tasks unfinished after 24 hours fail at no charge.

Playground and pricing

Each successful output is billed separately at 1080p for requested duration (4–30 integer seconds) at one flat rate; output clips may run ~0.24s longer without extra charge. Audio, aspect ratio, and reference media add no extra charge; failed outputs cost 0. Check balances via Available Credits.

Try in Playground

Test text, keyframe, and multimodal reference modes interactively.

View pricing

View 1080p per-second pricing and top-up bonus rates.

Authorizations

Authorization
string
header
required

Sign in to APIstable, then create and copy a key from API Key management.

Send this HTTP header with every request:

Replace YOUR_API_KEY with the key you created.

Body

application/json
model
enum<string>
required

The APIstable model ID for this endpoint.

Available options:
magi-2
Example:

"magi-2"

input
object
required

MAGI-2 input. Set mode, then fill the media fields that mode uses.

callback_url
string<uri>

Optional public HTTPS endpoint for signed completion callbacks; no redirects or private IPs.

Callbacks

POST
{$request.body#/callback_url}Webhook

Body

application/json

When the task succeeds or fails, APIstable sends a JSON POST to the callback_url supplied at creation. Verify the signature and return HTTP 2xx to acknowledge delivery.

Read data.status to determine the generation outcome. Successful tasks report succeeded with generated video URLs in data.result.urls. For a failed task, data.result is null and data.message contains the failure reason.

Use X-APIstable-Signature, X-APIstable-Timestamp, and X-APIstable-Event-Id to verify and deduplicate deliveries. See Webhook security.

Webhook payload example

code
integer
required
msg
string
required
Allowed value: "success"
data
object
required

Response

2XX

Webhook acknowledged.

Response

Accepted task. Poll the common task endpoint or use callback_url.

code
any
required
msg
any
required
data
object
required