{
 "slug": "leonardo",
 "name": "Leonardo.Ai API",
 "author": "Leonardo.Ai (Canva)",
 "density": "full",
 "status": "active",
 "status_note": null,
 "alternatives_page": null,
 "one_liner": "Leonardo.Ai image generation with a pay-as-you-go API; API credit does not expire.",
 "category": {
  "slug": "ai-images",
  "name": "AI image generators"
 },
 "tags": [
  "Generator"
 ],
 "styles": [],
 "logo_url": null,
 "logo_letter": "L",
 "links": {
  "repo": null,
  "website": "https://leonardo.ai",
  "api_docs": "https://docs.leonardo.ai",
  "open_model": null
 },
 "preview": null,
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Unclear",
   "status": "unknown",
   "sub": null,
   "quote": null,
   "note": "Unverified: a search snippet mentions $5 free API credit for new accounts.",
   "source": {
    "label": "leonardo.ai/api",
    "url": "https://leonardo.ai/api/"
   },
   "n": 1
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": "Leonardo.Ai Terms of Service",
   "quote": "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.",
   "note": "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.",
   "source": {
    "label": "leonardo.ai/terms-of-service",
    "url": "https://leonardo.ai/terms-of-service/"
   },
   "n": 2
  },
  {
   "key": "credit",
   "label": "Credit the author",
   "value": "Not checked yet",
   "status": "unknown",
   "sub": null,
   "quote": null,
   "note": null,
   "source": {
    "label": "leonardo.ai/terms-of-service",
    "url": "https://leonardo.ai/terms-of-service/"
   },
   "n": 3
  },
  {
   "key": "agent_access",
   "label": "Agent access",
   "value": "Public API",
   "status": "info",
   "sub": "API key needed",
   "quote": null,
   "note": "An agent can use it by itself. 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.",
   "source": {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai"
   },
   "n": 4
  }
 ],
 "license": {
  "name": "Leonardo.Ai Terms of Service",
  "url": "https://leonardo.ai/terms-of-service/",
  "summary": "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.",
  "pages_read": 1,
  "rules": [
   "Read the Terms of Service before commercial use; output ownership was not confirmed."
  ],
  "rows": [
   {
    "label": "Commercial use",
    "value": "With conditions",
    "status": "cond",
    "quote": "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.",
    "source": {
     "label": "leonardo.ai/terms-of-service",
     "url": "https://leonardo.ai/terms-of-service/"
    },
    "note": null
   },
   {
    "label": "Credit",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Inside your app or game",
    "value": "Unclear",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Pass the files on to your users",
    "value": "Not checked yet",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Monetized YouTube",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "AI training",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   },
   {
    "label": "Bots and bulk downloads",
    "value": "Not stated",
    "status": "unknown",
    "quote": null,
    "source": null,
    "note": null
   }
  ],
  "checked_at": "2026-10-10",
  "commercial_use_page": "https://agentgid.com/assets/leonardo/commercial-use/"
 },
 "overview": {
  "heading": "Leonardo.Ai: paid image, video and sound generation from code",
  "body": "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."
 },
 "uses": [
  {
   "title": "Pictures made from a prompt in your app",
   "text": "Let users or your own backend create illustrations, product shots or game art from a sentence, and show the results in your app.",
   "idea": false,
   "image": null
  },
  {
   "title": "Cut-out product photos",
   "text": "Remove the background from product or profile photos so they sit cleanly on any page color.",
   "idea": false,
   "image": null
  },
  {
   "title": "Short videos for ads and social posts",
   "text": "Turn a prompt or a start image into a short video clip with models such as Kling, Veo or Seedance.",
   "idea": false,
   "image": null
  },
  {
   "title": "Sound effects and music for a game or video",
   "text": "Make sound effects or a music track from a description, without searching sound libraries.",
   "idea": false,
   "image": null
  },
  {
   "title": "Making images from your AI assistant",
   "text": "Connect Leonardo to Claude Code, Cursor or Codex and ask the assistant to create images or videos for your project.",
   "idea": false,
   "image": null
  },
  {
   "title": "Sharper, larger images",
   "text": "Upscale small or generated images before printing them or using them as large banners.",
   "idea": false,
   "image": null
  }
 ],
 "start": {
  "prompt": "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.",
  "install": null,
  "install_note": null,
  "code": []
 },
 "mistakes": [
  {
   "dont": "Calling the API from browser code with the key in the page",
   "fix": "Call it from your server and read the key from an environment variable there",
   "why": "The docs say the key must stay out of client-side code; anyone could copy it and spend your balance.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Reading generated_images right after creating a generation and treating an empty list as a failure",
   "fix": "Wait and check again until status is COMPLETE or FAILED, or use the webhook",
   "why": "The generation is still PENDING for a few seconds.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Leaving out \"public\" in v2 requests",
   "fix": "Send \"public\": false unless the images may appear in the community feed",
   "why": "The public flag decides whether results show in Leonardo's community feed.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Sending true or false in quotes, or a parameter in the wrong letter case",
   "fix": "Send real booleans and the exact parameter names from the docs",
   "why": "Quoted booleans and wrong case give validation errors.",
   "dont_code": false,
   "fix_code": false
  },
  {
   "dont": "Sending the API key when uploading an image to the presigned upload link",
   "fix": "Upload to the presigned link without authorization headers; a 204 answer means success",
   "why": "Extra auth headers cause 403 errors there.",
   "dont_code": false,
   "fix_code": false
  }
 ],
 "agent": {
  "self_serve": false,
  "self_serve_text": null,
  "install": null,
  "repo": null,
  "api_docs": "https://docs.leonardo.ai",
  "api_account": "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.",
  "formats": [],
  "limits": null,
  "mcp": null,
  "mcp_url": null,
  "credit_line": null,
  "rules_text": "- 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.\n  Connect: API docs https://docs.leonardo.ai (API key needed).\n  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.\n  Rule: Read the Terms of Service before commercial use; output ownership was not confirmed.\n  License: https://leonardo.ai/terms-of-service/ (checked 2026-10-10; details: https://agentgid.com/assets/leonardo/)",
  "agent_md": "https://agentgid.com/assets/leonardo/agent.md",
  "card_json": "https://agentgid.com/assets/leonardo/card.json"
 },
 "popularity": null,
 "alternatives": [
  {
   "slug": "leonardo",
   "name": "Leonardo.Ai API",
   "why": null,
   "current": true,
   "price": "Price not published",
   "commercial": {
    "value": "With conditions",
    "status": "cond"
   },
   "access": "API"
  },
  {
   "slug": "openai-gpt-image",
   "name": "OpenAI GPT Image",
   "why": "Pick OpenAI GPT Image when you want image generation and editing straight from OpenAI's own service.",
   "current": false,
   "price": "Paid",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "API, npm, PyPI"
  },
  {
   "slug": "flux-1-dev",
   "name": "FLUX.1 [dev]",
   "why": "Pick FLUX.1 [dev] when you want open model weights to run yourself; commercial use needs a paid license from Black Forest Labs.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Non-commercial",
    "status": "no"
   },
   "access": "Download"
  },
  {
   "slug": "invokeai",
   "name": "InvokeAI",
   "why": "Pick InvokeAI for a free, open source image app you run on your own computer, with no per-image charges.",
   "current": false,
   "price": "Free",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "Download"
  },
  {
   "slug": "scenario",
   "name": "Scenario",
   "why": "Cloud platform that generates images, video, 3D and audio game assets, with custom model training, an API and an MCP server.",
   "current": false,
   "price": "Free tier",
   "commercial": {
    "value": "Commercial OK",
    "status": "yes"
   },
   "access": "MCP, API"
  },
  {
   "slug": "generated-photos",
   "name": "Generated Photos",
   "why": "AI-generated faces and full-body human photos, available through a gallery, generators, bulk download and an API.",
   "current": false,
   "price": "Free tier",
   "commercial": {
    "value": "With conditions",
    "status": "cond"
   },
   "access": "API"
  }
 ],
 "faq": [
  {
   "q": "Is there a free tier for the API?",
   "a": "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."
  },
  {
   "q": "Do generated images expire?",
   "a": "No. Images made through the API do not expire and can also be opened in the web app."
  },
  {
   "q": "How do I know what a request cost?",
   "a": "Generation answers include a cost object with the amount charged and its unit; the web app also has a pricing calculator."
  },
  {
   "q": "Are there official code libraries?",
   "a": "Yes, for Python and TypeScript."
  },
  {
   "q": "Can my AI coding assistant use it directly?",
   "a": "Yes, through the official Leonardo server for AI assistants, after you sign in with your Leonardo account in the browser."
  }
 ],
 "at_a_glance": {
  "latest_version": "4.21.3 (npm) / 7.0.0 (PyPI), latest on 2026-11-19",
  "runtime": "Python 3.10+ for the Python SDK",
  "key_needed": true
 },
 "good_to_know": [
  "You need a Leonardo account and prepaid dollar balance; the balance does not expire, and requests pause when it reaches zero.",
  "Automatic top-ups charge your saved payment method when the balance drops below the level you set.",
  "Results are not instant; you wait and check again, or receive a call to your own web address when the job is done.",
  "Adult content is blocked at the prompt, and images flagged as such are marked in the answer so you can hide them.",
  "One account may have at most 10 keys."
 ],
 "stack_snippets": [],
 "claims": [],
 "checked": {
  "license_read": "2026-10-10",
  "overview_checked": "2026-11-19",
  "numbers_updated": null,
  "sources": [
   {
    "label": "leonardo.ai",
    "url": "https://leonardo.ai"
   },
   {
    "label": "leonardo.ai/api",
    "url": "https://leonardo.ai/api/"
   },
   {
    "label": "leonardo.ai/pricing",
    "url": "https://leonardo.ai/pricing"
   },
   {
    "label": "leonardo.ai/terms-of-service",
    "url": "https://leonardo.ai/terms-of-service/"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai"
   },
   {
    "label": "docs.leonardo.ai/llms.txt",
    "url": "https://docs.leonardo.ai/llms.txt"
   },
   {
    "label": "docs.leonardo.ai/docs/getting-started.md",
    "url": "https://docs.leonardo.ai/docs/getting-started.md"
   },
   {
    "label": "docs.leonardo.ai/docs/payg-guide.md",
    "url": "https://docs.leonardo.ai/docs/payg-guide.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/pricing-and-plans-faq.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/plan-with-the-pricing-calculator.md"
   },
   {
    "label": "docs.leonardo.ai/docs/api-faq.md",
    "url": "https://docs.leonardo.ai/docs/api-faq.md"
   },
   {
    "label": "docs.leonardo.ai/docs/api-error-messages.md",
    "url": "https://docs.leonardo.ai/docs/api-error-messages.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/leonardoai-official-sdks.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/connect-to-leonardoai-mcp.md"
   },
   {
    "label": "docs.leonardo.ai/docs/remove-bg.md",
    "url": "https://docs.leonardo.ai/docs/remove-bg.md"
   },
   {
    "label": "docs.leonardo.ai/docs/lucid-origin.md",
    "url": "https://docs.leonardo.ai/docs/lucid-origin.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/guide-to-the-webhook-callback-feature.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/docs/guide-to-handling-not-safe-for-work-image-generation-nsfw.md"
   },
   {
    "label": "docs.leonardo.ai",
    "url": "https://docs.leonardo.ai/reference/creategeneration.md"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/Leonardo-Interactive/leonardo-ts-sdk/blob/HEAD/README.md"
   },
   {
    "label": "README on GitHub",
    "url": "https://github.com/Leonardo-Interactive/leonardo-python-sdk/blob/HEAD/README.md"
   },
   {
    "label": "npm: @leonardo-ai/sdk",
    "url": "https://registry.npmjs.org/@leonardo-ai/sdk"
   },
   {
    "label": "pypi.org/pypi/leonardo-ai-sdk/json",
    "url": "https://pypi.org/pypi/leonardo-ai-sdk/json"
   }
  ],
  "unverified": "The ToS page was not readable (403 / heading only); ownership and free credit come only from search snippets."
 },
 "user_reports": null,
 "url": "https://agentgid.com/assets/leonardo/",
 "note": "Written by AgentGid from the official pages in checked.sources; quotes are copied from those pages. status: yes | cond | no | unknown | info. Prices and vendor claims are as reported on the checked date. Not legal advice."
}
