{ "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": [ { "required": true, "in": "path", "name": "id", "description": "The akUUID of the Blueprint Execution to retrieve generations for", "schema": { "$ref": "#/components/schemas/uuid" } }, { "required": false, "in": "query", "name": "first", "description": "Number of generations to return from the beginning of the list (forward pagination)", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } }, { "required": false, "in": "query", "name": "after", "description": "Cursor for forward pagination - returns generations after this cursor", "schema": { "$ref": "#/components/schemas/Cursor" } }, { "required": false, "in": "query", "name": "last", "description": "Number of generations to return from the end of the list (backward pagination)", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } }, { "required": false, "in": "query", "name": "before", "description": "Cursor for backward pagination - returns generations before this cursor", "schema": { "$ref": "#/components/schemas/Cursor" } } ], "responses": { "200": { "description": "Successfully retrieved Blueprint Execution Generations", "content": { "application/json": { "schema": { "type": "object", "properties": { "blueprintExecutionGenerations": { "$ref": "#/components/schemas/BlueprintExecutionGenerationsConnection" } } }, "examples": { "success": { "summary": "Successful response with generations", "value": { "blueprintExecutionGenerations": { "pageInfo": { "hasNextPage": true, "hasPreviousPage": false, "startCursor": "YXJyYXljb25uZWN0aW9uOjA=", "endCursor": "YXJyYXljb25uZWN0aW9uOjE5" }, "edges": [ { "cursor": "YXJyYXljb25uZWN0aW9uOjA=", "node": { "akUUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "COMPLETED", "generationId": "1f0bba44-923a-69b0-b519-62a6710d46a9" } }, { "cursor": "YXJyYXljb25uZWN0aW9uOjE=", "node": { "akUUID": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "status": "FAILED", "generationId": "1f0b933e-b512-6640-8305-4835ab8cebfd", "failedReason": { "type": "PROMPT_MODERATION_BLOCKED", "message": "Content policy violation: Content involving minors combined with NSFW content is strictly prohibited. Please modify your prompt and try again.", "affectedOutputCount": 1 } } } ] } } }, "promptModerationFailure": { "summary": "Generation failed due to prompt moderation", "value": { "blueprintExecutionGenerations": { "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "startCursor": "YXJyYXljb25uZWN0aW9uOjA=", "endCursor": "YXJyYXljb25uZWN0aW9uOjA=" }, "edges": [ { "cursor": "YXJyYXljb25uZWN0aW9uOjA=", "node": { "akUUID": "c3d4e5f6-a7b8-9012-cdef-123456789012", "status": "FAILED", "generationId": "1f0b933e-b512-6640-8305-4835ab8cebfd", "failedReason": { "type": "PROMPT_MODERATION_BLOCKED", "message": "Content policy violation: Content involving minors combined with NSFW content is strictly prohibited. Please modify your prompt and try again.", "affectedOutputCount": 4 } } } ] } } }, "notAccessible": { "summary": "Blueprint Execution not accessible or not found", "value": { "blueprintExecutionGenerations": { "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "startCursor": null, "endCursor": null }, "edges": [] } } } } } } } } } } }, "components": { "schemas": { "cost": { "nullable": true, "type": "object", "title": "Cost", "description": "The cost of the operation.", "properties": { "amount": { "type": "string", "description": "The amount of the cost." }, "unit": { "type": "string", "enum": [ "CREDITS", "DOLLARS" ], "description": "The unit of the cost. Can be CREDITS or DOLLARS. Note: DOLLARS unit only supports PAYG plan." } } }, "Cursor": { "type": "string", "title": "Cursor", "description": "An opaque cursor used for pagination" }, "Blueprint": { "type": "object", "title": "Blueprint", "description": "A Blueprint object", "properties": { "akUUID": { "type": "string", "description": "Unique identifier for the Blueprint", "example": "c846413e-92ba-4302-84f8-47c667d4761f" }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp", "example": "2025-10-29T21:31:47.999Z" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp", "example": "2025-12-19T02:34:44.740Z" }, "name": { "type": "string", "description": "Name of the Blueprint", "example": "Golden Hour Relight" }, "description": { "type": "string", "description": "Description of the Blueprint", "example": "Relight an image with warm, golden tones of late afternoon sunlight for a soft and radiant glow." }, "thumbnails": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Thumbnail type name (e.g., thumbnailUrl, videoUrl, thumbnailUrlBanner, thumbnailUrlLandscape, thumbnailUrlExtremePortrait)", "example": "thumbnailUrl" }, "url": { "type": "string", "description": "URL of the thumbnail", "example": "https://cdn.leonardo.ai/blueprint_assets/official/384ab5c8-55d8-47a1-be22-6a274913c324/thumbnails/goldenhour.jpg" } } } }, "teamId": { "type": "string", "nullable": true, "description": "Team ID if Blueprint belongs to a team", "example": null }, "official": { "type": "boolean", "description": "Whether this is an official Blueprint", "example": true } } }, "BlueprintVersion": { "type": "object", "title": "BlueprintVersion", "description": "A Blueprint Version object", "properties": { "edges": { "type": "array", "items": { "type": "object", "properties": { "cursor": { "type": "string", "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ==" }, "node": { "type": "object", "properties": { "akUUID": { "type": "string", "format": "uuid", "example": "956e9564-19f7-4968-b56d-05c2c567726f" }, "createdAt": { "type": "string", "format": "date-time", "example": "2025-11-27T05:13:21.896Z" }, "updatedAt": { "type": "string", "format": "date-time", "example": "2025-11-27T05:13:21.896Z" }, "cost": { "type": "integer", "example": 160 }, "uiMetadata": { "type": "object", "properties": { "inputs": { "type": "array", "items": { "type": "object" } }, "outputs": { "type": "array", "items": { "type": "object" } } }, "additionalProperties": false }, "uiMetadataSchemaVersion": { "type": "string", "example": "21" }, "models": { "type": "array", "items": { "type": "string" } }, "executability": { "type": "object", "properties": { "isExecutable": { "type": "boolean", "example": true }, "reasons": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "models": { "type": "string", "example": "gemini-2.5-flash-image" } } } } }, "additionalProperties": false } }, "additionalProperties": false } }, "additionalProperties": false } }, "totalCount": { "type": "integer", "example": 2 }, "pageInfo": { "type": "object", "properties": { "hasNextPage": { "type": "boolean", "example": false }, "hasPreviousPage": { "type": "boolean", "example": false }, "startCursor": { "type": "string", "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ==" }, "endCursor": { "type": "string", "example": "eyJjcmVhdGVkQXQiOiIyMDI1LTExLTI3VDA1OjEzOjIxLjg5NloiLCJha1VVSUQiOiI5NTZlOTU2NC0xOWY3LTQ5NjgtYjU2ZC0wNWMyYzU2NzcyNmYifQ==" } }, "additionalProperties": false } }, "additionalProperties": false }, "NodeInput": { "type": "object", "title": "NodeInput", "description": "A node input object for customizing a Blueprint Execution", "required": [ "nodeId", "settingName", "value" ], "properties": { "nodeId": { "type": "string", "format": "uuid", "description": "The ID of the node in the Blueprint", "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, "settingName": { "type": "string", "enum": [ "text", "imageUrl", "textVariables" ], "description": "The type of setting to replace:\n- `text`: Direct text replacement (value is a string)\n- `imageUrl`: Image URL input (value is a URL string)\n- `textVariables`: Text with placeholder variables (value is an array of TextVariable)", "example": "text" }, "value": { "oneOf": [ { "type": "string", "description": "String value. Use for settingName='text' (direct text) or settingName='imageUrl' (image URL)" }, { "type": "array", "items": { "$ref": "#/components/schemas/TextVariable" }, "description": "Array of TextVariable objects. Use only for settingName='textVariables' to replace {{placeholders}} in the Blueprint" } ], "description": "The replacement value. Type depends on settingName:\n- `text`: string (the full text)\n- `imageUrl`: string (the image URL)\n- `textVariables`: array of TextVariable objects", "example": "A futuristic cityscape at sunset" } } }, "TextVariable": { "type": "object", "title": "TextVariable", "description": "A text variable for replacing placeholders in Blueprint templates", "required": [ "name", "value" ], "properties": { "name": { "type": "string", "description": "The name of the placeholder variable (without curly braces)", "example": "characterName" }, "value": { "type": "string", "description": "The value to replace the placeholder with", "example": "Luna" } } }, "ApiError": { "type": "object", "title": "ApiError", "description": "API error response structure", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "Error message" }, "path": { "type": "array", "items": { "type": "string" }, "description": "Path to the field that caused the error" }, "locations": { "type": "array", "items": { "type": "object", "properties": { "column": { "type": "integer" }, "line": { "type": "integer" } } }, "description": "Location information for the error" }, "extensions": { "type": "object", "description": "Additional error details and context" } } }, "apiCreditCost": { "nullable": true, "title": "Int", "type": "integer", "description": "API credits cost, available for Production API users. Note: it will be deprecated. Please use the cost instead.", "deprecated": true }, "isVariation": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If it is a variation image." }, "isInitImage": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image." }, "imageToVideo": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If it is an image to video generation." }, "sd_versions": { "type": "string", "nullable": false, "title": "sd_versions", "enum": [ "v1_5", "v2", "v3", "SDXL_0_8", "SDXL_0_9", "SDXL_1_0", "SDXL_LIGHTNING", "PHOENIX", "FLUX", "FLUX_DEV", "KINO_2_0" ], "description": "The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models" }, "lora": { "type": "object", "properties": { "akUUID": { "nullable": true, "type": "string", "description": "Unique identifier for the element. Elements can be found from the List Elements endpoint." }, "creatorName": { "nullable": true, "type": "string", "description": "Name of the creator of the element" }, "name": { "nullable": true, "type": "string", "description": "Name of the element" }, "description": { "nullable": true, "type": "string", "description": "Description for the element" }, "urlImage": { "nullable": true, "type": "string", "description": "URL of the element image" }, "baseModel": { "nullable": true, "type": "string", "description": "Base model version for the element" }, "weightDefault": { "nullable": true, "type": "integer", "description": "Default weight for the element" }, "weightMin": { "nullable": true, "type": "integer", "description": "Minimum weight for the element" }, "weightMax": { "nullable": true, "type": "integer", "description": "Maximum weight for the element" }, "__typename": { "type": "string", "description": "Type name for introspection purposes" } } }, "motion": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If generation is of motion type." }, "motionModel": { "nullable": true, "title": "String", "type": "string", "description": "The name of the motion model." }, "motionMP4URL": { "nullable": true, "title": "String", "type": "string", "description": "The URL of the motion MP4." }, "motionStrength": { "nullable": true, "title": "Int", "type": "integer", "description": "The motion strength." }, "public": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "Whether the generation is public or not" }, "strength": { "type": "string", "nullable": false, "title": "strength", "enum": [ "VERY_LOW", "LOW", "MEDIUM", "HIGH" ], "description": "When training using the PIXEL_ART model type, this influences the training strength.", "default": "MEDIUM" }, "job_status": { "type": "string", "nullable": false, "title": "job_status", "enum": [ "PENDING", "COMPLETE", "FAILED" ], "description": "The status of the current task." }, "BlueprintExecutionStatus": { "type": "string", "nullable": false, "title": "BlueprintExecutionStatus", "enum": [ "PENDING", "QUEUED", "COMPLETED", "FAILED" ], "description": "The status of a Blueprint Execution." }, "BlueprintExecution": { "type": "object", "nullable": false, "title": "BlueprintExecution", "description": "Represents the Execution of a Blueprint Version", "properties": { "akUUID": { "allOf": [ { "$ref": "#/components/schemas/uuid" }, { "nullable": false, "description": "akUUID of the Blueprint Execution" } ] }, "status": { "$ref": "#/components/schemas/BlueprintExecutionStatus", "description": "Status of the Blueprint Execution" }, "inputs": { "type": "array", "nullable": false, "description": "Inputs of the Blueprint Execution", "items": { "$ref": "#/components/schemas/NodeInput" } }, "public": { "allOf": [ { "$ref": "#/components/schemas/public" }, { "nullable": false, "description": "Whether the Blueprint Execution is public" } ] }, "createdAt": { "$ref": "#/components/schemas/timestamp", "description": "Created date of the Blueprint Execution" } }, "required": [ "akUUID", "status", "inputs", "public", "createdAt" ] }, "BlueprintExecutionGenerationsConnection": { "type": "object", "nullable": false, "title": "BlueprintExecutionGenerationsConnection", "description": "A paginated connection of Blueprint Execution Generations", "properties": { "pageInfo": { "$ref": "#/components/schemas/pageInfo" }, "edges": { "type": "array", "description": "List of generation edges", "items": { "$ref": "#/components/schemas/BlueprintExecutionGenerationEdge" } } }, "required": [ "pageInfo", "edges" ] }, "BlueprintExecutionGenerationEdge": { "type": "object", "nullable": false, "title": "BlueprintExecutionGenerationEdge", "description": "An edge containing a Blueprint Execution Generation node", "properties": { "cursor": { "$ref": "#/components/schemas/Cursor", "description": "Cursor for this edge, used for pagination" }, "node": { "$ref": "#/components/schemas/BlueprintExecutionGeneration" } }, "required": [ "cursor", "node" ] }, "BlueprintExecutionGeneration": { "type": "object", "nullable": false, "title": "BlueprintExecutionGeneration", "description": "Represents a single generation within a Blueprint Execution", "properties": { "akUUID": { "allOf": [ { "$ref": "#/components/schemas/uuid" }, { "nullable": false, "description": "Unique identifier for the Blueprint Execution Generation" } ] }, "status": { "$ref": "#/components/schemas/BlueprintExecutionGenerationStatus", "description": "Status of the generation" }, "generationId": { "type": "string", "nullable": false, "description": "The generation ID associated with this execution generation", "example": "1f0bba44-923a-69b0-b519-62a6710d46a9" }, "failedReason": { "$ref": "#/components/schemas/PromptModerationFailureReason", "description": "Details about why the generation failed, specifically for prompt moderation failures" } }, "required": [ "akUUID", "status", "generationId" ] }, "BlueprintExecutionGenerationStatus": { "type": "string", "nullable": false, "title": "BlueprintExecutionGenerationStatus", "enum": [ "PENDING", "COMPLETED", "FAILED" ], "description": "The status of a Blueprint Execution Generation" }, "PromptModerationFailureReason": { "type": "object", "nullable": true, "title": "PromptModerationFailureReason", "description": "Details about a generation failure due to prompt moderation", "properties": { "type": { "type": "string", "nullable": false, "enum": [ "PROMPT_MODERATION_BLOCKED" ], "description": "The type of failure - PROMPT_MODERATION_BLOCKED indicates the prompt was blocked by content moderation", "example": "PROMPT_MODERATION_BLOCKED" }, "message": { "type": "string", "nullable": false, "description": "Human-readable message describing the failure", "example": "Generation blocked due to prompt moderation" }, "affectedOutputCount": { "type": "integer", "nullable": false, "description": "Number of outputs affected by this failure", "example": 1 } }, "required": [ "type", "message", "affectedOutputCount" ] }, "custom_model_type": { "type": "string", "default": "GENERAL", "nullable": false, "title": "custom_model_type", "enum": [ "GENERAL", "BUILDINGS", "CHARACTERS", "ENVIRONMENTS", "FASHION", "ILLUSTRATIONS", "GAME_ITEMS", "GRAPHICAL_ELEMENTS", "PHOTOGRAPHY", "PIXEL_ART", "PRODUCT_DESIGN", "TEXTURES", "UI_ELEMENTS", "VECTOR" ], "description": "The category the most accurately reflects the model." }, "sd_generation_schedulers": { "type": "string", "nullable": false, "title": "sd_generation_schedulers", "enum": [ "KLMS", "EULER_ANCESTRAL_DISCRETE", "EULER_DISCRETE", "DDIM", "DPM_SOLVER", "PNDM", "LEONARDO" ], "description": "The scheduler to generate images with. Defaults to EULER_DISCRETE if not specified." }, "VARIATION_TYPE": { "type": "string", "nullable": false, "title": "VARIATION_TYPE", "enum": [ "OUTPAINT", "INPAINT", "UPSCALE", "UNZOOM", "NOBG" ], "description": "The type of variation." }, "MOTION_VARIATION_TYPE": { "type": "string", "nullable": false, "title": "MOTION_VARIATION_TYPE", "enum": [ "UPSCALE" ], "description": "The type of motion variation." }, "MOTION_RESOLUTION": { "type": "string", "nullable": false, "title": "MOTION_RESOLUTION", "enum": [ "RESOLUTION_720" ], "description": "The resolution of the upscaled video. RESOLUTION_720 is the only option for now." }, "timestamp": { "type": "string", "nullable": false, "title": "timestamp" }, "controlnet_input": { "nullable": false, "properties": { "initImageId": { "nullable": false, "title": "String", "type": "string", "description": "The ID of the init image" }, "initImageType": { "type": "string", "nullable": false, "enum": [ "GENERATED", "UPLOADED" ], "description": "Type indicating whether the init image is uploaded or generated." }, "preprocessorId": { "nullable": false, "title": "numeric", "type": "number", "description": "ID of the controlnet. A list of compatible IDs can be found in our guides." }, "weight": { "nullable": true, "title": "Float", "type": "number", "description": "Weight for the controlnet" }, "strengthType": { "type": "string", "nullable": true, "enum": [ "Low", "Mid", "High", "Ultra", "Max" ], "description": "Strength type for the controlnet. Can only be used for Style, Character and Content Reference controlnets." } }, "title": "controlnet_input", "type": "object" }, "element_input": { "nullable": false, "properties": { "akUUID": { "nullable": false, "title": "String", "type": "string", "description": "Unique identifier for element. Elements can be found from the List Elements endpoint." }, "weight": { "nullable": true, "title": "Float", "type": "number", "default": 1.0, "description": "Weight for the element" } }, "required": [ "akUUID" ], "title": "element_input", "type": "object" }, "user_elements_input": { "nullable": false, "properties": { "userLoraId": { "nullable": true, "title": "Int", "type": "number", "description": "Unique identifier for user custom element." }, "weight": { "nullable": true, "title": "Float", "type": "number", "description": "Weight for the element" } }, "title": "user_elements_input", "type": "object" }, "float8": { "type": "number", "nullable": true, "title": "float8" }, "numeric": { "type": "number", "nullable": true, "title": "numeric" }, "bigint": { "type": "integer", "nullable": true, "title": "bigint" }, "seed": { "type": "integer", "nullable": true, "title": "seed", "description": "Apply a fixed seed to maintain consistency across generation sets. The maximum seed value is 2147483637 for Flux and 9999999998 for other models" }, "sd_generation_style": { "type": "string", "nullable": true, "title": "sd_generation_style", "enum": [ "ANIME", "BOKEH", "CINEMATIC", "CINEMATIC_CLOSEUP", "CREATIVE", "DYNAMIC", "ENVIRONMENT", "FASHION", "FILM", "FOOD", "GENERAL", "HDR", "ILLUSTRATION", "LEONARDO", "LONG_EXPOSURE", "MACRO", "MINIMALISTIC", "MONOCHROME", "MOODY", "NONE", "NEUTRAL", "PHOTOGRAPHY", "PORTRAIT", "RAYTRACED", "RENDER_3D", "RETRO", "SKETCH_BW", "SKETCH_COLOR", "STOCK_PHOTO", "VIBRANT", "UNPROCESSED" ], "description": "The style to generate images with. When photoReal is enabled, refer to the Guide section for a full list. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE.", "default": "DYNAMIC" }, "lcm_generation_style": { "type": "string", "nullable": true, "title": "lcm_generation_style", "enum": [ "ANIME", "CINEMATIC", "DIGITAL_ART", "DYNAMIC", "ENVIRONMENT", "FANTASY_ART", "ILLUSTRATION", "PHOTOGRAPHY", "RENDER_3D", "RAYTRACED", "SKETCH_BW", "SKETCH_COLOR", "VIBRANT", "NONE" ], "description": "The style to generate LCM images with." }, "universal_upscaler_style": { "type": "string", "nullable": true, "default": "GENERAL", "title": "universal_upscaler_style", "enum": [ "GENERAL", "CINEMATIC", "2D ART & ILLUSTRATION", "CG ART & GAME ASSETS" ], "description": "The style to upscale images using universal upscaler with. Can not be used with ultraUpscaleStyle." }, "universal_upscaler_ultra_style": { "type": "string", "nullable": true, "title": "universal_upscaler_ultra_style", "enum": [ "ARTISTIC", "REALISTIC" ], "description": "The ultra style to upscale images using universal upscaler with. Can not be used with upscalerStyle." }, "controlnet_type": { "type": "string", "nullable": false, "title": "controlnet_type", "enum": [ "POSE", "CANNY", "DEPTH" ], "description": "This parameter will be deprecated in September 2024. Please use the controlnets array instead.", "deprecated": true }, "uuid": { "nullable": true, "pattern": "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}", "title": "uuid", "type": "string" }, "photoRealArg": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "Enable the photoReal feature. Requires enabling alchemy and unspecifying modelId (for photoRealVersion V1)." }, "photoRealVersion": { "nullable": true, "title": "String", "type": "string", "description": "The version of photoReal to use. Must be v1 or v2." }, "photoRealRes": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If photoReal feature was used." }, "photoRealStrengthArg": { "nullable": true, "title": "Float", "type": "number", "description": "Depth of field of photoReal. Must be 0.55 for low, 0.5 for medium, or 0.45 for high. Defaults to 0.55 if not specified." }, "photoRealStrengthRes": { "nullable": true, "title": "Float", "type": "number", "description": "Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55." }, "promptMagicArg": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "Enable to use Prompt Magic." }, "promptMagicRes": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If prompt magic was used." }, "promptMagicVersionArg": { "nullable": true, "title": "String", "type": "string", "description": "Prompt magic version v2 or v3, for use when promptMagic: true" }, "promptMagicVersionRes": { "nullable": true, "title": "String", "type": "string", "description": "Version of prompt magic used." }, "promptMagicStrengthArg": { "nullable": true, "title": "Float", "type": "number", "description": "Strength of prompt magic. Must be a float between 0.1 and 1.0" }, "promptMagicStrengthRes": { "nullable": true, "title": "Float", "type": "number", "description": "Strength of prompt magic used." }, "pricingCalculatorServices": { "type": "string", "nullable": false, "title": "pricingCalculatorServices", "enum": [ "IMAGE_GENERATION", "FANTASY_AVATAR_GENERATION", "MOTION_SVD_GENERATION", "MOTION_VIDEO_GENERATION", "VEO3_MOTION_VIDEO_GENERATION", "LCM_GENERATION", "MODEL_TRAINING", "TEXTURE_GENERATION", "UNIVERSAL_UPSCALER", "UNIVERSAL_UPSCALER_ULTRA" ], "description": "The services to be chosen for calculating the API credit cost." }, "imageHeight": { "nullable": false, "title": "Int", "type": "integer", "description": "The input height of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features" }, "imageWidth": { "nullable": false, "title": "Int", "type": "integer", "description": "The input width of the images. Must be between 32 and 1024 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features" }, "numImages": { "nullable": false, "title": "Int", "type": "integer", "description": "The number of images to generate. Must be between 1 and 8. If either width or height is over 768, must be between 1 and 4." }, "canvasRequestType": { "type": "string", "nullable": true, "title": "canvasRequestType", "enum": [ "INPAINT", "OUTPAINT", "SKETCH2IMG", "IMG2IMG" ], "description": "The type of request for the Canvas Editor." }, "sd_generation_ultra": { "nullable": true, "title": "Boolean", "type": "boolean", "description": "If ultra generation mode was used." }, "pageInfo": { "type": "object", "title": "PageInfo", "description": "Pagination information following the Relay cursor pagination spec", "properties": { "hasNextPage": { "type": "boolean", "description": "Whether there is a next page" }, "hasPreviousPage": { "type": "boolean", "description": "Whether there is a previous page" }, "startCursor": { "allOf": [ { "$ref": "#/components/schemas/Cursor" } ], "description": "Cursor for the first item in the result set" }, "endCursor": { "allOf": [ { "$ref": "#/components/schemas/Cursor" } ], "description": "Cursor for the last item in the result set" } } }, "totalCount": { "type": "integer", "description": "Total number of results available" } }, "securitySchemes": { "bearerAuth": { "type": "http", "bearerFormat": "auth-scheme", "description": "Bearer HTTP authentication. Allowed headers `Authorization: Bearer `", "scheme": "bearer" } } }, "security": [ { "bearerAuth": [] } ] }