Cookbook
Complete, runnable recipes for building on the Windpaint API.
Each recipe is a full walkthrough, not a snippet: prerequisites, complete code against the real endpoints, how to run it, and what to expect. They all assume an API key exported as WINDPAINT_API_KEY (see API keys) and some credits in your organization.
Image to video pipeline
Generate stills, pick one, animate it into a 5 s clip, and download it. In Python and the CLI.
Batch product shots
Many variations across seeds and aspect ratios, run concurrently, with a cost check up front and safe failure handling.
Webhook receiver
A FastAPI endpoint that verifies signed job and workflow run webhooks and saves the outputs once.
Media in your app
Serve generated images and video to your users without exposing your key. Next.js and Express.
Game asset set
A matching set of item icons from one style prompt, cut out and packed into a sprite atlas for Phaser, PixiJS or your engine.
Before you start
- Generation is async. Every recipe submits a job, then polls its
status_url(or waits for a webhook). Images take seconds; video takes minutes. For images you can also ask the submit to wait for the result withPrefer: wait. - Read models and prices from
GET /v1/generation/capabilitiesrather than hard-coding them. Prices can change; the price of a job is fixed when you submit it. - Send an
Idempotency-Keyon submits you might retry. Without one, a retriedPOSTcreates and bills a second job. The batch recipe shows how. - Outputs are kept for your organization’s retention period, 7 days by default. Copy anything you need longer to your own storage.