Text to Video

wan2.7

Wan 2.7 text-to-video, image-to-video, and video continuation.

POST /v1/videos/generationsAsync generation

Quick start

Submit a request with this public model ID. The API immediately returns a normalized job; poll GET /v1/jobs/{jobId} while its status is queued or running.

curl -X POST "https://api.artany.ai/v1/videos/generations" \
  -H "Authorization: Bearer $ARTANY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-id" \
  -d '{"model":"wan2.7","prompt":"A cinematic sunrise over the ocean","resolution":"1080P","duration":5,"size":"16:9","prompt_extend":true}'

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer token for an Artany API key.
Content-TypeYesMust be application/json.
Idempotency-KeyRecommended8–128 characters. Reusing it with an identical request prevents duplicate jobs and charges.

Body

{
  "model": "wan2.7",
  "prompt": "A cinematic sunrise over the ocean",
  "resolution": "1080P",
  "duration": 5,
  "size": "16:9",
  "prompt_extend": true
}

Request Parameters

Only fields in this model’s public request contract are shown. Defaults are applied before validation and quoting.

Note:The request mode follows the supplied inputs: no image or video creates text-to-video; image or video inputs create an image-conditioned workflow.

modelstringrequireddefault: "wan2.7"

Stable public model ID for this request.

promptstringrequired

Video content description, up to 5,000 characters.

Length: 1–5000

  • Required when no image or video is provided.
  • For image- or video-conditioned requests, describe the intended action and camera movement.
image_urlsarray<string>

Image array for image-to-video.

Items: 1–2

Field description

One image
Opening-frame video.
Two images
First/last-frame video; the first item is the opening frame and the second is the ending frame.

Note:Use image_urls or image_with_roles, not both.

image_with_rolesarray<object>

Image objects with explicit frame roles, used instead of image_urls.

Items: 1–2

Field description

url
Image URL.
role
first_frame or last_frame; first_frame is the default.
[
  {
    "url": "https://example.com/start.jpg",
    "role": "first_frame"
  },
  {
    "url": "https://example.com/end.jpg",
    "role": "last_frame"
  }
]

Note:Use image_with_roles or image_urls, not both.

video_urlsarray<string>

Video array for video-continuation generation. Only the first video is used.

Items: 1–1

  • Supported formats are mp4 and mov.
  • The source clip must be 2–10 seconds, at most 100MB, have width and height between 240 and 4096 pixels, and have a ratio from 1:8 to 8:1.
negative_promptstring

Content or visual defects to avoid, up to 500 characters.

Length: 1–500

resolutionstringdefault: "1080P"

Output video resolution.

Allowed: 720P, 1080P

Field description

720P
Standard tier
1080P
High-definition tier
720P1080P
durationintegerdefault: 5

Requested video duration in seconds.

Range: 2–15

Note:Supported duration is 2–15 seconds; use a plain JSON number.

sizestringdefault: "16:9"

Output aspect ratio for text-to-video.

Allowed: 16:9, 9:16, 1:1, 4:3, 3:4

16:99:161:14:33:4
  • Use 16:9, 9:16, 1:1, 4:3, or 3:4. Source media determines the effective ratio for an image- or video-conditioned request.
audio_urlstring

Custom audio input for a supported audio-conditioned request.

Format: uri

  • Use wav or mp3 audio lasting 2–30 seconds and no larger than 15MB.
prompt_extendbooleandefault: true

Whether to rewrite or enrich the prompt before generation.

  • This can improve short prompts but adds processing time.
seedinteger

Non-negative integer that influences generation randomness.

Range: 0–∞

  • The same seed can produce similar results, but exact repeatability is not guaranteed.

Use Cases

Choose the request shape that matches the source media you provide. The examples use the public model ID and accepted public fields.

Text-to-video

Provide a prompt with no image or video input.

{
  "model": "wan2.7",
  "prompt": "A cat chasing butterflies on the grass, bright sunshine, slow motion",
  "duration": 5,
  "resolution": "1080P",
  "size": "16:9"
}

First/last-frame video

Provide two images to set the opening and ending frame.

{
  "model": "wan2.7",
  "prompt": "The cat looks up as the sun sets",
  "image_urls": [
    "https://example.com/start.jpg",
    "https://example.com/end.jpg"
  ],
  "duration": 5
}

Video continuation

Use a source video and describe the desired continuation.

{
  "model": "wan2.7",
  "prompt": "Continue the motion with a wider camera angle",
  "video_urls": [
    "https://example.com/source.mp4"
  ],
  "duration": 5
}

Response and task status

A successful asynchronous submission returns HTTP 202 with a supplier-neutral job.

{
  "id": "job_…",
  "object": "generation.job",
  "model": "wan2.7",
  "status": "queued",
  "progress": 0,
  "output": null,
  "error": null,
  "billing": {
    "estimated_credits": "…",
    "frozen_credits": "…",
    "charged_credits": "0",
    "state": "frozen",
    "price_version": "2026-07-18.picverse-parity"
  },
  "created_at": "2026-07-21T00:00:00.000Z",
  "completed_at": null
}
  • queued / running: continue polling.
  • succeeded: retrieve media URLs from output; billing has settled.
  • failed / canceled: inspect error; frozen Credits are released.