{"openapi":"3.0.0","info":{"description":"Leonardo.Ai API OpenAPI specification (v1.0).","title":"Rest Endpoints","version":"v1.0.0"},"servers":[{"url":"https:\/\/cloud.leonardo.ai\/api\/rest\/v1","description":"Leonardo.Ai API server"}],"tags":[{"name":"Blueprints"},{"name":"Dataset"},{"name":"Elements"},{"name":"Image"},{"name":"Init Images"},{"name":"Media"},{"name":"Motion"},{"name":"Models"},{"name":"Pricing Calculator"},{"name":"Prompt"},{"name":"Realtime Canvas"},{"name":"User"},{"name":"Variation"},{"name":"3D Model Assets"}],"paths":{"\/me":{"get":{"tags":["User"],"summary":"Get user information","description":"This endpoint will return your user information such as your user id, username, token renewal date and current amounts of the following: subscription tokens, gpt (prompt generation) tokens, and model training tokens","operationId":"getUserSelf","responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"user_details":{"items":{"description":"columns and relationships of \"user_details\"","nullable":false,"properties":{"user":{"description":"columns and relationships of \"users\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"username":{"nullable":true,"title":"String","type":"string","description":"Username of the user."}},"title":"users","type":"object"},"tokenRenewalDate":{"nullable":true,"title":"timestamp","type":"string","description":"User Plan Token Renewal Date."},"paidTokens":{"nullable":true,"title":"Int","type":"integer","description":"Current balance of paid tokens the user has."},"subscriptionTokens":{"nullable":false,"title":"Int","type":"integer","description":"Current balance of user plan subscription tokens the user has."},"subscriptionGptTokens":{"nullable":false,"title":"Int","type":"integer","description":"Current balance of user plan GPT tokens the user has."},"subscriptionModelTokens":{"nullable":false,"title":"Int","type":"integer","description":"Current balance of model training tokens the user has."},"apiConcurrencySlots":{"nullable":false,"title":"Int","type":"integer","description":"API Concurrency Slots."},"apiPaidTokens":{"nullable":true,"title":"Int","type":"integer","description":"Current balance of API paid tokens the user has."},"apiSubscriptionTokens":{"nullable":false,"title":"Int","type":"integer","description":"Current balance of Enterprise API subscriptions tokens the user has."},"apiPlanTokenRenewalDate":{"nullable":true,"title":"timestamp","type":"string","description":"API Plan Token Renewal Date."}},"title":"user_details","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/me"}}}},"\/generations":{"post":{"tags":["Image"],"summary":"Create a Generation of Images","description":"This endpoint will generate images","operationId":"createGeneration","requestBody":{"content":{"application\/json":{"schema":{"properties":{"alchemy":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Alchemy. Note: The appropriate Alchemy version is selected for the specified model. For example, XL models will use Alchemy V2.","default":true},"contrastRatio":{"nullable":true,"title":"Float","type":"number","description":"Contrast Ratio to use with Alchemy. Must be a float between 0 and 1 inclusive."},"contrast":{"type":"number","description":"Adjusts the contrast level of the generated image. Used in Phoenix and Flux models. Accepts values [1.0, 1.3, 1.8, 2.5, 3, 3.5, 4, 4.5]. For Phoenix, if alchemy is true, contrast needs to be 2.5 or higher.","minimum":1,"maximum":4.5,"example":3.5,"nullable":true,"title":"Float"},"controlnets":{"items":{"$ref":"#\/components\/schemas\/controlnet_input"},"nullable":true,"type":"array"},"elements":{"items":{"$ref":"#\/components\/schemas\/element_input"},"nullable":true,"type":"array"},"userElements":{"items":{"$ref":"#\/components\/schemas\/user_elements_input"},"nullable":true,"type":"array"},"expandedDomain":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use the Expanded Domain feature of Alchemy."},"fantasyAvatar":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use the Fantasy Avatar feature."},"guidance_scale":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generation should reflect the prompt. 7 is recommended. Must be between 1 and 20."},"height":{"nullable":true,"title":"Int","type":"integer","description":"The input height of the images. Must be between 32 and 1536 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features.","default":768},"highContrast":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use the High Contrast feature of Prompt Magic. Note: Controls RAW mode. Set to false to enable RAW mode."},"highResolution":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use the High Resolution feature of Prompt Magic."},"imagePrompts":{"items":{"nullable":true,"title":"String","type":"string"},"nullable":true,"type":"array"},"imagePromptWeight":{"nullable":true,"title":"Float","type":"number"},"init_generation_image_id":{"nullable":true,"title":"String","type":"string","description":"The ID of an existing image to use in image2image."},"init_image_id":{"nullable":true,"title":"String","type":"string","description":"The ID of an Init Image to use in image2image."},"init_strength":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generated images should reflect the original image in image2image. Must be a float between 0.1 and 0.9."},"modelId":{"nullable":true,"title":"String","type":"string","description":"The model ID used for image generation. If not provided, uses sd_version to determine the version of Stable Diffusion to use. In-app, model IDs are under the Finetune Models menu. Click on the platform model or your custom model, then click View More. For platform models, you can also use the List Platform Models API.","default":"b24e16ff-06e3-43eb-8d33-4416c2d75876"},"negative_prompt":{"nullable":true,"title":"String","type":"string","description":"The negative prompt used for the image generation"},"num_images":{"nullable":true,"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.","default":4},"num_inference_steps":{"nullable":true,"title":"Int","type":"integer","description":"The Step Count to use for the generation. Must be between 10 and 60. Default is 15."},"photoReal":{"$ref":"#\/components\/schemas\/photoRealArg"},"photoRealVersion":{"$ref":"#\/components\/schemas\/photoRealVersion"},"photoRealStrength":{"$ref":"#\/components\/schemas\/photoRealStrengthArg"},"presetStyle":{"$ref":"#\/components\/schemas\/sd_generation_style"},"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate images","default":"A majestic cat in the snow"},"promptMagic":{"$ref":"#\/components\/schemas\/promptMagicArg"},"promptMagicStrength":{"$ref":"#\/components\/schemas\/promptMagicStrengthArg"},"promptMagicVersion":{"$ref":"#\/components\/schemas\/promptMagicVersionArg"},"public":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether the generated images should show in the community feed."},"scheduler":{"$ref":"#\/components\/schemas\/sd_generation_schedulers"},"sd_version":{"$ref":"#\/components\/schemas\/sd_versions"},"seed":{"$ref":"#\/components\/schemas\/seed"},"tiling":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether the generated images should tile on all axis."},"transparency":{"nullable":true,"title":"TransparencyType","type":"string","enum":["disabled","foreground_only"],"description":"Which type of transparency this image should use"},"ultra":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Ultra mode. Note: can not be used with Alchemy."},"unzoom":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether the generated images should be unzoomed (requires unzoomAmount and init_image_id to be set)."},"unzoomAmount":{"nullable":true,"title":"Float","type":"number","description":"How much the image should be unzoomed (requires an init_image_id and unzoom to be set to true)."},"upscaleRatio":{"nullable":true,"title":"Float","type":"number","description":"How much the image should be upscaled. (Enterprise Only)"},"width":{"nullable":true,"title":"Int","type":"integer","description":"The input width of the images. Must be between 32 and 1536 and be a multiple of 8. Note: Input resolution is not always the same as output resolution due to upscaling from other features.","default":1024},"controlNet":{"nullable":true,"title":"Boolean","type":"boolean","description":"This parameter will be deprecated in September 2024. Please use the controlnets array instead.","deprecated":true},"controlNetType":{"$ref":"#\/components\/schemas\/controlnet_type","deprecated":true},"weighting":{"nullable":true,"title":"Float","type":"number","description":"This parameter will be deprecated in September 2024. Please use the controlnets array instead.","deprecated":true},"canvasRequest":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether the generation is for the Canvas Editor feature."},"canvasRequestType":{"$ref":"#\/components\/schemas\/canvasRequestType"},"canvasInitId":{"nullable":true,"title":"String","type":"string","description":"The ID of an initial image to use in Canvas Editor request."},"canvasMaskId":{"nullable":true,"title":"String","type":"string","description":"The ID of a mask image to use in Canvas Editor request."},"enhancePrompt":{"nullable":true,"title":"Boolean","type":"boolean","description":"When enabled, your prompt is expanded to include more detail."},"enhancePromptInstruction":{"nullable":true,"title":"String","type":"string","description":"When enhancePrompt is enabled, the prompt is enhanced based on the given instructions."}},"type":"object","required":["prompt"]}}},"description":"Query parameters to be provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sdGenerationJob":{"nullable":true,"properties":{"generationId":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Image Generation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDGenerationOutput","type":"object"}}},"example":{"sdGenerationJob":{"generationId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/generations"}}}},"\/generations\/{id}":{"get":{"tags":["Image"],"summary":"Get a Single Generation","description":"This endpoint will provide information about a specific generation","operationId":"getGenerationById","parameters":[{"required":true,"description":"The ID of the generation to return.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"generations_by_pk":{"description":"columns and relationships of \"generations\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"generated_images":{"items":{"description":"columns and relationships of \"generated_images\"","nullable":false,"properties":{"generated_image_variation_generics":{"items":{"description":"columns and relationships of \"generated_image_variation_generic\"","nullable":false,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"status":{"$ref":"#\/components\/schemas\/job_status"},"transformType":{"$ref":"#\/components\/schemas\/VARIATION_TYPE"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"generated_image_variation_generic","type":"object"},"nullable":false,"type":"array"},"fantasyAvatar":{"nullable":true,"title":"Boolean","type":"boolean","description":"If fantasyAvatar feature was used."},"id":{"$ref":"#\/components\/schemas\/uuid"},"imageToVideo":{"$ref":"#\/components\/schemas\/imageToVideo"},"likeCount":{"nullable":false,"title":"Int","type":"integer"},"motion":{"$ref":"#\/components\/schemas\/motion"},"motionModel":{"$ref":"#\/components\/schemas\/motionModel"},"motionMP4URL":{"$ref":"#\/components\/schemas\/motionMP4URL"},"motionStrength":{"$ref":"#\/components\/schemas\/motionStrength"},"nsfw":{"nullable":false,"title":"Boolean","type":"boolean"},"url":{"nullable":false,"title":"String","type":"string"}},"title":"generated_images","type":"object"},"nullable":false,"type":"array"},"generation_elements":{"items":{"description":"This table captures the elements that are applied to Generations.","nullable":false,"properties":{"id":{"$ref":"#\/components\/schemas\/bigint"},"lora":{"description":"Element used for the generation.","nullable":true,"properties":{"akUUID":{"$ref":"#\/components\/schemas\/lora\/properties\/akUUID"},"baseModel":{"$ref":"#\/components\/schemas\/sd_versions"},"description":{"$ref":"#\/components\/schemas\/lora\/properties\/description"},"name":{"$ref":"#\/components\/schemas\/lora\/properties\/name"},"urlImage":{"$ref":"#\/components\/schemas\/lora\/properties\/urlImage"},"weightDefault":{"$ref":"#\/components\/schemas\/lora\/properties\/weightDefault"},"weightMax":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMax"},"weightMin":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMin"}},"title":"loras","type":"object"},"weightApplied":{"$ref":"#\/components\/schemas\/numeric"}},"title":"generation_elements","type":"object"},"nullable":false,"type":"array"},"guidanceScale":{"$ref":"#\/components\/schemas\/float8"},"id":{"$ref":"#\/components\/schemas\/uuid"},"imageHeight":{"nullable":false,"title":"Int","type":"integer"},"imageWidth":{"nullable":false,"title":"Int","type":"integer"},"inferenceSteps":{"nullable":true,"title":"Int","type":"integer"},"initStrength":{"$ref":"#\/components\/schemas\/float8"},"modelId":{"$ref":"#\/components\/schemas\/uuid"},"negativePrompt":{"nullable":true,"title":"String","type":"string"},"photoReal":{"$ref":"#\/components\/schemas\/photoRealRes"},"photoRealStrength":{"$ref":"#\/components\/schemas\/photoRealStrengthRes"},"presetStyle":{"$ref":"#\/components\/schemas\/sd_generation_style"},"prompt":{"nullable":false,"title":"String","type":"string"},"promptMagic":{"$ref":"#\/components\/schemas\/promptMagicRes"},"promptMagicStrength":{"$ref":"#\/components\/schemas\/promptMagicStrengthRes"},"promptMagicVersion":{"$ref":"#\/components\/schemas\/promptMagicVersionRes"},"public":{"nullable":false,"title":"Boolean","type":"boolean"},"scheduler":{"$ref":"#\/components\/schemas\/sd_generation_schedulers"},"sdVersion":{"$ref":"#\/components\/schemas\/sd_versions"},"seed":{"$ref":"#\/components\/schemas\/seed"},"status":{"$ref":"#\/components\/schemas\/job_status"},"ultra":{"$ref":"#\/components\/schemas\/sd_generation_ultra"}},"title":"generations","type":"object"}}}}},"description":"Responses for GET \/generations\/{id}"}}},"delete":{"tags":["Image"],"summary":"Delete a Single Generation","description":"This endpoint deletes a specific generation","operationId":"deleteGenerationById","parameters":[{"required":true,"description":"The ID of the generation to delete.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_generations_by_pk":{"description":"columns and relationships of \"generations\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"generations","type":"object"}}}}},"description":"Responses for DELETE \/generations\/{id}"}}}},"\/generations\/user\/{userId}":{"get":{"tags":["Image"],"summary":"Get generations by user ID","description":"This endpoint returns all generations by a specific user","operationId":"getGenerationsByUserId","parameters":[{"in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"in":"query","name":"limit","schema":{"default":10,"type":"integer"}},{"required":true,"in":"path","name":"userId","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"generations":{"items":{"description":"columns and relationships of \"generations\"","nullable":false,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"generated_images":{"items":{"description":"columns and relationships of \"generated_images\"","nullable":false,"properties":{"generated_image_variation_generics":{"items":{"description":"columns and relationships of \"generated_image_variation_generic\"","nullable":false,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"status":{"$ref":"#\/components\/schemas\/job_status"},"transformType":{"$ref":"#\/components\/schemas\/VARIATION_TYPE"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"generated_image_variation_generic","type":"object"},"nullable":false,"type":"array"},"id":{"$ref":"#\/components\/schemas\/uuid"},"imageToVideo":{"$ref":"#\/components\/schemas\/imageToVideo"},"likeCount":{"nullable":false,"title":"Int","type":"integer"},"motion":{"$ref":"#\/components\/schemas\/motion"},"motionModel":{"$ref":"#\/components\/schemas\/motionModel"},"motionMP4URL":{"$ref":"#\/components\/schemas\/motionMP4URL"},"motionStrength":{"$ref":"#\/components\/schemas\/motionStrength"},"nsfw":{"nullable":false,"title":"Boolean","type":"boolean"},"url":{"nullable":false,"title":"String","type":"string"}},"title":"generated_images","type":"object"},"nullable":false,"type":"array"},"generation_elements":{"items":{"description":"This table captures the elements that are applied to a Generations, also the order and weightings used when applied.","nullable":false,"properties":{"id":{"$ref":"#\/components\/schemas\/bigint"},"lora":{"description":"Element used for the generation.","nullable":true,"properties":{"akUUID":{"$ref":"#\/components\/schemas\/lora\/properties\/akUUID"},"baseModel":{"$ref":"#\/components\/schemas\/sd_versions"},"description":{"$ref":"#\/components\/schemas\/lora\/properties\/description"},"name":{"$ref":"#\/components\/schemas\/lora\/properties\/name"},"urlImage":{"$ref":"#\/components\/schemas\/lora\/properties\/urlImage"},"weightDefault":{"$ref":"#\/components\/schemas\/lora\/properties\/weightDefault"},"weightMax":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMax"},"weightMin":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMin"}},"title":"elements","type":"object"},"weightApplied":{"$ref":"#\/components\/schemas\/numeric"}},"title":"generation_elements","type":"object"},"nullable":false,"type":"array"},"guidanceScale":{"$ref":"#\/components\/schemas\/float8"},"id":{"$ref":"#\/components\/schemas\/uuid"},"imageHeight":{"nullable":false,"title":"Int","type":"integer"},"imageWidth":{"nullable":false,"title":"Int","type":"integer"},"inferenceSteps":{"nullable":true,"title":"Int","type":"integer"},"initStrength":{"$ref":"#\/components\/schemas\/float8"},"modelId":{"$ref":"#\/components\/schemas\/uuid"},"negativePrompt":{"nullable":true,"title":"String","type":"string"},"photoReal":{"$ref":"#\/components\/schemas\/photoRealRes"},"photoRealStrength":{"$ref":"#\/components\/schemas\/photoRealStrengthRes"},"presetStyle":{"$ref":"#\/components\/schemas\/sd_generation_style"},"prompt":{"nullable":false,"title":"String","type":"string"},"promptMagic":{"$ref":"#\/components\/schemas\/promptMagicRes"},"promptMagicStrength":{"$ref":"#\/components\/schemas\/promptMagicStrengthRes"},"promptMagicVersion":{"$ref":"#\/components\/schemas\/promptMagicVersionRes"},"public":{"nullable":false,"title":"Boolean","type":"boolean"},"scheduler":{"$ref":"#\/components\/schemas\/sd_generation_schedulers"},"sdVersion":{"$ref":"#\/components\/schemas\/sd_versions"},"seed":{"$ref":"#\/components\/schemas\/seed"},"status":{"$ref":"#\/components\/schemas\/job_status"},"ultra":{"$ref":"#\/components\/schemas\/sd_generation_ultra"}},"title":"generations","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/generations\/user\/{userId}"}}}},"\/generations-image-to-video":{"post":{"tags":["Motion"],"summary":"Create a video generation from an image","description":"This endpoint will generate a video using an uploaded or generated image.","operationId":"createImageToVideoGeneration","requestBody":{"content":{"application\/json":{"schema":{"properties":{"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate video"},"imageId":{"nullable":false,"title":"String","type":"string","description":"The ID of the image, supports generated images and init images. Use only image or imageId with imageType."},"imageType":{"type":"string","nullable":false,"enum":["GENERATED","UPLOADED"],"description":"Type indicating whether the init image is uploaded or generated. Use only image or imageId with imageType."},"endFrameImage":{"nullable":true,"title":"Object","type":"object","description":"The end frame image. Supported only on kling2_1 model when used in conjunction with an init image.","properties":{"id":{"nullable":false,"title":"String","type":"string","description":"The ID of the end frame image."},"type":{"nullable":false,"title":"String","type":"string","enum":["GENERATED","UPLOADED"],"description":"Type indicating whether the end frame image is uploaded or generated."}},"required":["id","type"]},"resolution":{"nullable":true,"title":"String","enum":["RESOLUTION_480","RESOLUTION_720","RESOLUTION_1080"],"description":"The resolution of the output video. Acceptable values vary based on model"},"model":{"nullable":true,"title":"String","enum":["MOTION2","VEO3","MOTION2FAST","VEO3FAST","KLING2_1","KLING2_5"],"description":"The model to use for the video generation. Defaults to MOTION2 if not specified.","default":"MOTION2"},"frameInterpolation":{"nullable":true,"title":"Boolean","type":"boolean","description":"Smoothly blend frames for fluid video transitions using Interpolation."},"isPublic":{"$ref":"#\/components\/schemas\/public"},"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 Motion 2.0."},"negativePrompt":{"nullable":true,"title":"String","type":"string","description":"The negative prompt used for the video generation."},"promptEnhance":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether to enhance the prompt."},"duration":{"nullable":true,"title":"Integer","type":"integer","description":"Duration of the output video in seconds. Allowed values: 4, 6, or 8 on models VEO3 and VEO3FAST (default: 8) and 5 or 10 on model KLING2_5 (default: 5)."},"promptEnhanceInstruction":{"nullable":true,"title":"String","type":"string","description":"A natural language instruction used to modify the main prompt. For example, 'make it cinematic', 'add a rainbow', or 'change the subject to a cat'."},"styleIds":{"nullable":true,"title":"Array of Strings","type":"array","items":{"type":"string"},"description":"Predefined styles to enhance the prompt. This accepts a list of style uuids."},"elements":{"nullable":true,"title":"Array of Element Inputs","type":"array","items":{"$ref":"#\/components\/schemas\/element_input"},"description":"An array of elements\/loras objects that will be applied sequentially to the output. Elements are only supported for Motion2.0 generations. "},"height":{"nullable":true,"title":"Integer","type":"integer","description":"Height of the output video. Acceptable values vary based on model"},"width":{"nullable":true,"title":"Integer","type":"integer","description":"Width of the output video. Acceptable values vary based on model"}},"type":"object","required":["prompt","imageId","imageType"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"motionVideoGenerationJob":{"nullable":true,"properties":{"generationId":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"MotionVideoGenerationOutput","type":"object"}}},"example":{"motionVideoGenerationJob":{"generationId":"i8j9k0l1-m2n3-o4p5-qrst-uv7890123456","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/generations-image-to-video"}}}},"\/generations-text-to-video":{"post":{"tags":["Motion"],"summary":"Create a video generation from a text prompt","description":"This endpoint will generate a video using a text prompt","operationId":"createTextToVideoGeneration","requestBody":{"content":{"application\/json":{"schema":{"properties":{"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate video"},"resolution":{"nullable":true,"title":"String","enum":["RESOLUTION_480","RESOLUTION_720","RESOLUTION_1080"],"description":"The resolution of the output video. Acceptable values vary based on model"},"model":{"nullable":true,"title":"String","enum":["MOTION2","VEO3","MOTION2FAST","VEO3FAST","KLING2_1","KLING2_5"],"description":"The model to use for the video generation. Defaults to MOTION2 if not specified.","default":"MOTION2"},"frameInterpolation":{"nullable":true,"title":"Boolean","type":"boolean","description":"Smoothly blend frames for fluid video transitions using Interpolation."},"isPublic":{"$ref":"#\/components\/schemas\/public"},"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 Motion 2.0 and 4294967293 for Veo3."},"negativePrompt":{"nullable":true,"title":"String","type":"string","description":"The negative prompt used for the video generation."},"promptEnhance":{"nullable":true,"title":"Boolean","type":"boolean","description":"Whether to enhance the prompt."},"promptEnhanceInstruction":{"nullable":true,"title":"String","type":"string","description":"A natural language instruction used to modify the main prompt. For example, 'make it cinematic', 'add a rainbow', or 'change the subject to a cat'."},"styleIds":{"nullable":true,"title":"Array of Strings","type":"array","items":{"type":"string"},"description":"Predefined styles to enhance the prompt. This accepts a list of style uuids."},"height":{"nullable":true,"title":"Integer","type":"integer","description":"Height of the output video. Acceptable values vary based on model"},"width":{"nullable":true,"title":"Integer","type":"integer","description":"Width of the output video. Acceptable values vary based on model"},"duration":{"nullable":true,"title":"Integer","type":"integer","description":"Duration of the output video in seconds. Defaults to 8 seconds if not specified. Allowed values: 4, 6, or 8. Supported on models VEO3 and VEO3FAST.","default":8},"elements":{"nullable":true,"title":"Array of Element Inputs","type":"array","items":{"$ref":"#\/components\/schemas\/element_input"},"description":"An array of elements\/loras objects that will be applied sequentially to the output. Elements are only supported for Motion2.0 generations. "}},"type":"object","required":["prompt"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"motionVideoGenerationJob":{"nullable":true,"properties":{"generationId":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"MotionVideoGenerationOutput","type":"object"}}},"example":{"motionVideoGenerationJob":{"generationId":"j9k0l1m2-n3o4-p5q6-rstu-vw8901234567","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/generations-text-to-video"}}}},"\/generations-lcm":{"post":{"tags":["Realtime Canvas"],"summary":"Create LCM Generation","description":"This endpoint will generate a LCM image generation.","operationId":"createLCMGeneration","requestBody":{"content":{"application\/json":{"schema":{"properties":{"imageDataUrl":{"nullable":false,"title":"String","type":"string","description":"Image data used to generate image. In base64 format. Prefix: `data:image\/jpeg;base64,`"},"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate images"},"guidance":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20."},"strength":{"nullable":true,"title":"Float","type":"number","description":"Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1."},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"style":{"$ref":"#\/components\/schemas\/lcm_generation_style"},"steps":{"nullable":true,"title":"Int","type":"integer","description":"The number of steps to use for the generation. Must be between 4 and 16."},"width":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"height":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"seed":{"$ref":"#\/components\/schemas\/seed"}},"type":"object","required":["imageDataUrl","prompt"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"lcmGenerationJob":{"nullable":true,"properties":{"imageDataUrl":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"LcmGenerationOutput","type":"object"}}},"example":{"lcmGenerationJob":{"imageDataUrl":["data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAQEAAAAAAAD..."],"requestTimestamp":"1234567890","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/generations-lcm"}}}},"\/lcm-instant-refine":{"post":{"tags":["Realtime Canvas"],"summary":"Perform instant refine on a LCM image","description":"This endpoint will perform instant refine on a LCM image","operationId":"performInstantRefine","requestBody":{"content":{"application\/json":{"schema":{"properties":{"imageDataUrl":{"nullable":false,"title":"String","type":"string","description":"Image data used to generate image. In base64 format. Prefix: `data:image\/jpeg;base64,`"},"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate images"},"guidance":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20."},"strength":{"nullable":true,"title":"Float","type":"number","description":"Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1."},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"style":{"$ref":"#\/components\/schemas\/lcm_generation_style"},"steps":{"nullable":true,"title":"Int","type":"integer","description":"The number of steps to use for the generation. Must be between 4 and 16."},"width":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"height":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"seed":{"$ref":"#\/components\/schemas\/seed"}},"type":"object","required":["imageDataUrl","prompt"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"lcmGenerationJob":{"nullable":true,"properties":{"imageDataUrl":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"LcmGenerationOutput","type":"object"}}},"example":{"lcmGenerationJob":{"imageDataUrl":["data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAQEAAAAAAAD..."],"requestTimestamp":"1234567891","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/lcm-instant-refine"}}}},"\/lcm-inpainting":{"post":{"tags":["Realtime Canvas"],"summary":"Perform inpainting on a LCM image","description":"This endpoint will perform a inpainting on a LCM image","operationId":"performInpaintingLCM","requestBody":{"content":{"application\/json":{"schema":{"properties":{"imageDataUrl":{"nullable":false,"title":"String","type":"string","description":"Image data used to generate image. In base64 format. Prefix: `data:image\/jpeg;base64,`"},"maskDataUrl":{"nullable":false,"title":"String","type":"string","description":"Image data of the mask layer used for inpainting. In base64 format. Prefix: `data:image\/jpeg;base64,`. Mask should be white on black where generation is applied to the white area."},"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate images"},"guidance":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20."},"strength":{"nullable":true,"title":"Float","type":"number","description":"Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1."},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"style":{"$ref":"#\/components\/schemas\/lcm_generation_style"},"steps":{"nullable":true,"title":"Int","type":"integer","description":"The number of steps to use for the generation. Must be between 4 and 16."},"width":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"height":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"seed":{"$ref":"#\/components\/schemas\/seed"}},"type":"object","required":["imageDataUrl","maskDataUrl","prompt"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"lcmGenerationJob":{"nullable":true,"properties":{"imageDataUrl":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"LcmGenerationOutput","type":"object"}}},"example":{"lcmGenerationJob":{"imageDataUrl":["data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAQEAAAAAAAD..."],"requestTimestamp":"1234567892","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/lcm-inpainting"}}}},"\/lcm-upscale":{"post":{"tags":["Realtime Canvas"],"summary":"Perform Alchemy Upscale on a LCM image","description":"This endpoint will perform Alchemy Upscale on a LCM image","operationId":"performAlchemyUpscaleLCM","requestBody":{"content":{"application\/json":{"schema":{"properties":{"imageDataUrl":{"nullable":false,"title":"String","type":"string","description":"Image data used to generate image. In base64 format. Prefix: `data:image\/jpeg;base64,`"},"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt used to generate images"},"guidance":{"nullable":true,"title":"Float","type":"number","description":"How strongly the generation should reflect the prompt. Must be a float between 0.5 and 20."},"strength":{"nullable":true,"title":"Float","type":"number","description":"Creativity strength of generation. Higher strength will deviate more from the original image supplied in imageDataUrl. Must be a float between 0.1 and 1."},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"style":{"$ref":"#\/components\/schemas\/lcm_generation_style"},"steps":{"nullable":true,"title":"Int","type":"integer","description":"The number of steps to use for the generation. Must be between 4 and 16."},"width":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"height":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024.","default":512},"seed":{"$ref":"#\/components\/schemas\/seed"},"refineCreative":{"nullable":true,"title":"Boolean","type":"boolean","description":"Refine creative"},"refineStrength":{"nullable":true,"title":"Float","type":"number","description":"Must be a float between 0.5 and 0.9."}},"type":"object","required":["imageDataUrl","prompt"]}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"lcmGenerationJob":{"nullable":true,"properties":{"imageDataUrl":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"generationId":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"variationId":{"nullable":false,"title":"Array of Strings","type":"array","items":{"type":"string"}},"generatedImageId":{"nullable":false,"title":"String","type":"string"},"requestTimestamp":{"$ref":"#\/components\/schemas\/timestamp"},"apiCreditCost":{"$ref":"#\/components\/schemas\/apiCreditCost"},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"LcmGenerationOutput","type":"object"}}},"example":{"lcmGenerationJob":{"imageDataUrl":["data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAQEAAAAAAAD..."],"variationId":["var234567-8901-bcde-fghi-jklmnopqrstu"],"generatedImageId":"l1m2n3o4-p5q6-r7s8-tuvw-xy0123456789","requestTimestamp":"1234567893","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/lcm-upscale"}}}},"\/models-3d\/upload":{"post":{"tags":["3D Model Assets"],"summary":"Upload 3D Model","description":"This endpoint returns presigned details to upload a 3D model to S3","operationId":"uploadModelAsset","parameters":[],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"modelExtension":{"nullable":false,"title":"String","type":"string"},"name":{"nullable":true,"title":"String","type":"string"}},"type":"object"}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"uploadModelAsset":{"nullable":true,"properties":{"modelFields":{"nullable":true,"title":"String","type":"string"},"modelId":{"nullable":true,"title":"String","type":"string"},"modelKey":{"nullable":true,"title":"String","type":"string"},"modelUrl":{"nullable":true,"title":"String","type":"string"}},"title":"ModelAssetUploadOutput","type":"object"}}}}},"description":"Responses for POST \/api\/rest\/v1\/models-3d\/upload"}}}},"\/models-3d\/user\/{userId}":{"get":{"tags":["3D Model Assets"],"summary":"Get 3D models by user ID","description":"This endpoint returns all 3D models by a specific user","operationId":"get3DModelsByUserId","parameters":[{"in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"in":"query","name":"limit","schema":{"default":10,"type":"integer"}},{"required":true,"in":"path","name":"userId","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"userId":{"$ref":"#\/components\/schemas\/uuid"}},"type":"object"}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"model_assets":{"items":{"description":"columns and relationships of \"model_assets\"","nullable":false,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"meshUrl":{"nullable":false,"title":"String","type":"string"},"name":{"nullable":true,"title":"String","type":"string"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"},"userId":{"$ref":"#\/components\/schemas\/uuid"}},"title":"model_assets","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/api\/rest\/v1\/models-3d\/user\/{userId}"}}}},"\/models-3d\/{id}":{"get":{"tags":["3D Model Assets"],"summary":"Get 3D Model by ID","description":"This endpoint gets the specific 3D model","operationId":"get3DModelById","parameters":[{"in":"query","name":"offset","schema":{"default":0,"type":"integer"}},{"in":"query","name":"limit","schema":{"default":10,"type":"integer"}},{"required":true,"description":"_\"id\" is required (enter it either in parameters or request body)_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"type":"object"}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"model_assets_by_pk":{"description":"columns and relationships of \"model_assets\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"meshUrl":{"nullable":false,"title":"String","type":"string"},"name":{"nullable":true,"title":"String","type":"string"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"},"userId":{"$ref":"#\/components\/schemas\/uuid"}},"title":"model_assets","type":"object"}}}}},"description":"Responses for GET \/api\/rest\/v1\/models-3d\/{id}"}}},"delete":{"tags":["3D Model Assets"],"summary":"Delete 3D Model by ID","description":"This endpoint deletes the specific 3D Model","operationId":"delete3DModelById","parameters":[{"required":true,"description":"_\"id\" is required (enter it either in parameters or request body)_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"type":"object"}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"delete_model_assets_by_pk":{"description":"columns and relationships of \"model_assets\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"model_assets","type":"object"}}}}},"description":"Responses for DELETE \/api\/rest\/v1\/models-3d\/{id}"}}}},"\/init-image":{"post":{"tags":["Init Images"],"summary":"Upload init image","description":"This endpoint returns presigned details to upload an init image to S3","operationId":"uploadInitImage","requestBody":{"content":{"application\/json":{"schema":{"properties":{"extension":{"nullable":false,"title":"String","type":"string","description":"Has to be png, jpg, jpeg, or webp."}},"required":["extension"],"type":"object"}}},"description":"Query parameters provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploadInitImage":{"nullable":true,"properties":{"fields":{"nullable":true,"title":"String","type":"string"},"id":{"nullable":true,"title":"String","type":"string"},"key":{"nullable":true,"title":"String","type":"string"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"InitImageUploadOutput","type":"object"}}}}},"description":"Responses for POST \/init-image"}}}},"\/media":{"post":{"tags":["Media"],"summary":"Upload media","description":"This endpoint returns presigned POST credentials to upload a video or audio file directly to S3.","operationId":"uploadMedia","requestBody":{"content":{"application\/json":{"schema":{"properties":{"extension":{"nullable":false,"title":"String","type":"string","description":"The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`."},"originalFilename":{"nullable":true,"title":"String","type":"string","description":"Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video."},"teamId":{"nullable":true,"title":"String","type":"string","description":"Optional team UUID. When set, the upload is associated with that team and the caller must be a member."}},"required":["extension"],"type":"object"}}},"description":"Query parameters provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploadMedia":{"nullable":true,"properties":{"uploadId":{"nullable":true,"title":"String","type":"string"},"url":{"nullable":true,"title":"String","type":"string"},"fields":{"nullable":true,"title":"String","type":"string"}},"title":"MediaUploadOutput","type":"object"}}}}},"description":"Responses for POST \/media"}}}},"\/media\/{id}":{"get":{"tags":["Media"],"summary":"Get uploaded media","description":"This endpoint returns details of an uploaded media record","operationId":"getUploadedMediaById","parameters":[{"required":true,"description":"_\"id\" is required_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploaded_media_by_pk":{"nullable":true,"properties":{"id":{"nullable":true,"title":"uuid","type":"string"},"createdAt":{"nullable":true,"title":"timestamp","type":"string"},"url":{"nullable":true,"title":"String","type":"string"},"thumbnailUrl":{"nullable":true,"title":"String","type":"string"},"status":{"nullable":true,"title":"String","type":"string"},"statusReason":{"nullable":true,"title":"String","type":"string"},"mediaType":{"nullable":true,"title":"String","type":"string"},"duration":{"nullable":true,"title":"Float","type":"number"},"width":{"nullable":true,"title":"Int","type":"integer"},"height":{"nullable":true,"title":"Int","type":"integer"},"video_fps":{"nullable":true,"title":"Float","type":"number"}},"title":"uploaded_media","type":"object"}}}}},"description":"Responses for GET \/media\/{id}"}}},"delete":{"tags":["Media"],"summary":"Delete uploaded media","description":"This endpoint deletes an uploaded media record and removes the associated file from S3","operationId":"deleteUploadedMediaById","parameters":[{"required":true,"description":"_\"id\" is required_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_uploaded_media_by_pk":{"nullable":true,"properties":{"id":{"nullable":true,"title":"uuid","type":"string"}},"title":"uploaded_media","type":"object"}}}}},"description":"Responses for DELETE \/media\/{id}"}}}},"\/init-image\/{id}":{"get":{"tags":["Init Images"],"summary":"Get single init image","description":"This endpoint will return a single init image","operationId":"getInitImageById","parameters":[{"required":true,"description":"_\"id\" is required_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"init_images_by_pk":{"description":"columns and relationships of \"init_images\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"url":{"nullable":false,"title":"String","type":"string"}},"title":"init_images","type":"object"}}}}},"description":"Responses for GET \/init-image\/{id}"}}},"delete":{"tags":["Init Images"],"summary":"Delete init image","description":"This endpoint deletes an init image","operationId":"deleteInitImageById","parameters":[{"required":true,"description":"_\"id\" is required_","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_init_images_by_pk":{"description":"columns and relationships of \"init_images\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"init_images","type":"object"}}}}},"description":"Responses for DELETE \/init-image\/{id}"}}}},"\/canvas-init-image":{"post":{"tags":["Init Images"],"summary":"Upload Canvas Editor init and mask image","description":"This endpoint returns presigned details to upload an init image and a mask image to S3","operationId":"uploadCanvasInitImage","requestBody":{"content":{"application\/json":{"schema":{"properties":{"initExtension":{"nullable":false,"title":"String","type":"string","description":"Has to be png, jpg, jpeg, or webp."},"maskExtension":{"nullable":false,"title":"String","type":"string","description":"Has to be png, jpg, jpeg, or webp."}},"required":["initExtension","maskExtension"],"type":"object"}}},"description":"Query parameters provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploadCanvasInitImage":{"nullable":true,"properties":{"initImageId":{"nullable":true,"title":"String","type":"string"},"initFields":{"nullable":true,"title":"String","type":"string"},"initKey":{"nullable":true,"title":"String","type":"string"},"initUrl":{"nullable":true,"title":"String","type":"string"},"maskImageId":{"nullable":true,"title":"String","type":"string"},"maskFields":{"nullable":true,"title":"String","type":"string"},"maskKey":{"nullable":true,"title":"String","type":"string"},"maskUrl":{"nullable":true,"title":"String","type":"string"}},"title":"CanvasInitImageUploadOutput","type":"object"}}}}},"description":"Responses for POST \/canvas-init-image"}}}},"\/variations\/unzoom":{"post":{"tags":["Variation"],"summary":"Create unzoom","description":"This endpoint will create an unzoom variation for the provided image ID","operationId":"createVariationUnzoom","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"nullable":false,"title":"String","type":"string"},"isVariation":{"nullable":true,"title":"Boolean","type":"boolean"}},"type":"object"}}},"description":"Query parameters can also be provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"sdUnzoomJob":{"nullable":true,"properties":{"id":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Unzoom Variation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDUnzoomOutput","type":"object"}}},"example":{"sdUnzoomJob":{"id":"c2d3e4f5-g6h7-8901-ijkl-mn2345678901","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/api\/rest\/v1\/variations\/unzoom"}}}},"\/variations\/upscale":{"post":{"tags":["Variation"],"summary":"Create upscale","description":"This endpoint will create an upscale for the provided image ID","operationId":"createVariationUpscale","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"nullable":false,"title":"String","type":"string"}},"required":["id"],"type":"object"}}},"description":"Query parameters are provided in the request body as a JSON object","required":false},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sdUpscaleJob":{"nullable":true,"properties":{"id":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Upscale Variation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDUpscaleJobOutput","type":"object"}}},"example":{"sdUpscalerjob":{"id":"d3e4f5g6-h7i8-9012-jklm-no3456789012","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/variations\/upscale"}}}},"\/variations\/nobg":{"post":{"tags":["Variation"],"summary":"Create no background","description":"This endpoint will create a no background variation of the provided image ID","operationId":"createVariationNoBG","requestBody":{"content":{"application\/json":{"schema":{"properties":{"id":{"nullable":false,"title":"String","type":"string"},"isVariation":{"nullable":false,"type":"boolean","title":"Boolean"}},"required":["id"],"type":"object"}}},"description":"Query parameters are provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sdNobgJob":{"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for No Background Variation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDUpscaleJobOutput","type":"object"}}},"example":{"sdNobgJob":{"id":"f5g6h7i8-j9k0-l1m2-nopq-rs4567890123","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/variations\/nobg"}}}},"\/variations\/universal-upscaler":{"post":{"tags":["Variation"],"summary":"Create using Universal Upscaler","description":"This endpoint will create a high resolution image using Universal Upscaler","operationId":"CreateUniversalUpscalerJob","requestBody":{"content":{"application\/json":{"schema":{"properties":{"creativityStrength":{"nullable":true,"title":"Int","type":"integer","default":5,"description":"The creativity strength of the universal upscaler. Must be between 1 and 10."},"detailContrast":{"nullable":true,"title":"Int","type":"integer","description":"The detail contrast of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle."},"generatedImageId":{"nullable":true,"title":"String","type":"string","description":"The ID of the generated image."},"initImageId":{"nullable":true,"title":"String","type":"string","description":"The ID of the init image uploaded."},"prompt":{"nullable":true,"title":"String","type":"string","description":"The prompt for the universal upscaler."},"similarity":{"nullable":true,"title":"Int","type":"integer","description":"The similarity of the universal upscaler. Must be between 1 and 10. Can only be used with ultraUpscaleStyle."},"ultraUpscaleStyle":{"$ref":"#\/components\/schemas\/universal_upscaler_ultra_style"},"upscaleMultiplier":{"nullable":true,"title":"Float","type":"number","default":1.5,"description":"The upscale multiplier of the universal upscaler. Must be between 1.0 and 2.0."},"upscalerStyle":{"$ref":"#\/components\/schemas\/universal_upscaler_style"},"variationId":{"nullable":true,"title":"String","type":"string","description":"The ID of the variation image."}},"type":"object"}}},"description":"Query parameters are provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"universalUpscaler":{"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Universal Upscaler Variation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"UniversalUpscalerOutput","type":"object"}}},"example":{"universalUpscaler":{"id":"g6h7i8j9-k0l1-m2n3-opqr-st5678901234","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/variations\/universal-upscaler"}}}},"\/variations\/{id}":{"get":{"tags":["Variation"],"summary":"Get variation by ID","description":"This endpoint will get the variation by ID","operationId":"getVariationById","parameters":[{"required":true,"description":"\"id\" is required","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"generated_image_variation_generic":{"items":{"description":"columns and relationships of \"generated_image_variation_generic\"","nullable":false,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"status":{"$ref":"#\/components\/schemas\/job_status"},"transformType":{"$ref":"#\/components\/schemas\/VARIATION_TYPE"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"generated_image_variation_generic","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/variations\/{id}"}}}},"\/motion-variations\/{id}":{"get":{"tags":["Variation"],"summary":"Get motion variation by ID","description":"This endpoint will get the motion variation by ID","operationId":"getMotionVariationById","parameters":[{"required":true,"description":"\"id\" is required","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"generated_image_variation_motion":{"items":{"description":"columns and relationships of \"generated_image_variation_motion\"","nullable":false,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"status":{"$ref":"#\/components\/schemas\/job_status"},"motionTransformType":{"$ref":"#\/components\/schemas\/MOTION_VARIATION_TYPE"},"resolution":{"$ref":"#\/components\/schemas\/MOTION_RESOLUTION"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"generated_image_variation_motion","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/motion-variations\/{id}"}}}},"\/datasets":{"post":{"tags":["Dataset"],"summary":"Create a Dataset","description":"This endpoint creates a new dataset","operationId":"createDataset","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"nullable":false,"title":"String","type":"string","description":"The name of the dataset."},"description":{"nullable":true,"title":"String","type":"string","description":"A description for the dataset."}},"required":["name"],"type":"object"}}},"description":"Query parameters to be provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"insert_datasets_one":{"description":"columns and relationships of \"datasets\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"datasets","type":"object"}}}}},"description":"Responses for POST \/datasets"}}}},"\/datasets\/{id}":{"get":{"tags":["Dataset"],"summary":"Get a Single Dataset by ID","description":"This endpoint gets the specific dataset","operationId":"getDatasetById","parameters":[{"required":true,"description":"The ID of the dataset to return.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"datasets_by_pk":{"description":"columns and relationships of \"datasets\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"dataset_images":{"items":{"description":"columns and relationships of \"dataset_images\"","nullable":false,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"id":{"$ref":"#\/components\/schemas\/uuid"},"url":{"nullable":false,"title":"String","type":"string"}},"title":"dataset_images","type":"object"},"nullable":false,"type":"array"},"description":{"nullable":true,"title":"String","type":"string"},"id":{"$ref":"#\/components\/schemas\/uuid"},"name":{"nullable":false,"title":"String","type":"string"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"}},"title":"datasets","type":"object"}}}}},"description":"Responses for GET \/datasets\/{id}"}}},"delete":{"tags":["Dataset"],"summary":"Delete a Single Dataset by ID","description":"This endpoint deletes the specific dataset","operationId":"deleteDatasetById","parameters":[{"required":true,"description":"The ID of the dataset to delete.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_datasets_by_pk":{"description":"columns and relationships of \"datasets\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"datasets","type":"object"}}}}},"description":"Responses for DELETE \/datasets\/{id}"}}}},"\/datasets\/{datasetId}\/upload":{"post":{"tags":["Dataset"],"summary":"Upload dataset image","description":"This endpoint returns presigned details to upload a dataset image to S3","operationId":"uploadDatasetImage","parameters":[{"required":true,"description":"_\"datasetId\" is required","in":"path","name":"datasetId","schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"extension":{"nullable":false,"title":"String","type":"string","description":"Has to be png, jpg, jpeg, or webp."}},"required":["extension"],"type":"object"}}},"description":"Query parameters provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploadDatasetImage":{"nullable":true,"properties":{"fields":{"nullable":true,"title":"String","type":"string"},"id":{"nullable":true,"title":"String","type":"string"},"key":{"nullable":true,"title":"String","type":"string"},"url":{"nullable":true,"title":"String","type":"string"}},"title":"DatasetUploadOutput","type":"object"}}}}},"description":"Responses for POST \/datasets\/{datasetId}\/upload"}}}},"\/datasets\/{datasetId}\/upload\/gen":{"post":{"tags":["Dataset"],"summary":"Upload a Single Generated Image to a Dataset","description":"This endpoint will upload a previously generated image to the dataset","operationId":"uploadDatasetImageFromGen","parameters":[{"required":true,"description":"The ID of the dataset to upload the image to.","in":"path","name":"datasetId","schema":{"type":"string"}}],"requestBody":{"content":{"application\/json":{"schema":{"properties":{"generatedImageId":{"nullable":false,"title":"String","type":"string","description":"The ID of the image to upload to the dataset."}},"required":["generatedImageId"],"type":"object"}}},"description":"Query parameters to be provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"uploadDatasetImageFromGen":{"nullable":true,"properties":{"id":{"nullable":true,"title":"String","type":"string"}},"title":"DatasetGenUploadOutput","type":"object"}}}}},"description":"Responses for POST \/datasets\/{datasetId}\/upload\/gen"}}}},"\/models":{"post":{"tags":["Models"],"summary":"Train a Custom Model","description":"This endpoint will train a new custom model","operationId":"createModel","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"nullable":false,"title":"String","type":"string","description":"The name of the model."},"description":{"default":"","nullable":true,"title":"String","type":"string","description":"The description of the model."},"datasetId":{"nullable":false,"title":"String","type":"string","description":"The ID of the dataset to train the model on."},"instance_prompt":{"nullable":false,"title":"String","type":"string","description":"The instance prompt to use during training."},"modelType":{"$ref":"#\/components\/schemas\/custom_model_type"},"nsfw":{"default":false,"nullable":true,"title":"Boolean","type":"boolean","description":"Whether or not the model is NSFW."},"resolution":{"default":512,"nullable":true,"title":"Int","type":"integer","description":"The resolution for training. Must be 512 or 768."},"sd_version":{"nullable":true,"title":"sd_versions","enum":["v1_5","v2"],"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."},"strength":{"$ref":"#\/components\/schemas\/strength"}},"required":["name","datasetId","instance_prompt"],"type":"object"}}},"description":"Query parameters to be provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sdTrainingJob":{"nullable":true,"properties":{"customModelId":{"nullable":false,"title":"String","type":"string"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Model Training. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDTrainingOutput","type":"object"}}},"example":{"sdTrainingJob":{"customModelId":"m2n3o4p5-q6r7-s8t9-uvwx-yz1234567890","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/models"}}}},"\/models\/{id}":{"get":{"tags":["Models"],"summary":"Get a Single Custom Model by ID","description":"This endpoint gets the specific custom model","operationId":"getModelById","parameters":[{"required":true,"description":"The ID of the custom model to return.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"custom_models_by_pk":{"description":"columns and relationships of \"custom_models\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"description":{"nullable":false,"title":"String","type":"string"},"id":{"$ref":"#\/components\/schemas\/uuid"},"instancePrompt":{"nullable":true,"title":"String","type":"string"},"modelHeight":{"nullable":false,"title":"Int","type":"integer"},"modelWidth":{"nullable":false,"title":"Int","type":"integer"},"name":{"nullable":false,"title":"String","type":"string"},"public":{"nullable":false,"title":"Boolean","type":"boolean"},"sdVersion":{"$ref":"#\/components\/schemas\/sd_versions"},"status":{"$ref":"#\/components\/schemas\/job_status"},"type":{"$ref":"#\/components\/schemas\/custom_model_type"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"}},"title":"custom_models","type":"object"}}}}},"description":"Responses for GET \/models\/{id}"}}},"delete":{"tags":["Models"],"summary":"Delete a Single Custom Model by ID","description":"This endpoint will delete a specific custom model","operationId":"deleteModelById","parameters":[{"required":true,"description":"The ID of the model to delete.","in":"path","name":"id","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_custom_models_by_pk":{"description":"columns and relationships of \"custom_models\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"}},"title":"custom_models","type":"object"}}}}},"description":"Responses for DELETE \/models\/{id}"}}}},"\/models\/user\/{userId}":{"get":{"tags":["Models"],"summary":"Get a list of Custom Models by User ID","description":"This endpoint gets the list of custom models belongs to the user.","operationId":"getCustomModelsByUserId","parameters":[{"required":true,"description":"The ID of the user to return.","in":"path","name":"userId","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"custom_models":{"items":{"description":"columns and relationships of \"custom_models\"","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"description":{"nullable":false,"title":"String","type":"string"},"id":{"$ref":"#\/components\/schemas\/uuid"},"instancePrompt":{"nullable":true,"title":"String","type":"string"},"modelHeight":{"nullable":false,"title":"Int","type":"integer"},"modelWidth":{"nullable":false,"title":"Int","type":"integer"},"name":{"nullable":false,"title":"String","type":"string"},"public":{"nullable":false,"title":"Boolean","type":"boolean"},"sdVersion":{"$ref":"#\/components\/schemas\/sd_versions"},"status":{"$ref":"#\/components\/schemas\/job_status"},"type":{"$ref":"#\/components\/schemas\/custom_model_type"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"}},"title":"custom_models","type":"object"},"nullable":true,"type":"array"}}}}},"description":"Responses for GET \/models\/user\/{userId}"}}}},"\/platformModels":{"get":{"tags":["Models"],"parameters":[],"summary":"List Platform Models","description":"Get a list of public Platform Models available for use with generations.","operationId":"listPlatformModels","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"custom_models":{"items":{"description":"columns and relationships of \"custom_models\"","nullable":false,"properties":{"description":{"nullable":false,"title":"String","type":"string"},"featured":{"nullable":false,"title":"Boolean","type":"boolean"},"generated_image":{"description":"columns and relationships of \"generated_images\"","nullable":true,"properties":{"id":{"$ref":"#\/components\/schemas\/uuid"},"url":{"nullable":false,"title":"String","type":"string"}},"title":"generated_images","type":"object"},"id":{"$ref":"#\/components\/schemas\/uuid"},"name":{"nullable":false,"title":"String","type":"string"},"nsfw":{"nullable":false,"title":"Boolean","type":"boolean"}},"title":"custom_models","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/api\/rest\/v1\/platformModels"}}}},"\/elements\/{id}":{"get":{"tags":["Elements"],"summary":"Get a Single Custom Element by ID","description":"This endpoint gets the specific custom element.","operationId":"getElementById","parameters":[{"required":true,"description":"The ID of the custom element to return.","in":"path","name":"id","schema":{"pattern":"[0-9]{*}","type":"integer"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"user_loras_by_pk":{"description":"columns and relationships of \"user_loras\".","nullable":true,"properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"description":{"nullable":false,"title":"String","type":"string"},"id":{"nullable":false,"title":"Int","type":"integer"},"instancePrompt":{"nullable":true,"title":"String","type":"string"},"resolution":{"nullable":false,"title":"Int","type":"integer"},"learningRate":{"nullable":false,"title":"Float","type":"number"},"trainingEpoch":{"nullable":false,"title":"Int","type":"integer"},"name":{"nullable":false,"title":"String","type":"string"},"trainTextEncoder":{"nullable":false,"title":"Boolean","type":"boolean"},"baseModel":{"nullable":false,"title":"String","type":"string"},"status":{"$ref":"#\/components\/schemas\/job_status"},"focus":{"nullable":false,"title":"String","type":"string"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"}},"title":"user_loras","type":"object"}}}}},"description":"Responses for GET \/elements\/{id}."}}},"delete":{"tags":["Elements"],"summary":"Delete a Single Custom Element by ID","description":"This endpoint will delete a specific custom model.","operationId":"deleteElementById","parameters":[{"required":true,"description":"The ID of the element to delete.","in":"path","name":"id","schema":{"pattern":"[0-9]{*}","type":"integer"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"delete_user_loras_by_pk":{"description":"columns and relationships of \"user_loras\".","nullable":true,"properties":{"id":{"nullable":false,"title":"Int","type":"integer"}},"title":"user_loras","type":"object"}}}}},"description":"Responses for DELETE \/models\/{id}"}}}},"\/elements\/user\/{userId}":{"get":{"tags":["Elements"],"summary":"Get a list of Custom Elements by User ID","description":"This endpoint gets the list of custom elements belongs to the user.","operationId":"getCustomElementsByUserId","parameters":[{"required":true,"description":"The ID of the user to return.","in":"path","name":"userId","schema":{"pattern":"[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}","type":"string"}}],"responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"user_loras":{"items":{"description":"columns and relationships of \"user_loras\".","nullable":true,"title":"user_loras","type":"object","properties":{"createdAt":{"$ref":"#\/components\/schemas\/timestamp"},"description":{"nullable":false,"title":"String","type":"string"},"id":{"nullable":false,"title":"Int","type":"integer"},"instancePrompt":{"nullable":true,"title":"String","type":"string"},"resolution":{"nullable":false,"title":"Int","type":"integer"},"learningRate":{"nullable":false,"title":"Float","type":"number"},"trainingEpoch":{"nullable":false,"title":"Int","type":"integer"},"name":{"nullable":false,"title":"String","type":"string"},"trainTextEncoder":{"nullable":false,"title":"Boolean","type":"boolean"},"baseModel":{"nullable":false,"title":"String","type":"string"},"status":{"$ref":"#\/components\/schemas\/job_status"},"focus":{"nullable":false,"title":"String","type":"string"},"updatedAt":{"$ref":"#\/components\/schemas\/timestamp"}}},"nullable":true,"type":"array"}}}}},"description":"Responses for GET \/elements\/user\/{userId}."}}}},"\/elements":{"post":{"tags":["Elements"],"summary":"Train a Custom Element","description":"This endpoint will train a new custom element.","operationId":"createElement","requestBody":{"content":{"application\/json":{"schema":{"properties":{"name":{"default":"placeholder","nullable":false,"title":"String","type":"string","description":"The name of the element."},"description":{"default":"","nullable":true,"title":"String","type":"string","description":"The description of the element."},"datasetId":{"default":"","nullable":false,"title":"String","type":"string","description":"The ID of the dataset to train the element on."},"instance_prompt":{"default":"","nullable":true,"title":"String","type":"string","description":"Use a word that is closely related to what you're training that isn't too common. For example, instead of 'dog,' try something unique like 'jackthedog' or 'magicdonut'. Required for all non-FLUX_DEV models and FLUX_DEV Character model training."},"lora_focus":{"nullable":false,"title":"String","type":"string","description":"The category determines how the element will be trained. Options are 'General' | 'Character' | 'Style' | 'Object'. FLUX_DEV doesn't support General category."},"train_text_encoder":{"default":true,"nullable":false,"title":"Boolean","type":"boolean","description":"Whether or not encode the train text."},"resolution":{"default":1024,"nullable":true,"title":"Int","type":"integer","description":"The resolution for training. Must be 1024."},"sd_version":{"nullable":false,"default":"FLUX_DEV","title":"sd_versions","enum":["SDXL_0_9","SDXL_1_0","LEONARDO_DIFFUSION_XL","LEONARDO_LIGHTNING_XL","VISION_XL","KINO_XL","ALBEDO_XL","FLUX_DEV"],"description":"The base version to use if not using a custom model."},"num_train_epochs":{"nullable":false,"title":"Int","type":"integer","description":"The number of times the entire training dataset is passed through the element.<br><br><table><tr><th>Model Type<\/th><th>Lora Focus<\/th><th>Min<\/th><th>Max<\/th><th>Default<\/th><\/tr><tr><td>Default<\/td><td>General | Style | Character | Object<\/td><td>1<\/td><td>250<\/td><td>100<\/td><\/tr><tr><td rowspan='3'>FLUX_DEV<\/td><td>Style<\/td><td>30<\/td><td>120<\/td><td>60<\/td><\/tr><tr><td>Object<\/td><td>120<\/td><td>220<\/td><td>140<\/td><\/tr><tr><td>Character<\/td><td>100<\/td><td>200<\/td><td>135<\/td><\/tr><tr><td>General<\/td><td colspan='3'>NA<\/td><\/tr><\/table>"},"learning_rate":{"nullable":false,"title":"Float","type":"number","description":"The speed at which the model learns during training.<br><br><table><tr><th>Model Type<\/th><th>Lora Focus<\/th><th>Min<\/th><th>Max<\/th><th>Default<\/th><\/tr><tr><td>Default<\/td><td>General | Style | Character | Object<\/td><td>0.00000001<\/td><td>0.00001<\/td><td>0.000001<\/td><\/tr><tr><td rowspan='3'>FLUX_DEV<\/td><td>Style<\/td><td>0.000001<\/td><td>0.00003<\/td><td>0.00001<\/td><\/tr><tr><td>Object<\/td><td>0.00001<\/td><td>0.001<\/td><td>0.0004<\/td><\/tr><tr><td>Character<\/td><td>0.00001<\/td><td>0.001<\/td><td>0.0005<\/td><\/tr><tr><td>General<\/td><td colspan='3'>NA<\/td><\/tr><\/table>"}},"required":["name","datasetId","lora_focus","sd_version","learning_rate","num_train_epochs","train_text_encoder"],"type":"object"}}},"description":"Query parameters to be provided in the request body as a JSON object.","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"sdTrainingJob":{"nullable":true,"properties":{"userLoraId":{"nullable":false,"title":"Int","type":"integer"},"apiCreditCost":{"nullable":true,"type":"integer","description":"API Credits Cost for Model Training. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"SDTrainingOutput","type":"object"}}},"example":{"sdTrainingJob":{"userLoraId":123456,"apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/elements."}}},"get":{"tags":["Elements"],"summary":"List Elements","description":"Get a list of public Elements available for use with generations.","operationId":"listElements","responses":{"200":{"content":{"application\/json":{"schema":{"properties":{"loras":{"items":{"description":"columns and relationships of \"elements\".","nullable":false,"properties":{"akUUID":{"$ref":"#\/components\/schemas\/lora\/properties\/akUUID"},"baseModel":{"$ref":"#\/components\/schemas\/sd_versions"},"creatorName":{"$ref":"#\/components\/schemas\/lora\/properties\/creatorName"},"description":{"$ref":"#\/components\/schemas\/lora\/properties\/description"},"name":{"$ref":"#\/components\/schemas\/lora\/properties\/name"},"urlImage":{"$ref":"#\/components\/schemas\/lora\/properties\/urlImage"},"weightDefault":{"$ref":"#\/components\/schemas\/lora\/properties\/weightDefault"},"weightMax":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMax"},"weightMin":{"$ref":"#\/components\/schemas\/lora\/properties\/weightMin"}},"title":"loras","type":"object"},"nullable":false,"type":"array"}}}}},"description":"Responses for GET \/api\/rest\/v1\/elements."}}}},"\/prompt\/random":{"post":{"tags":["Prompt"],"summary":"Generate a Random prompt","description":"This endpoint returns a random prompt","operationId":"promptRandom","responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"promptGeneration":{"nullable":false,"properties":{"prompt":{"nullable":false,"title":"String","type":"string","description":"The random prompt generated.","default":"The random prompt generated."},"apiCreditCost":{"nullable":false,"type":"integer","description":"API Credits Cost for Random Prompt Generation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","default":4,"deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"promptGenerationOutput","type":"object"}}},"example":{"promptGeneration":{"prompt":"A majestic dragon soaring through stormy clouds","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/prompt\/random"}}}},"\/prompt\/improve":{"post":{"tags":["Prompt"],"summary":"Improve a Prompt","description":"This endpoint returns a improved prompt","operationId":"promptImprove","requestBody":{"content":{"application\/json":{"schema":{"properties":{"prompt":{"nullable":false,"title":"String","type":"string","description":"The prompt to improve."},"promptInstructions":{"nullable":true,"title":"String","type":"string","description":"The prompt is improved based on the given instructions."},"isVideo":{"type":"boolean","description":"Specifies whether the prompt is for a video generation. Defaults to false (image prompt).","nullable":true,"example":true}},"required":["prompt"],"type":"object"}}},"description":"Query parameters to be provided in the request body as a JSON object","required":true},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"promptGeneration":{"nullable":false,"properties":{"prompt":{"nullable":false,"title":"String","type":"string","description":"The improved prompt.","default":"The improved prompt."},"apiCreditCost":{"nullable":false,"type":"integer","description":"API Credits Cost for Random Prompt Generation. Available for Production API Users. Note: it will be deprecated. Please use the cost instead.","default":4,"deprecated":true},"cost":{"$ref":"#\/components\/schemas\/cost"}},"title":"promptGenerationOutput","type":"object"}}},"example":{"promptGeneration":{"prompt":"A majestic dragon soaring through dramatic stormy clouds, photorealistic, cinematic lighting, 8k ultra detailed","apiCreditCost":null,"cost":{"amount":"0.0147","unit":"DOLLARS"}}}}},"description":"Responses for POST \/prompt\/improve"}}}},"\/pricing-calculator":{"post":{"tags":["Pricing Calculator"],"summary":"Calculating API Cost","description":"This endpoint returns the cost used for generating images using a particular service type.","operationId":"pricingCalculator","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"$ref":"#\/components\/schemas\/pricingCalculatorServices"},"serviceParams":{"nullable":false,"title":"Object","type":"object","description":"Parameters for the service","properties":{"IMAGE_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for IMAGE_GENERATION service","properties":{"imageHeight":{"$ref":"#\/components\/schemas\/imageHeight"},"imageWidth":{"$ref":"#\/components\/schemas\/imageHeight"},"numImages":{"$ref":"#\/components\/schemas\/numImages"},"inferenceSteps":{"nullable":false,"title":"Int","type":"integer","description":"The Step Count to use for the generation. Must be between 10 and 60."},"promptMagic":{"$ref":"#\/components\/schemas\/promptMagicArg"},"promptMagicStrength":{"$ref":"#\/components\/schemas\/promptMagicStrengthArg"},"promptMagicVersion":{"$ref":"#\/components\/schemas\/promptMagicVersionArg"},"alchemyMode":{"nullable":false,"title":"Boolean","type":"boolean","description":"Enable to use Alchemy."},"photoRealMode":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use PhotoReal. Requires enabling alchemy."},"photoRealStrength":{"$ref":"#\/components\/schemas\/photoRealStrengthArg"},"photoRealVersion":{"$ref":"#\/components\/schemas\/photoRealVersion"},"highResolution":{"nullable":false,"title":"Boolean","type":"boolean","description":"Enable to use high resolution."},"loraCount":{"nullable":true,"title":"Int","type":"integer","description":"The number of elements used for the generation."},"isModelCustom":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use custom model."},"controlnetsCost":{"nullable":true,"title":"Int","type":"integer","description":"The total cost of controlnets input."},"isPhoenix":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Phoenix model."},"isSDXL":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use SDXL model."},"isSDXLLightning":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use SDXL Lightning model."},"isUltra":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Ultra mode."},"isFluxSchnell":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Flux Schnell model."},"isFluxDev":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Flux Dev model."},"isFluxKontext":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable to use Flux Kontext model."}}},"FANTASY_AVATAR_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for FANTASY_AVATAR_GENERATION service","properties":{"imageHeight":{"$ref":"#\/components\/schemas\/imageHeight"},"imageWidth":{"$ref":"#\/components\/schemas\/imageHeight"},"numImages":{"$ref":"#\/components\/schemas\/numImages"}}},"MOTION_SVD_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for MOTION_SVD_GENERATION service","properties":{}},"MOTION_VIDEO_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for MOTION_VIDEO_GENERATION service","properties":{"resolution":{"nullable":false,"title":"String","type":"string","description":"The resolution of the video. Must be RESOLUTION_480 or RESOLUTION_720."}}},"VEO3_MOTION_VIDEO_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for VEO3_MOTION_VIDEO_GENERATION service","properties":{"resolution":{"nullable":false,"title":"String","type":"string","enum":["RESOLUTION_720"],"description":"The resolution of the video. Supported resolution for VEO3 is RESOLUTION_720."}}},"LCM_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for LCM_GENERATION service","properties":{"height":{"nullable":true,"title":"Int","type":"integer","description":"The output height of the image. Must be 512, 640 or 1024."},"width":{"nullable":true,"title":"Int","type":"integer","description":"The output width of the image. Must be 512, 640 or 1024."},"instantRefine":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable for instant upscale"},"refine":{"nullable":true,"title":"Boolean","type":"boolean","description":"Enable for normal alchemy upscale"}}},"MODEL_TRAINING":{"nullable":true,"title":"Object","type":"object","description":"Parameters for MODEL_TRAINING service","properties":{"resolution":{"nullable":false,"title":"Int","type":"integer","description":"The resolution for training. Must be 512, 768, or 1024."},"sd_version":{"nullable":true,"title":"sd_version","enum":["FLUX_DEV"],"description":"The model for the training. Can be set to 'FLUX_DEV' for FLUX_DEV specific pricing or can be omitted."},"datasetImageCount":{"nullable":true,"title":"Int","type":"integer","description":"The number of images in the training dataset when sd_version is set to 'FLUX_DEV'. Must be between 1 and 50."}}},"TEXTURE_GENERATION":{"nullable":true,"title":"Object","type":"object","description":"Parameters for TEXTURE_GENERATION service","properties":{"preview":{"nullable":false,"title":"Boolean","type":"boolean"}}},"UNIVERSAL_UPSCALER":{"nullable":true,"title":"Object","type":"object","description":"Parameters for UNIVERSAL_UPSCALER service","properties":{"megapixel":{"nullable":false,"title":"Int","type":"integer","description":"The maximum upscaled image size is 20 megapixels."}}},"UNIVERSAL_UPSCALER_ULTRA":{"nullable":true,"title":"Object","type":"object","description":"Parameters for UNIVERSAL_UPSCALER_ULTRA service","properties":{"inputWidth":{"nullable":false,"title":"Int","type":"integer","description":"The input width of the image."},"inputHeight":{"nullable":false,"title":"Int","type":"integer","description":"The input height of the image."},"upscaleMultiplier":{"nullable":false,"title":"Float","type":"number","description":"The upscale multiplier of the universal upscaler. Must be between 1.00 and 2.00."}}}}}}}}}},"responses":{"200":{"content":{"application\/json":{"schema":{"type":"object","properties":{"calculateProductionApiServiceCost":{"nullable":true,"properties":{"cost":{"nullable":false,"title":"Int","type":"integer","description":"API service cost to generate the image."}},"title":"calculateProductionApiServiceCost","type":"object"}}}}},"description":"Responses for POST \/pricing-calculator"}}}},"\/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,"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 <api_key>`","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}