Leonardo.Ai
AIGenerate images and motion videos with Leonardo.Ai directly from your flows. Agents run text-to-image and image-to-video generations, upscale and remove backgrounds, train custom models and Elements from datasets, and save every result to durable FlowRunner file storage.
What This Integration Enables
Leonardo.Ai earns a place in a production pipeline for one reason above the raw generation quality: custom models and Elements trained on your own assets, so output is on-brand by construction rather than by prompt luck. This integration gives FlowRunner agents the full production surface. They generate images with fine-tuned or platform models, animate stills with Image to Motion (SVD), produce video with Image to Video and Text to Video across Motion 2.0, Veo 3, and Kling, and refine results with the upscalers, Unzoom Image, and Remove Background. They also run the training side: building datasets, training custom models and Elements, and monitoring the token balances that pay for it all. Because Leonardo's result URLs are ephemeral, the connector downloads every finished asset into FlowRunner file storage and returns durable URLs. Generation is cheap to retry; the brand model and the budget are not. Agents run the volume work, and the calls that shape what the brand looks like stay [human-in-the-loop](/concepts/human-in-the-loop/).
Without FlowRunner
With FlowRunner
Use Case Scenarios
Briefs to finished assets
A scene brief arrives as a new record in [Airtable](/integrations/airtable). The agent prices the run with Calculate API Cost, generates candidates with Generate Image against the brand's custom model, and upscales the strongest frame with Upscale Image. Finished files flow to [Cloudinary](/integrations/cloudinary) for the media library, and the creative lead picks the winner from the candidates posted in the team channel. The design queue stops being the bottleneck between a brief and a usable asset.
Product stills that move
A still product shot becomes motion without a video team. The agent uploads the source with Upload Init Image, runs Image to Motion (SVD) for a short looping clip or Image to Video with Motion 2.0, Veo 3, or Kling for directed movement, and publishes the result as a Reel through [Instagram Business](/integrations/instagram-business). Text to Video covers the cases where there is no source image at all, only a concept.
Training the brand model, deliberately
The team curates training images into a dataset with Create Dataset, Upload Dataset Image, and Add Generated Image to Dataset, folding in the best prior generations. When the dataset is ready, the agent assembles a review pack: the image grid, the proposed instance prompt, and the training-token balance from Get User Info. Only after the creative director approves does Train Custom Model run. The same pattern governs Train Custom Element for LoRA training. The models that define the brand's look are built on purpose, not by accumulation.
Human-in-Loop Highlight
Train Custom Model spends finite model-training tokens, and a badly curated dataset produces a model that mints off-brand assets in every workflow that touches it afterward. That double cost makes it the gate that matters on this connector. Before training runs, the agent posts the full picture to the creative director: "Dataset 'FW26 packshots' holds 38 images, sample grid attached. Training will draw from the model-training token balance shown in Get User Info. Approve training with instance prompt 'fw26pack', revise the dataset, or hold." A no costs nothing. A yes is recorded with a name on it. Delete Custom Model and Delete Dataset carry the same rule, because both are permanent and both can erase weeks of curation in one call.
Agent Capabilities
35 actionsImage Generation
5- Generate Image Generates images from a text prompt and waits for completion, with support for fine-tuned models, Alchemy, PhotoReal, Prompt Magic, preset styles, ControlNets, Elements, image-to-image, tiling, transparency, and seed control. Results are saved to FlowRunner file storage with durable URLs.
- Create Image Generation Submits the same generation job asynchronously and returns immediately with the generation ID and cost, for non-blocking flows that poll with Get Generation.
- Get Generation Retrieves an image or video generation by ID with status, outputs, and the parameters used.
- Delete Generation Permanently deletes a generation and its images. Cannot be undone. Used to clear rejected candidates after review.
- Get User Generations Pages through all generations created by a user, for auditing and history.
Video Generation
4- Image to Motion (SVD) Animates a still image into a short looping motion clip with Stable Video Diffusion, saved to durable storage.
- Image to Video Generates a video from a source image and prompt using Motion 2.0, Veo 3, or Kling, with resolution, duration, frame interpolation, and style controls.
- Text to Video Generates a video from a prompt alone using the same model families.
- Get Motion Variation Retrieves a motion variation job with its status and result.
Image Variations
5- Upscale Image Creates a Creative Upscale of a generated image for higher resolution and detail.
- Universal Upscaler High-control upscaling with creativity strength, multiplier, guiding prompt, and style options.
- Unzoom Image Outpaints a scene beyond its original borders.
- Remove Background Produces a cut-out subject with the background removed.
- Get Variation Retrieves a variation job by ID with its transform type and result.
Init Images
4- Upload Init Image Uploads an image for image-to-image, ControlNets, or motion, returning the init image ID.
- Get Init Image Retrieves an uploaded init image's details.
- Delete Init Image Permanently deletes an uploaded init image.
- Upload Canvas Init and Mask Image Returns presigned upload details for an init and mask pair used by the Canvas inpaint and outpaint flow.
Datasets and Training
13- Create Dataset Creates a dataset to hold training images for model or Element training.
- Get Dataset Retrieves a dataset with its image list, the review surface before training.
- Delete Dataset Permanently deletes a dataset. Cannot be undone. Routed through human approval in FlowRunner workflows.
- Upload Dataset Image Uploads a training image into a dataset.
- Add Generated Image to Dataset Folds a previously generated image into a dataset without re-uploading.
- Train Custom Model Starts training a fine-tuned model from a dataset with an instance prompt and base version. Spends model-training tokens; routed through human approval.
- Get Custom Model Retrieves a custom model's configuration and training status.
- Delete Custom Model Permanently deletes a custom model. Cannot be undone. Routed through human approval.
- Get User Custom Models Lists the custom models belonging to a user.
- Train Custom Element Starts training a custom Element (LoRA) from a dataset with learning rate and epoch controls. Routed through human approval.
- Get Custom Element Retrieves a custom Element's parameters and training status.
- Delete Custom Element Permanently deletes a custom Element. Cannot be undone.
- Get User Custom Elements Lists the custom Elements belonging to a user.
Models and Elements
2- List Platform Models Lists the public platform models with IDs and previews, for choosing a generation model.
- List Elements Lists the public Elements with their IDs and weight ranges, for styling generations.
Account and Cost
2- Get User Info Returns account details and current balances of subscription, GPT, model-training, and API tokens. The budget check in every training and generation gate.
- Calculate API Cost Estimates the credit cost of an operation before running it. Priced before spent, every time.
Frequently Asked Questions
What can FlowRunner do with Leonardo.Ai?
FlowRunner agents can run Generate Image, Create Image Generation, and Get Generation in Leonardo.Ai, plus 32 more actions.
Does connecting Leonardo.Ai to FlowRunner require OAuth?
No. Leonardo.Ai connects to FlowRunner with an API key, no OAuth flow required.
Can Leonardo.Ai trigger a FlowRunner workflow automatically?
Leonardo.Ai doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.
Start building with Leonardo.Ai
$100 in credits. No card required. Connect in minutes.