L

LeonardoAI

AI API key

Generate images, textures and motion with Leonardo.Ai from any Windmill script, flow or app.

Set up in 3 steps

1

Create an API key

In the Leonardo.Ai app, open API Access under your account, and create a production key.

2

Add the resource in Windmill

Open Resources, add a resource of type leonardoai, and paste the key.

3

Run your first script

Fork any script below and read before writing anything.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

L

Upload init image

Script leonardoai Verified
L

Upload dataset image

Script leonardoai Verified
L

Upload a Single Generated Image to a Dataset

Script leonardoai Verified
L

Upload Canvas Editor init and mask image

Script leonardoai Verified
L

Upload 3D Model

Script leonardoai Verified
L

Train a Custom Model

Script leonardoai Verified
L

Train a Custom Element

Script leonardoai Verified
L

Perform instant refine on a LCM image

Script leonardoai Verified
L

Perform inpainting on a LCM image

Script leonardoai Verified
L

Perform Alchemy Upscale on a LCM image

Script leonardoai Verified
L

List Platform Models

Script leonardoai Verified
L

List Elements

Script leonardoai Verified
L

Improve a Prompt

Script leonardoai Verified
L

Get variation by ID

Script leonardoai Verified
L

Get user information

Script leonardoai Verified
L

Get texture generations by 3D Model ID

Script leonardoai Verified
L

Get single init image

Script leonardoai Verified
L

Get generations by user ID

Script leonardoai Verified
L

Get a list of Custom Models by User ID

Script leonardoai Verified
L

Get a list of Custom Elements by User ID

Script leonardoai Verified
L

Get a Single Generation

Script leonardoai Verified
L

Get a Single Dataset by ID

Script leonardoai Verified
L

Get a Single Custom Model by ID

Script leonardoai Verified
L

Get a Single Custom Element by ID

Script leonardoai Verified
L

Get Texture Generation by ID

Script leonardoai Verified
L

Get 3D models by user ID

Script leonardoai Verified
L

Get 3D Model by ID

Script leonardoai Verified
L

Generate a Random prompt

Script leonardoai Verified
L

Delete init image

Script leonardoai Verified
L

Delete a Single Generation

Script leonardoai Verified

Resource type

leonardoai — the shape of the credential every script on this page expects.

View raw schema →
FieldTypeRequiredWhat it is
apiKeystringYesAPI key generated from the dashboard

Questions

Generation is asynchronous

A generation call returns an id, not an image. Poll the generation until it completes — a flow step that sleeps and re-reads is the usual shape.

Generating costs tokens

Every image draws on your API token balance, which is separate from the web app's credits.

Is my key stored on the hub?

Never. It lives only in your own Windmill workspace, encrypted at rest.