HappyWan

Core Reference · 8 min read · Verified 2026-12-02

Wan 3.0 API & HappyHorse API Reference

Complete Wan AI REST endpoint specification for the Wan 3.0 API, Wan 3.0 Pro 4K, and HappyHorse API (`POST /api/jobs`, `GET /api/jobs/{id}`), authentication headers, error codes, and automatic credit refund semantics.

Base URL & Authentication

All Wan 3.0 API and HappyHorse API requests target `https://happywanvideo.ai` over HTTPS. Endpoints accept either an active Studio session cookie (`happywan_session`) or a Bearer API key matching `Authorization: Bearer hwk_live_<hex>`. Teams migrating from legacy Wan 2.6 API endpoints can standardize onto one normalized payload without writing per-model adapters.

HeaderRequiredDescription
AuthorizationYes (API clients)`Bearer hwk_live_<token>` created in Studio -> API Keys.
Content-TypeYes (POST)`application/json`
Idempotency-KeyRecommendedUnique UUID per logical render to prevent double-spend on retries.

Core Endpoints

HappyWan Video keeps the production surface minimal so backend services and CI/CD pipelines can integrate without sprawling SDK dependencies.

Method & PathPurposeNotes
`POST /api/jobs`Create an async video generation jobValidates balance, deducts per-second credits atomically, returns `job`.
`GET /api/jobs`List recent generation jobs for accountOrdered newest-first with credits, status, and output URLs.
`GET /api/jobs/{id}`Fetch live job status & trigger upstream pollAuto-refunds 100% of credits if terminal upstream state is failed or filtered.
`GET /api/assets` / `POST /api/assets`Manage saved World Bible reference URLsStore categorized `image`, `video`, and `audio` links for studio reuse.
`POST /api/billing/checkout`Create a NOWPayments crypto checkout invoiceAccepts exact `skuId` from `BILLING_SKUS` and returns hosted `checkoutUrl`.

POST /api/jobs Request Fields

Every field below maps cleanly onto the underlying Alibaba model schema. Engine-specific constraints (such as resolution availability or Video Edit eligibility) are validated before credits are consumed.

FieldTypeApplies ToDescription
`engine`string (required)All`wan-3.0` | `wan-3.0-pro` | `happyhorse-1.1` | `happywan-1.0` (Dec 2026)
`mode`string (required)All`text-to-video` | `image-to-video` | `reference-to-video` | `video-extend` | `video-edit`
`prompt`string (required)AllVisual, camera, dialogue, and audio direction.
`duration`integer (required)All except `video-edit`2–30s (`wan-3.0` / `wan-3.0-pro`), 3–15s (`happyhorse-1.1`), up to 45s (`happywan-1.0` target).
`resolution`string (required)All`480p` | `720p` | `1080p` | `2k` | `4k` (filtered by engine matrix).
`aspectRatio`string (optional)T2V / I2V / R2V`16:9` | `9:16` | `1:1` | `4:3` | `3:4` | `adaptive` (default `16:9`).
`generateAudio`boolean (optional)AllDefault `true`. Native synced dialogue and foley in the output MP4.
`enablePromptExpansion`boolean (optional)Wan 3.0 / ProToggle upstream shot expansion; set `false` for literal shot scripts.
`seed`integer (optional)AllNon-negative integer for reproducible lighting and framing tests.
`image`HTTPS URL`image-to-video`Required start keyframe URL (public HTTPS JPEG/PNG/WebP).
`lastImage`HTTPS URLI2V / Video Extend (Wan)Optional target ending keyframe URL for deterministic transitions.
`sourceVideoUrl`HTTPS URL`video-extend` / `video-edit`Required source MP4 URL (public HTTPS).
`referenceImages`string[]R2V / Video EditUp to 10 (Wan 3.0/Pro), 9 (HappyHorse 1.1), or 50 (HappyWan target).
`referenceVideos`string[]R2V (Wan / HappyWan)Up to 5 reference motion/scene clips.
`referenceAudios`string[]R2V / Edit (Wan / HappyWan)Up to 5 reference voice or ambient audio clips.
Sample 200 Response — GET /api/jobs/{id} (Completed)json
{
  "job": {
    "id": "hwj_7c8f1e29a4b01928",
    "engine": "wan-3.0-pro",
    "mode": "image-to-video",
    "modelId": "wan-3.0-pro/image-to-video",
    "resolution": "4k",
    "durationSeconds": 10,
    "creditsCharged": 210,
    "status": "completed",
    "outputUrl": "https://cdn.happywanvideo.ai/outputs/hwj_7c8f1e29a4b01928.mp4",
    "errorMessage": null,
    "createdAt": "2026-12-02T10:14:22.000Z",
    "updatedAt": "2026-12-02T10:16:08.000Z"
  }
}

Job States & Error Semantics

Treat `completed`, `failed`, and `refunded` as terminal states. Whenever an upstream moderation check, validation rejection, queue timeout, or empty output occurs, HappyWan Video refunds 100% of `creditsCharged` automatically and exposes a sanitized human-readable `errorMessage`.

HTTP / StateMeaningCredit Impact
`401 Unauthorized`Missing, malformed, or revoked `hwk_live_*` key0 credits
`402 / Insufficient credits`Balance lower than `duration * creditsPerSecond`0 credits
`400 / Invalid mode`e.g., `video-edit` sent to `wan-3.0-pro` or `happyhorse-1.1`0 credits
`queued` / `processing`Job accepted and rendering upstreamReserved upfront
`completed`MP4 ready at `job.outputUrl`Finalized
`failed` / `refunded`Upstream error, timeout, or content moderation halt100% auto-refunded
Wan 3.0 API & HappyHorse API Reference — Wan AI Docs