Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Leonardo.Ai API

by Leonardo.Ai (Canva)

Leonardo.Ai image generation with a pay-as-you-go API; API credit does not expire.

AI image generators Generator

WebsiteAPI docs

2. Commercial use: leonardo.ai/terms-of-service

“If you are on one of our paid Subscriptions (Paid Subscriber), as between the Parties, subject to your compliance with these Terms and to the extent permitted by law, ownership of all Intellectual Property Rights in any Content you, or your Authorised Users, create while using the Platform will vest in you upon creation.”

Paid subscribers own the content they create, subject to the terms; we could not read the terms page ourselves, so check it before commercial use.

leonardo.ai/terms-of-service

License checked Oct 10, 2026 against 1 official page. Tap a verdict to see its source. How we checked Report an error

Leonardo.Ai: paid image, video and sound generation from code

Leonardo.Ai is a paid service that makes images, videos, sound and 3D models from a text description. Your app sends a request with a secret key and gets the finished files back. Besides its own models it offers outside ones such as FLUX and Veo, all paid from one dollar balance.

Where you can use it

Pictures made from a prompt in your app

Let users or your own backend create illustrations, product shots or game art from a sentence, and show the results in your app.

Cut-out product photos

Remove the background from product or profile photos so they sit cleanly on any page color.

Short videos for ads and social posts

Turn a prompt or a start image into a short video clip with models such as Kling, Veo or Seedance.

Sound effects and music for a game or video

Make sound effects or a music track from a description, without searching sound libraries.

Making images from your AI assistant

Connect Leonardo to Claude Code, Cursor or Codex and ask the assistant to create images or videos for your project.

Sharper, larger images

Upscale small or generated images before printing them or using them as large banners.

How to start

Tell your AI assistant

“Read LEONARDO_API_KEY from .env on the server only, create a Lucid Origin generation with public set to false, wait for the webhook or poll until status is COMPLETE, then save the image URLs; never send the key to the browser.”

Mistakes to avoid

Calling the API from browser code with the key in the page
Call it from your server and read the key from an environment variable there

The docs say the key must stay out of client-side code; anyone could copy it and spend your balance.

Reading generated_images right after creating a generation and treating an empty list as a failure
Wait and check again until status is COMPLETE or FAILED, or use the webhook

The generation is still PENDING for a few seconds.

Leaving out "public" in v2 requests
Send "public": false unless the images may appear in the community feed

The public flag decides whether results show in Leonardo's community feed.

Sending true or false in quotes, or a parameter in the wrong letter case
Send real booleans and the exact parameter names from the docs

Quoted booleans and wrong case give validation errors.

Sending the API key when uploading an image to the presigned upload link
Upload to the presigned link without authorization headers; a 204 answer means success

Extra auth headers cause 403 errors there.

License

Leonardo.Ai Terms of Service license. A paid service. Its terms page could not be read by us; the terms say paid subscribers own what they create, so check the terms before commercial use. Prompts are blocked when they break the content rules.

Commercial use
With conditions

“If you are on one of our paid Subscriptions (Paid Subscriber), as between the Parties, subject to your compliance with these Terms and to the extent permitted by law, ownership of all Intellectual Property Rights in any Content you, or your Authorised Users, create while using the Platform will vest in you upon creation.” leonardo.ai/terms-of-service

Credit
Not stated
Inside your app or game
Unclear
Pass the files on to your users
Not checked yet
Monetized YouTube
Not stated
AI training
Not stated
Bots and bulk downloads
Not stated

AllowedWith conditionsNot allowedNot stated or not checked yet

Is Leonardo.Ai API free for commercial use? The full answer Not legal advice. Check the license page before you ship.

For your agent

License rules tell your agent what it may do with Leonardo.Ai API. Paste them into your prompt or AGENTS.md.

License rules
- Leonardo.Ai API (AI image generators). Leonardo.Ai image generation with a pay-as-you-go API; API credit does not expire. Price: see pricing; commercial use with conditions; shipping inside an app unclear.
  Connect: API docs https://docs.leonardo.ai (API key needed).
  Get files: POST https://cloud.leonardo.ai/api/rest/v1/generations with header authorization: Bearer <API key> and a JSON body (prompt, modelId, width, height, num_images); the response gives a generationId used to fetch the images; a webhook callback can be set when creating the key.
  Rule: Read the Terms of Service before commercial use; output ownership was not confirmed.
  License: https://leonardo.ai/terms-of-service/ (checked 2026-10-10; details: https://agentgid.com/assets/leonardo/)
Can an agent use it by itself?
No.
How an agent gets files
POST https://cloud.leonardo.ai/api/rest/v1/generations with header authorization: Bearer <API key> and a JSON body (prompt, modelId, width, height, num_images); the response gives a generationId used to fetch the images; a webhook callback can be set when creating the key.
API, key or account
API key needed. API docs
MCP server
None found
This card for machines

Alternatives

Leonardo.Ai API This page

Price not published With conditions API

OpenAI GPT Image

Pick OpenAI GPT Image when you want image generation and editing straight from OpenAI's own service.

Paid Commercial OK API, npm, PyPI

FLUX.1 [dev]

Pick FLUX.1 [dev] when you want open model weights to run yourself; commercial use needs a paid license from Black Forest Labs.

Free Non-commercial Download

InvokeAI

Pick InvokeAI for a free, open source image app you run on your own computer, with no per-image charges.

Free Commercial OK Download

Scenario

Cloud platform that generates images, video, 3D and audio game assets, with custom model training, an API and an MCP server.

Free tier Commercial OK MCP, API

Generated Photos

AI-generated faces and full-body human photos, available through a gallery, generators, bulk download and an API.

Free tier With conditions API

All ai image generators

Questions

Is there a free tier for the API?

The docs describe prepaid credit only; API access is separate from free or web app plans. We found no free API allowance on the pages we could read.

Do generated images expire?

No. Images made through the API do not expire and can also be opened in the web app.

How do I know what a request cost?

Generation answers include a cost object with the amount charged and its unit; the web app also has a pricing calculator.

Are there official code libraries?

Yes, for Python and TypeScript.

Can my AI coding assistant use it directly?

Yes, through the official Leonardo server for AI assistants, after you sign in with your Leonardo account in the browser.