Windpaint
Connect

Codex

Install the Windpaint plugin in OpenAI Codex to generate images and video from your coding session.

The Windpaint plugin for Codex adds five skills and connects the hosted MCP server, authenticated with the WINDPAINT_API_KEY environment variable.

Prerequisites

  • The Codex CLI installed.
  • A Windpaint API key from Settings → API Keys in the dashboard. See API keys.

Install the plugin

Export your key

export WINDPAINT_API_KEY=aak_...

Codex reads the key from this variable through bearer_token_env_var and sends it as Authorization: Bearer .... The key never goes into a config file. Add the export to your shell profile.

Add the marketplace and install

codex plugin marketplace add windpaint-ai/skills
codex plugin add windpaint@windpaint

Check the connection

codex mcp get windpaint

The output should show the URL https://mcp.windpaint.ai/mcp and bearer_token_env_var set to WINDPAINT_API_KEY. Then start codex and ask “What’s my Windpaint credit balance?”. Codex calls get_balance and answers.

MCP server only

To add the tools without the skills:

codex mcp add windpaint \
  --url https://mcp.windpaint.ai/mcp \
  --bearer-token-env-var WINDPAINT_API_KEY

Or edit ~/.codex/config.toml directly:

~/.codex/config.toml
[mcp_servers.windpaint]
url = "https://mcp.windpaint.ai/mcp"
bearer_token_env_var = "WINDPAINT_API_KEY"

To pin a project, add a static header:

[mcp_servers.windpaint.http_headers]
"X-Windpaint-Project" = "my-project"

Try it

Add a "Generate cover image" button to the blog editor that calls Windpaint's
image.generate from our backend and stores the asset id on the post.

What happens:

  1. Codex loads the windpaint-api skill, which covers the REST API: auth, the submit-and-poll flow, envelopes, error codes and the rule that the key stays on the server.
  2. It may call list_capabilities to read the live model and aspect ratios instead of hard-coding them.
  3. It writes a backend route that submits POST /v1/generation/capabilities/image.generate, stores the request_id, polls status_url with backoff, and saves outputs[0].id on the post. The browser gets a signed URL from your backend, never the key. See Media in your app for the pattern.

For one-off generation, ask directly: “Generate three 1:1 variations of a ceramic mug product shot with Windpaint, estimate first”. Codex estimates once, multiplies by three, tells you the total, then submits.

Troubleshooting

Next steps