Menu

Mattering Automations Leonardo AI integration

Connect Leonardo AI to Mattering Automations: unified image, video, music, and 3D generation, result polling, init image uploads, and Blueprints as workflow steps, authenticated with a Leonardo API key.

The Mattering Automations Leonardo AI integration adds Leonardo's generation platform to your automation canvas: submit generations to the unified endpoint where one model field selects among roughly 70 image, video, music, sound effect, dialogue, 3D, and upscaler models, list models, poll results, start image-to-image uploads, and run Blueprints, Leonardo's templated multi-step generation pipelines.

Setup takes a few minutes: create an API key in Leonardo under API Access, make sure the account holds API credits, attach the key as a credential in Mattering, and test the connection. This guide walks through each step and ends with the full node reference.

Generation is asynchronous and the integration models it that way. Create nodes return a generation id, not a finished image: Leonardo AI: Get Generation reports a pending status with an empty asset list until the job completes, then returns cdn.leonardo.ai URLs that Leonardo says never expire. On the canvas the pattern is create, a short delay, then poll.

Before you start

  • A Leonardo AI account with API Access enabled and an API key.
  • API credits on the account. The API balance is purchased separately from Leonardo's web app subscription plans; a web plan alone does not fund API generations.
  • A Mattering workspace with access to the Automations app.

Create a Leonardo API key

Mattering authenticates to Leonardo with an API key, sent as a bearer credential on every request. Keys are created in Leonardo's web app under API Access.

In Leonardo, open API Access and create an API key.
Copy the key.
Leonardo's API runs on its own credit balance, purchased separately from web app plans. If the account has a web subscription but no API credits, the key will authenticate and the read nodes will work, while every create node fails on spend. Check the API credit balance before wiring generation into a workflow.

Connect Leonardo AI to Mattering

In Mattering Automations, open Connectors and click Add Connector.
Choose Leonardo AI from the list.
Click Create new credential, paste your API key, and save.
The credential is stored encrypted in Google Secret Manager and never appears in workflow logs.
Click Test Connection: Mattering calls Leonardo's model list, a free read that confirms the key authenticates.
Click Connect. All 11 Leonardo AI nodes appear in your canvas palette.

Verify it works

After connecting, open any automation canvas and check the palette: a Leonardo AI section should list the query and action nodes. Drop Leonardo AI: List Models onto the canvas and run a test step. It takes no parameters and is a free read; a successful response lists the available models with the names the create nodes ask for.

For a first full generation, run Leonardo AI: Create Generation (Async) with a short prompt and a model from the list, note the generation id it returns, then run Leonardo AI: Get Generation with that id. If the poll comes back pending with no assets, that is the async model working as designed: wait a moment and poll again until the status is complete and the image URLs appear. This spends a small number of API credits.

Node reference

11 nodes, generated from the connector itself so this reference always matches what ships.

Read and query nodes 7

Leonardo AI: Get Blueprint

leonardo_get_blueprint

Get one blueprint with its required input schema and settings. Read this before executing: execution validates strictly against the schema.

Leonardo AI: Get Blueprint Execution

leonardo_get_blueprint_execution

Poll a blueprint execution's status until the run completes or fails.

Leonardo AI: Get Generation

leonardo_get_generation

Poll a generation by id. Reports a pending status with an empty asset list until the job completes, then returns the finished cdn.leonardo.ai URLs (Leonardo states API assets do not expire).

Leonardo AI: List Blueprint Execution Generations

leonardo_list_blueprint_execution_generations

List every generation a blueprint execution produced, with their ids for polling.

Leonardo AI: List Blueprint Versions

leonardo_list_blueprint_versions

List a blueprint's versions. Versions can change the input schema, so check here when an execution starts failing validation.

Leonardo AI: List Blueprints

leonardo_list_blueprints

List available blueprints (Leonardo's templated multi-step generation pipelines) with ids and names.

Leonardo AI: List Models

leonardo_list_models

List the models available on the unified v2 generations endpoint (roughly 70 across image, video, music, SFX, dialogue, 3D and upscalers). Free read; the connector's auth probe, and the source of the model names the create nodes ask for.

Action nodes 4

Leonardo AI: Create Classic Generation (Async)

leonardo_create_classic_generation

Create an image generation on the older v1 endpoint addressed by modelId. Async: returns a generation id only; poll with Leonardo AI: Get Generation. Spends API credits.

Leonardo AI: Create Generation (Async)

leonardo_create_generation

Submit a generation to the unified v2 endpoint: one model field selects among roughly 70 image, video, music, SFX, dialogue, 3D and upscaler models. Async: returns a generation id only; poll with Leonardo AI: Get Generation for the finished CDN URLs. Spends API credits.

Leonardo AI: Create Init Image Upload (Presigned)

leonardo_create_init_image

Reserve an init image upload for image-to-image workflows: returns the presigned upload form and the image id generation requests reference. The byte upload itself is a separate plain HTTP POST to the presigned target, and the window is short, so upload promptly.

Leonardo AI: Execute Blueprint (Async)

leonardo_execute_blueprint

Run a blueprint with inputs matching its schema. Async: returns an execution id; poll with Leonardo AI: Get Blueprint Execution and collect results with Leonardo AI: List Blueprint Execution Generations. Spends API credits.

Using the integration

On the automation canvas

Leonardo nodes chain with every other node: a creative brief on a Mattering Productivity task can drive Leonardo AI: Create Generation (Async), a delay plus Leonardo AI: Get Generation loop collects the finished URLs, and the results land back on the task for a person to approve before anything ships. Finished assets are permanent CDN URLs, so review tasks stay valid indefinitely.

From AI assistants over MCP

Every node speaks MCP, the open protocol for connecting AI assistants to tools. Claude, ChatGPT, and Matter can browse models, submit generations, and report finished URLs through the same nodes your workflows use. The reads (models, blueprints, polling) are free; the create and execute nodes spend API credits, so give agents the same budget discipline you would give a scheduled workflow.

The create, wait, poll pattern

Every generation follows the same shape: a create node returns a generation id immediately, a delay node waits, and Leonardo AI: Get Generation polls until the status is complete. Polling while the job runs is normal and free; the honest pending status with an empty asset list is the signal to keep waiting, not an error.

Unified versus classic create

Leonardo AI: Create Generation (Async) is the default: Leonardo's current unified endpoint, one model field across all modalities. Leonardo AI: Create Classic Generation (Async) covers the older image endpoint addressed by modelId, which some established recipes still use. Both return a generation id polled by the same Leonardo AI: Get Generation.

Blueprints as production pipelines

Blueprints are templated multi-step generation pipelines with fixed input schemas and tuned settings. Discover them with Leonardo AI: List Blueprints, read a blueprint's required inputs with Leonardo AI: Get Blueprint and its versions with Leonardo AI: List Blueprint Versions, run one with Leonardo AI: Execute Blueprint (Async), then poll Leonardo AI: Get Blueprint Execution and collect every generation the run produced with Leonardo AI: List Blueprint Execution Generations.

Image-to-image in two halves

Leonardo AI: Create Init Image Upload (Presigned) reserves the upload and returns a presigned form plus the image id that generation requests reference. Posting the actual bytes to the presigned target is a plain HTTP call any system can make, and the presigned window is short, so upload promptly after reserving. The integration ships the URL half and says so rather than pretending to move files it never touches.

Troubleshooting

Test Connection fails with a 401
The key is invalid, was revoked, or picked up stray whitespace when pasted. Create a fresh key in Leonardo under API Access and update the credential on the connector.
Read nodes work but every create node fails
That split is the signature of an empty API credit balance: the key authenticates, so free reads succeed, while generation has nothing to spend. Leonardo's API credits are purchased separately from web app plans, even on accounts with active web subscriptions. Top up the API balance and retry.
Get Generation keeps returning pending with no images
For the first seconds to minutes, that is the async model working: the job is still rendering, and video and 3D jobs legitimately take longer than images. Keep the poll on a delay loop keyed on the status field. If a generation stays pending far beyond its modality's norm, check Leonardo's status page and try a fresh small generation to separate a stuck job from a platform incident.
Create Generation rejects the model
The model field must match a name from Leonardo AI: List Models exactly, and the lineup changes as Leonardo ships and retires models. Re-run the list and update the workflow's model value. Settings that one model accepts can also be invalid for another, so when switching models, re-check the generation settings too.
Execute Blueprint fails on its inputs
Each blueprint defines its own input schema, and execution validates against it strictly. Run Leonardo AI: Get Blueprint for the blueprint and check the required inputs and their types; blueprint versions can change the schema, so Leonardo AI: List Blueprint Versions tells you whether the workflow was built against an older version.
An init image upload succeeded but generations cannot use the image
Two usual causes: the bytes were never actually posted to the presigned target (the reserve step alone creates no image), or the upload happened after the short presigned window expired. Reserve with Leonardo AI: Create Init Image Upload (Presigned), upload immediately, and only then reference the image id in a generation.
A finished generation's URLs are needed later but the workflow has moved on
Store them at generation time: land the CDN URLs in a Mattering database record or on the task that requested the work. Leonardo states API assets do not expire, so a stored URL stays good, and Leonardo AI: Get Generation can always re-fetch by generation id if the id was kept.

Leonardo AI is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.

Start Free Explore our Products