Skip to main content
POST
Wan 2.7

Parameters and input modes

Send model and input. Omitting input.mode selects text_to_video; the other three workflows require an explicit mode (never inferred), and fields are validated against the selected mode. See the Body section below for defaults and limits. nsfw_check: true screens text/images; false or omitted skips it. Provider moderation still applies.

Special modes

Mode compatibility rules; see Body below for exact defaults, duration bounds, and media limits.
  • Mode isolation: Fields belonging to another mode return HTTP 400. Check the Body resolution default before omitting resolution.
  • Reference (reference_to_video): image_with_roles and flat images are mutually exclusive; omit aspect_ratio with a first frame. Reference videos lower the Body duration cap.
  • Edit (video_edit): Default duration matches source length; an explicit duration trims from the start without exceeding source length. Continuation and effects templates are unsupported.

Use cases

Submit to POST /api/v1/tasks/create_task. files.apistable.ai URLs are live samples; replace cdn.example.com links with public HTTPS URLs meeting Body limits.
Track data.task_id via Query task or callback_url (Webhook security); see Create task for errors and Quickstart for auth. Output URLs last 14 days; tasks unfinished after 24 hours are eligible for timeout cleanup at no charge.

Playground and pricing

Each task generates 1 video at one per-second rate across modes. Text/image modes bill requested output seconds; reference/edit modes bill every input video’s seconds (including repeated URLs) plus measured output seconds (images/audio add none). Failed tasks cost 0. See Available Credits.

Try in Playground

Test all four Wan 2.7 modes interactively.

View pricing

Compare 720p and 1080p rates by mode.

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:
wan-2.7
Example:

"wan-2.7"

input
object
required

Wan 2.7 input validated by the selected workflow (mode: text_to_video, image_to_video, reference_to_video, or video_edit). Omitting mode selects text_to_video; the other three workflows require mode. When nsfw_check is true, APIstable screens text and images before submission; omitted or false skips APIstable screening. Video and audio are passed to the model provider, which applies its own moderation.

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. Use task_id to query the task, or receive the result at callback_url.

code
any
required
msg
any
required
data
object
required