Recipes that run.
Complete walkthroughs against the real endpoints: prerequisites, the code, how to run it, and what to expect. Each one links to the full recipe in the docs.

5 recipes.
Image to video pipeline
Coming soon. Generate stills, pick one, animate it into a 5 s clip, and download it. In Python.
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.
What each one covers.
Each recipe solves one problem you hit when you put generation into a real product.
| Recipe | The problem | Stack | Uses |
|---|---|---|---|
| Image to video pipeline (coming soon) | Pick the still before you pay for the clip. | Python 3.10+, httpx | image.generate, video.generate, estimate |
| Batch product shots | A batch has to survive its own failures. | Python 3.10+, asyncio, httpx | image.generate, estimate, idempotency keys, rate limits |
| Webhook receiver | Stop polling without missing a job. | Python 3.10+, FastAPI, httpx, SQLite | job webhooks, signature verification, assets |
| Media in your app | Your key never reaches the browser. | Next.js 15+ App Router, or Express on Node 18+ | backend proxy, signed URLs, assets |
| Game asset set | Twenty icons that look like one set. | Python 3.10+, httpx, Pillow | image.generate, num_outputs, seeds, idempotency keys |
Four things every recipe assumes.
Read these once. The recipes build on them without repeating them.
Get a key
Every recipe reads an API key from
WINDPAINT_API_KEYand needs some credits in your organization.Expect async
Each recipe submits a job, then polls
status_urlor waits for a webhook. Images usually take seconds; video, once it's live, takes minutes.Read prices from the API
Models and prices come from
GET /. A job's price is fixed when you submit it.v1/ generation/ capabilities Make retries safe
Send an
Idempotency-Keyon any submit you might retry. Without one, a retriedPOSTcreates and bills a second job.
Questions.
Do the recipes run against the real API?
Yes. They call the live endpoints at api.windpaint.ai with your own API key and spend your organization's credits. At current prices, the default product-shot batch costs 0.96 credits ($0.048). The image-to-video pipeline is coming soon; at its planned prices a run will cost 4.24 credits ($0.212).
What languages are they in?
Python for the image-to-video pipeline (coming soon), the batch, the webhook receiver and the game asset set. The media recipe has a Next.js version in TypeScript and an Express version in JavaScript.
How long are generated outputs kept?
For your organization's retention period, 7 days by default and adjustable from 1 to 365 days or forever. Copy anything you need longer to your own storage, and store asset ids rather than signed URLs.