Repository navigation
wan-api setup: installs componentwan-5b(mlx-gen 0.38.0 under~/.local/opt/wan-api/and the 8-bit
TI2V-5B weights, resumable with a stall watchdog), merges the keys it needs into the config (never deletes),
--lan/--port/--coordinate-with,--service(launchd + health wait),--check(changes nothing)
and--jsonfor the ixa orchestrator. Exit codes 0 / 1 / 2 / 3.- Weights count as present only when the download finished: no
*.incompleteblob, every shard of every
*.index.jsonthere, the snapshotrefs/mainnames (doctor/servetoo). setup fetches a pinned commit
(hf download --revision) and pointsrefs/mainat it. coordinate_with(from klein-api): a job waits,queuedwithwaiting_for, until the listed GPU servers
are idle;timings.coordination_seconds;coordination.waits_forin/v1/capabilities;doctorshows
each server's state. Settingssettle_seconds,coordination_poll_seconds.
0.1.0 (not released separately)
First release.
- HTTP job API (
/healthz,/v1): health (vpipe-api compatible), capabilities, workflow listing with
JSON Schemas, typed submit route, job status with engine-reported progress, queue position, estimate and
timings, output download, cancel. One error envelope for every failure. - Workflow
wan2.2-ti2v-5b: Wan 2.2 TI2V-5B, start image (first-frame conditioning) or text to video;
duration_seconds1–5 s delivered as exact frames at 24 fps (4n+1 rendered, trimmed), exact output size
via lanczos cover + centre crop, H.264 yuv420p, no audio, ffprobe-verified, per-job metadata tag. - Backends behind
WanBackend:mlx(default; mlx-gen 0.38.0, JSONL progress, offline) anddrawthings
(draw-things-cli, text-to-video only — its TI2V-5B image input is img2img, measured; run under a pty so
progress streams). Engines run one process per job, are stopped on cancel/timeout/exception, and a
restarted server stops an engine left behind by a crashed one. - One GPU slot with a bounded waiting queue;
429 busy+Retry-Afterbefore the body is read;
Idempotency-Key; restart recovery; retention pruning with a record cap; free-disk check; a worker that
survives job and storage errors (and a health check that reports it if it ever stops). - Security: loopback-only without a token (foreign Host and proxy headers refused), mandatory ≥ 32-char
bearer token for any other bind, body-size limit (no Transfer-Encoding), connection cap, PNG/JPEG/WebP
decoders only with pre-decode size checks, control characters refused in prompts, private file
permissions, token kept out of child processes and logs. wan-api doctor [--smoke],servestart-up checks, JSON-lines logging; probes and benchmarks in
scripts/; measured results indocs/benchmark.md; engine decision indocs/adr/0001-engine-choice.md.
Install / update
uv tool install git+https://github.com/kabatin/wan-api@v0.1.1 # new install
uv tool install --reinstall git+https://github.com/kabatin/wan-api@v0.1.1 # update an existing installThe config and its token are kept. Restart the server after updating, once /v1/health shows "running": 0:
launchctl kickstart -k gui/$(id -u)/com.github.kabatin.wan-api for the LaunchAgent, or run wan-api setup --service again.
ixa 0.8.3 and later do this for you: pnpm ixa ai install upgrades an older wan-api before checking what is installed.
Changes since 0.1.0: 96b97e4...v0.1.1