Leonardo.AI Blueprints API

Execute Leonardo Blueprints — pre-packaged multi-step image and video workflows authored in the Leonardo App — and retrieve their executions, generations, and version history. List the blueprint catalog for the authenticated user.

OpenAPI Specification

leonardo-ai-blueprints-openapi.json Raw ↑
{
  "openapi": "3.0.0",
  "info": {
    "title": "Leonardo.AI Blueprints API",
    "description": "Execute Leonardo Blueprints \u2014 pre-packaged multi-step image/video workflows \u2014 and retrieve their executions and generations. List blueprint catalog and versions.",
    "version": "v1.0.0",
    "contact": {
      "name": "Leonardo.AI Support",
      "url": "https://docs.leonardo.ai/docs/need-more-support"
    },
    "license": {
      "name": "Leonardo.AI Terms of Service",
      "url": "https://leonardo.ai/terms-of-service/"
    }
  },
  "servers": [
    {
      "url": "https://cloud.leonardo.ai/api/rest/v1",
      "description": "Leonardo.AI Production API"
    }
  ],
  "tags": [
    {
      "name": "Blueprints"
    }
  ],
  "paths": {
    "/blueprints": {
      "get": {
        "tags": [
          "Blueprints"
        ],
        "summary": "List Blueprints",
        "description": "Returns a list of Blueprints. Use either forward pagination (first/after) or backward pagination (last/before), but not both. Note: This endpoint uses a request body to support complex filtering parameters",
        "operationId": "listBlueprints",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 10,
                    "description": "Number of items to return after the cursor (forward pagination)"
                  },
                  "after": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Cursor"
                      }
                    ],
                    "description": "Cursor to paginate forward from"
                  },
                  "last": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Number of items to return before the cursor (backward pagination)"
                  },
                  "before": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Cursor"
                      }
                    ],
                    "description": "Cursor to paginate backward from"
                  },
                  "platforms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "Android",
                        "iOS",
                        "Web",
                        "API"
                      ]
                    },
                    "default": [
                      "API"
                    ],
                    "description": "Filter Blueprints by platforms that they can be executed on",
                    "example": [
                      "API",
                      "Web"
                    ]
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Filter Blueprints by category",
                    "example": [
                      "social-media"
                    ]
                  }
                }
              },
              "example": {
                "first": 10,
                "after": "eyJjcmVhdGVkQXQiOiIyMDI1LTEwLTI5VDIxOjMxOjQ3Ljk5OVoiLCJha1VVSUQiOiJjODQ2NDEzZS05MmJhLTQzMDItODRmOC00N2M2NjdkNDc2MWYifQ==",
                "platforms": [
                  "iOS",
                  "Android"
                ],
                "categories": [
                  "social-media"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "blueprints": {
                          "type": "object",
                          "properties": {
                            "edges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "cursor": {
                                    "$ref": "#/components/schemas/Cursor"
                                  },
                                  "node": {
                                    "$ref": "#/components/schemas/Blueprint"
                                  }
                                }
                              }
                            },
                            "totalCount": {
                              "$ref": "#/components/schemas/totalCount"
                            },
                            "pageInfo": {
                              "$ref": "#/components/schemas/pageInfo"
                            }
                          }
                        }
                      },
                      "required": [
                        "blueprints"
                      ],
                      "description": "Successful response with Blueprint data"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiError"
                      },
                      "description": "Error response array"
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "blueprints": {
                        "edges": [
                          {
                            "cursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTA3VDAzOjA4OjMwLjk3MVoiLCJha1VVSUQiOiJiM2VjN2VjZi1mYzYzLTRlZmMtODc0NS1mZGNmZDA1OWYwM2EifQ==",
                            "node": {
                              "akUUID": "b3ec7ecf-fc63-4efc-8745-fdcfd059f03a",
                              "createdAt": "2026-01-07T03:08:30.971Z",
                              "updatedAt": "2026-01-13T01:01:43.989Z",
                              "name": "Detailed Recipe with Tags",
                              "description": "Create an editorial photo of the dish with its ingredients around it and their names printed as physical labels.",
                              "thumbnails": [
                                {
                                  "name": "thumbnailUrl",
                                  "url": "https://cdn.dev.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/thumbnail-7357ab.webp"
                                },
                                {
                                  "name": "thumbnailUrlBanner",
                                  "url": "https://cdn.dev.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/thumbnail-1e754b.webp"
                                },
                                {
                                  "name": "thumbnailUrlLandscape",
                                  "url": "https://cdn.dev.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/thumbnail-d53597.webp"
                                },
                                {
                                  "name": "thumbnailUrlExtremePortrait",
                                  "url": "https://cdn.dev.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/thumbnail-1d8a28.webp"
                                }
                              ],
                              "teamId": null,
                              "official": true
                            }
                          }
                        ],
                        "totalCount": 1,
                        "pageInfo": {
                          "hasNextPage": false,
                          "hasPreviousPage": false,
                          "startCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTA3VDAzOjA4OjMwLjk3MVoiLCJha1VVSUQiOiJiM2VjN2VjZi1mYzYzLTRlZmMtODc0NS1mZGNmZDA1OWYwM2EifQ==",
                          "endCursor": "eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTA3VDAzOjA4OjMwLjk3MVoiLCJha1VVSUQiOiJiM2VjN2VjZi1mYzYzLTRlZmMtODc0NS1mZGNmZDA1OWYwM2EifQ=="
                        }
                      }
                    }
                  },
                  "error": {
                    "summary": "Error response",
                    "value": [
                      {
                        "extensions": {
                          "code": "BadRequestException",
                          "details": {
                            "message": "Bad request. Please check your input.",
                            "statusCode": 400
                          }
                        },
                        "locations": [
                          {
                            "column": 97,
                            "line": 1
                          }
                        ],
                        "message": "An error occurred.",
                        "path": [
                          "blueprints"
                        ]
                      }
                    ]
                  }
                }
              }
            },
            "description": "Responses for GET /api/rest/v1/blueprints"
          }
        }
      }
    },
    "/blueprints/{id}": {
      "get": {
        "tags": [
          "Blueprints"
        ],
        "summary": "Get Blueprint by ID",
        "description": "Returns a single Blueprint by its akUUID",
        "operationId": "getBlueprintById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The akUUID of the Blueprint to return",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Blueprint",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "title": "Success Response",
                      "properties": {
                        "blueprint": {
                          "$ref": "#/components/schemas/Blueprint"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "title": "Error Response",
                      "description": "Error response (validation, not found, etc.)",
                      "items": {
                        "$ref": "#/components/schemas/ApiError"
                      }
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "blueprint": {
                        "akUUID": "c846413e-92ba-4302-84f8-47c667d4761f",
                        "name": "Golden Hour Relight",
                        "description": "Relight an image with warm, golden tones of late afternoon sunlight for a soft and radiant glow.",
                        "thumbnails": [
                          {
                            "name": "thumbnailUrl",
                            "url": "https://cdn.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/goldenhour.jpg"
                          }
                        ],
                        "teamId": null,
                        "official": true,
                        "createdAt": "2025-10-29T21:31:47.999Z",
                        "updatedAt": "2025-12-19T02:34:44.740Z"
                      }
                    }
                  },
                  "badRequest": {
                    "summary": "Bad request error",
                    "value": [
                      {
                        "message": "An error occurred.",
                        "path": [
                          "blueprint"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "BadRequestException",
                          "details": {
                            "message": "Bad request. Please check your input.",
                            "statusCode": 400
                          }
                        }
                      }
                    ]
                  },
                  "notFound": {
                    "summary": "Not found error",
                    "value": [
                      {
                        "message": "Blueprint not found",
                        "path": [
                          "blueprint"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "NOT_FOUND",
                          "errorCode": 0,
                          "statusCode": 404
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/blueprints/{id}/versions": {
      "get": {
        "tags": [
          "Blueprints"
        ],
        "summary": "Get Blueprint Versions by Blueprint ID",
        "description": "Returns all versions of a Blueprint by its akUUID",
        "operationId": "getBlueprintVersionsByBlueprintId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The akUUID of the Blueprint",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Blueprint Versions",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "title": "Success Response",
                      "properties": {
                        "blueprintVersions": {
                          "$ref": "#/components/schemas/BlueprintVersion"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "title": "Error Response",
                      "description": "Error response (validation, not found, etc.)",
                      "items": {
                        "$ref": "#/components/schemas/ApiError"
                      }
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "blueprintVersions": {
                        "edges": [
                          {
                            "cursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ==",
                            "node": {
                              "akUUID": "956e9564-19f7-4968-b56d-05c2c567726f",
                              "createdAt": "2025-11-27T05:13:21.896Z",
                              "updatedAt": "2025-11-27T05:13:21.896Z",
                              "cost": 160,
                              "uiMetadata": {
                                "inputs": [
                                  {
                                    "type": "image",
                                    "label": "Upload a Photo of Yourself",
                                    "nodeId": "4a5d62d9-5d73-4a2f-92ee-3a67d37b2b58",
                                    "required": true,
                                    "placeholder": "Upload a selfie or photo of a person, preferrably from the chest up. Works better with clear front facing photos",
                                    "settingName": "imageUrl"
                                  }
                                ],
                                "outputs": [
                                  {
                                    "type": "image"
                                  },
                                  {
                                    "type": "image"
                                  },
                                  {
                                    "type": "image"
                                  },
                                  {
                                    "type": "image"
                                  }
                                ]
                              },
                              "uiMetadataSchemaVersion": "21",
                              "models": [
                                "gemini-2.5-flash-image"
                              ],
                              "executability": {
                                "isExecutable": true,
                                "reasons": [
                                  {
                                    "models": "gemini-2.5-flash-image"
                                  }
                                ]
                              }
                            }
                          }
                        ],
                        "totalCount": 1,
                        "pageInfo": {
                          "hasNextPage": false,
                          "hasPreviousPage": false,
                          "startCursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ==",
                          "endCursor": "eyJjcmVhdGVkQXQiOiIyMDI1LTEwLTMwVDA0OjU5OjAyLjEwOVoiLCJha1VVSUQiOiI4NzNlN2FlZS0wZTIzLTQ2NTEtYTllMi0zZTkwZGY3ZGYyNTkifQ=="
                        }
                      }
                    }
                  },
                  "badRequest": {
                    "summary": "Bad request error",
                    "value": [
                      {
                        "message": "An error occurred.",
                        "path": [
                          "blueprintVersions"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "BadRequestException",
                          "details": {
                            "message": "Bad request. Please check your input.",
                            "statusCode": 400
                          }
                        }
                      }
                    ]
                  },
                  "notFound": {
                    "summary": "Not found error",
                    "value": [
                      {
                        "message": "Blueprint not found",
                        "path": [
                          "blueprintVersions"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "NOT_FOUND",
                          "errorCode": 0,
                          "statusCode": 404
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/blueprint-executions": {
      "post": {
        "tags": [
          "Blueprints"
        ],
        "summary": "Execute a Blueprint",
        "description": "Execute a Blueprint Version with custom node inputs. This endpoint triggers the execution of the specified Blueprint Version and returns a Blueprint Execution ID to track the job.",
        "operationId": "executeBlueprint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "blueprintVersionId",
                  "input"
                ],
                "properties": {
                  "blueprintVersionId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The unique identifier of the Blueprint Version to execute",
                    "example": "550e8400-e29b-41d4-a716-446655440000"
                  },
                  "input": {
                    "type": "object",
                    "required": [
                      "nodeInputs",
                      "public"
                    ],
                    "properties": {
                      "nodeInputs": {
                        "type": "array",
                        "description": "Array of node input objects to customize the Blueprint",
                        "items": {
                          "$ref": "#/components/schemas/NodeInput"
                        }
                      },
                      "public": {
                        "type": "boolean",
                        "description": "Whether the resulting generations should be public",
                        "example": false
                      },
                      "collectionIds": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/bigint"
                        },
                        "description": "Optional list of collection IDs to add the generations to",
                        "example": []
                      }
                    }
                  }
                }
              },
              "example": {
                "blueprintVersionId": "550e8400-e29b-41d4-a716-446655440000",
                "input": {
                  "nodeInputs": [
                    {
                      "nodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "settingName": "text",
                      "value": "A futuristic cityscape at sunset"
                    },
                    {
                      "nodeId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                      "settingName": "textVariables",
                      "value": [
                        {
                          "name": "characterName",
                          "value": "Luna"
                        },
                        {
                          "name": "outfit",
                          "value": "cyberpunk armor"
                        }
                      ]
                    },
                    {
                      "nodeId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                      "settingName": "imageUrl",
                      "value": "https://cdn.leonardo.ai/users/example/image.png"
                    }
                  ],
                  "public": false,
                  "collectionIds": []
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "title": "Success Response",
                      "required": [
                        "executeBlueprint"
                      ],
                      "properties": {
                        "executeBlueprint": {
                          "type": "object",
                          "required": [
                            "akUUID"
                          ],
                          "properties": {
                            "akUUID": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The unique identifier of the Blueprint Execution",
                              "example": "550e8400-e29b-41d4-a716-446655440000"
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "array",
                      "title": "Error Response",
                      "description": "Error response when validation fails",
                      "items": {
                        "$ref": "#/components/schemas/ApiError"
                      }
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "executeBlueprint": {
                        "akUUID": "550e8400-e29b-41d4-a716-446655440000"
                      }
                    }
                  },
                  "error": {
                    "summary": "Error response",
                    "value": [
                      {
                        "message": "An error occurred.",
                        "path": [
                          "executeBlueprint"
                        ],
                        "locations": [
                          {
                            "column": 70,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "BadRequestException",
                          "details": {
                            "message": "Bad request. Please check your input.",
                            "statusCode": 400
                          }
                        }
                      }
                    ]
                  }
                }
              }
            },
            "description": "Responses for POST /blueprint-executions"
          },
          "400": {
            "description": "Bad Request - Invalid input type or missing required GraphQL field",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing the invalid input type or missing field",
                      "example": "Invalid input type: expected 'string' for field 'blueprintVersionId'"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/blueprint-executions/{id}": {
      "get": {
        "tags": [
          "Blueprints"
        ],
        "summary": "Get Blueprint Execution by ID",
        "description": "Retrieves details of a specific Blueprint Execution by its akUUID",
        "operationId": "getBlueprintExecution",
        "parameters": [
          {
            "required": true,
            "in": "path",
            "name": "id",
            "description": "The akUUID of the Blueprint Execution to retrieve",
            "schema": {
              "$ref": "#/components/schemas/uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved Blueprint Execution",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "title": "Success Response",
                      "properties": {
                        "blueprintExecution": {
                          "$ref": "#/components/schemas/BlueprintExecution"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "title": "Error Response",
                      "description": "Error response (Validation, Not Found)",
                      "items": {
                        "$ref": "#/components/schemas/ApiError"
                      }
                    }
                  ]
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "blueprintExecution": {
                        "akUUID": "cdcc440a-e480-4411-83cb-437d20267a53",
                        "status": "COMPLETED",
                        "inputs": [
                          {
                            "value": "https://cdn.leonardo.ai/users/example/image.png",
                            "nodeId": "9ac3b1e2-4d7f-4f10-8b2f-9e5a1c2d3e4f",
                            "settingName": "imageUrl"
                          },
                          {
                            "value": [
                              {
                                "name": "setting1",
                                "value": "on a bus"
                              }
                            ],
                            "nodeId": "0b5c7344-ccc2-4ee8-9003-8ad3f1a76127",
                            "settingName": "textVariables"
                          }
                        ],
                        "public": false,
                        "createdAt": "2025-11-05T04:51:04.137Z"
                      }
                    }
                  },
                  "badRequest": {
                    "summary": "Bad request error",
                    "value": [
                      {
                        "message": "An error occurred.",
                        "path": [
                          "blueprintExecution"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "BadRequestException",
                          "details": {
                            "message": "Bad request. Please check your input.",
                            "statusCode": 400
                          }
                        }
                      }
                    ]
                  },
                  "notFound": {
                    "summary": "Not found error",
                    "value": [
                      {
                        "message": "Blueprint execution not found",
                        "path": [
                          "blueprintExecution"
                        ],
                        "locations": [
                          {
                            "column": 20,
                            "line": 1
                          }
                        ],
                        "extensions": {
                          "code": "NOT_FOUND",
                          "errorCode": 0,
                          "statusCode": 404
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/blueprint-executions/{id}/generations": {
      "get": {
        "tags": [
          "Blueprints"
        ],
        "summary": "Get Blueprint Execution Generations by Execution ID",
        "description": "Retrieves paginated generations for a specific Blueprint Execution, including their statuses and any prompt moderation failure details.",
        "operationId": "getBlueprintExecutionGenerations",
        "parameters": [
          {
            "

# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/leonardo-ai/refs/heads/main/openapi/leonardo-ai-blueprints-openapi.json