Windpaint
Overview

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.

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 with Prefer: wait.
  • Read models and prices from GET /v1/generation/capabilities rather than hard-coding them. Prices can change; the price of a job is fixed when you submit it.
  • Send an Idempotency-Key on submits you might retry. Without one, a retried POST creates 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.