Model

Create video

Generate video asynchronously: create a job, poll its status, then download the completed content.

POST /model/v1/videos● Supported

Request body

  • modelstring可选◐ Partially supported

    Video model id, for example `wan2.7-t2v`; list candidates with listModels?type=video. Router support (partial): Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation.

    Select a registered video model explicitly, for example wan2.7-t2v (size=1280x720, seconds=4). Capability preflight errors are reported before creation.

  • promptstring必填

    Text description of the video, at least 1 character. Router support (supported): Controls video content; missing or empty values return 400.

    Controls video content; missing or empty values return 400.

  • secondsstring | integer可选

    When both are supplied, seconds overrides duration.

    Duration works on wan2.7-t2v; malformed values or values outside model capabilities return 400 during preflight.

  • durationinteger可选

    Length of the video in whole seconds. `seconds` takes precedence when both are given.

  • sizestring可选◐ Partially supported

    Output resolution as `WIDTHxHEIGHT`, for example `1280x720`. Router support (partial): Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel.

    Subject to model capability preflight. Earlier wan2.7-t2v samples always produced 1280x720; accepted sizes are not guaranteed pixel-for-pixel.

  • input_referencestring | object可选

    Reference image for image-to-video: a URL or base64 data URL, an object with `image_url`, or an uploaded image file (multipart, at most 20 MiB).

    ▸ 展开子字段(1)
    • image_urlstring | object必填

      URL or base64 data URL of the reference image, as a string or an object with `url`.

  • input_referencesarray可选

    Several reference images; each entry is a URL or base64 data URL, or an object with `image_url`.

    ▸ 展开子字段(1)
    • image_urlstring | object可选

      URL or base64 data URL of the reference image, as a string or an object with `url`.

  • frame_imagesarray可选

    Images that pin the first and last frame; at most 2 entries.

    ▸ 展开子字段(3)
    • typeany可选

      Always `image_url`. Discriminator of the `type`-tagged union this object belongs to.

    • frame_typeany必填

      Frame to constrain with the supplied image: first_frame or last_frame. Each frame type may occur at most once.

      取值 first_framelast_frame
    • image_urlobject必填

      The image to pin.

  • resolutionstring可选

    Output resolution label such as `720p`, for models that take a label instead of `size`.

  • aspect_ratiostring可选

    Aspect ratio of the video such as `16:9`.

  • ▸ 更多参数(4)
    • generate_audioboolean可选

      Whether the video carries a generated audio track. Router support (supported): false produces no audio track on wan2.7-t2v; the default output includes audio.

      false produces no audio track on wan2.7-t2v; the default output includes audio.

    • seedinteger可选

      Seed for reproducible generation, on models that support it.

    • callback_urlstring可选

      HTTP or HTTPS callback URL, forwarded to models that support completion callbacks.

    • qualitystring可选

      Provider-specific quality setting.

Returns

200

Billed per second of output video; GET /model/v1/models exposes pricing.video_second in USD per second.

Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes

Response

HTTP 200

Success

application/json

NameTypeDescription
idstringId of the video job; pass it as `video_id` to retrieve, download or delete it.
objectstringObject type; always `video`.
modelstringModel that generates the video.
statusstringLifecycle of the job. Poll until it is `completed` or `failed`.
progressintegerProgress from 0 to 100. It is 0 until the job completes and 100 once it has.
created_atintegerUnix time in seconds at which the job was created.
completed_atinteger | nullUnix time in seconds at which the job completed; null until then.
expires_atinteger | nullUnix time in seconds after which the output expires; null because outputs currently have no expiry.
secondsstringLength of the video in seconds, as a string; for a completed job it is the delivered length.
sizestringResolution of the video as `WIDTHxHEIGHT`; null when the provider did not report one.
promptstring | nullPrompt the job was created with.
remixed_from_video_idnullAlways null; remix is not supported.
errorobject | nullWhy the job failed; null unless status is `failed`.
error.codestringMachine-readable failure code.
error.messagestringHuman-readable failure message.
polling_urlstringRelative URL to poll for the job state; same as retrieveVideo for this job.
unsigned_urlsarray<string>Relative URLs of the finished output; empty until the video is ready. Download them with the same API key.
usageobjectCost of the job; present once a price applies.
usage.costnumberCost of the job in USD: delivered seconds times the per-second price once completed, 0 while running.

Create, poll and download

First create a video and save its id. Poll status while queued / in_progress; stop and inspect error if failed. Download content only after completed.

Typical generation takes 10–15 minutes. This example polls for up to 30 minutes; resume with the same job ID if it is still processing.

# Requires curl and jq. Set PRAXIS_API_KEY and API_BASE (your API origin).
job=$(curl --fail-with-body -sS "$API_BASE/model/v1/videos" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"wan2.7-t2v","prompt":"A cat stretching in the morning sun","seconds":"4","size":"1280x720"}') || exit 1
VIDEO_ID=$(printf '%s' "$job" | jq -er '.id') || exit 1
for attempt in $(seq 1 360); do
  job=$(curl --fail-with-body -sS "$API_BASE/model/v1/videos/$VIDEO_ID" \
    -H "Authorization: Bearer $PRAXIS_API_KEY") || exit 1
  status=$(printf '%s' "$job" | jq -er '.status') || exit 1
  case "$status" in
    completed) break ;;
    failed) printf '%s\n' "$job"; exit 1 ;;
    queued|in_progress) sleep 5 ;;
    *) printf 'Unexpected status: %s\n' "$status"; exit 1 ;;
  esac
done
[ "$status" = completed ] || { printf 'Still processing; resume polling %s\n' "$VIDEO_ID"; exit 1; }
curl --fail-with-body -sS "$API_BASE/model/v1/videos/$VIDEO_ID/content" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" -o video.mp4