@imgly/plugin-ai-image-generation-web 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ export type { EachLabsClient } from './createEachLabsClient';
2
+ export type { EachLabsProviderConfiguration } from './createImageProvider';
3
+ export declare const ASPECT_RATIO_MAP: Record<string, {
4
+ width: number;
5
+ height: number;
6
+ }>;
7
+ export declare function getImageDimensionsFromAspectRatio(aspectRatio: string): {
8
+ width: number;
9
+ height: number;
10
+ };
@@ -0,0 +1,34 @@
1
+ import type CreativeEditorSDK from '@cesdk/cesdk-js';
2
+ import { EachLabsClient } from './createEachLabsClient';
3
+ /**
4
+ * Uploads an image to EachLabs storage if needed.
5
+ * Handles blob: and buffer: URLs by uploading them to EachLabs storage.
6
+ * Regular URLs and data URIs are passed through unchanged.
7
+ *
8
+ * @param client - The EachLabs client instance
9
+ * @param imageUrl - The image URL to process
10
+ * @param cesdk - Optional CE.SDK instance for buffer URL handling
11
+ * @returns The uploaded URL or the original URL if no upload was needed
12
+ */
13
+ export declare function uploadImageInputToEachLabsIfNeeded(client: EachLabsClient, imageUrl?: string, cesdk?: CreativeEditorSDK): Promise<string | undefined>;
14
+ /**
15
+ * Uploads an array of images to EachLabs storage if needed.
16
+ * Used for multi-image inputs like image-to-image generation.
17
+ *
18
+ * @param client - The EachLabs client instance
19
+ * @param imageUrls - Array of image URLs to process
20
+ * @param cesdk - Optional CE.SDK instance for buffer URL handling
21
+ * @returns Array of uploaded URLs
22
+ */
23
+ export declare function uploadImageArrayToEachLabsIfNeeded(client: EachLabsClient, imageUrls?: string[], cesdk?: CreativeEditorSDK): Promise<string[] | undefined>;
24
+ /**
25
+ * @deprecated Use uploadImageInputToEachLabsIfNeeded instead
26
+ * Converts a blob: or buffer: URL to a data URI that EachLabs can accept
27
+ */
28
+ export declare function convertImageUrlForEachLabs(imageUrl?: string, cesdk?: CreativeEditorSDK): Promise<string | undefined>;
29
+ /**
30
+ * @deprecated Use uploadImageArrayToEachLabsIfNeeded instead
31
+ * Converts an array of blob:/buffer: URLs to data URIs for EachLabs.
32
+ * Used for multi-image inputs like image-to-image generation.
33
+ */
34
+ export declare function convertImageUrlArrayForEachLabs(imageUrls?: string[], cesdk?: CreativeEditorSDK): Promise<string[] | undefined>;
@@ -142,7 +142,7 @@ var so=Object.create;var tr=Object.defineProperty;var lo=Object.getOwnPropertyDe
142
142
  `,type:"integer",title:"Seed"}},title:"FluxKontextInput",required:["prompt","image_url"]},FluxProKontextOutput:{"x-fal-order-properties":["images","timings","seed","has_nsfw_concepts","prompt"],type:"object",properties:{prompt:{description:"The prompt used for generating the image.",type:"string",title:"Prompt"},images:{examples:[[{height:1024,url:"https://fal.media/files/tiger/7dSJbIU_Ni-0Zp9eaLsvR_fe56916811d84ac69c6ffc0d32dca151.jpg",width:1024}]],description:"The generated image files info.",type:"array",title:"Images",items:{$ref:"#/components/schemas/fal__toolkit__image__image__Image"}},timings:{additionalProperties:{type:"number"},type:"object",title:"Timings"},has_nsfw_concepts:{description:"Whether the generated images contain NSFW concepts.",type:"array",title:"Has Nsfw Concepts",items:{type:"boolean"}},seed:{description:`
143
143
  Seed of the generated Image. It will be the same value of the one passed in the
144
144
  input or the randomly generated that was used in case none was passed.
145
- `,type:"integer",title:"Seed"}},title:"FluxKontextOutput",required:["images","timings","seed","has_nsfw_concepts","prompt"]},fal__toolkit__image__image__Image:{"x-fal-order-properties":["url","content_type","file_name","file_size","file_data","width","height"],type:"object",description:"Represents an image file.",title:"Image",properties:{file_size:{examples:[4404019],description:"The size of the file in bytes.",type:"integer",title:"File Size"},height:{examples:[1024],description:"The height of the image in pixels.",type:"integer",title:"Height"},url:{description:"The URL where the file can be downloaded from.",type:"string",title:"Url"},width:{examples:[1024],description:"The width of the image in pixels.",type:"integer",title:"Width"},file_name:{examples:["z9RV14K95DvU.png"],description:"The name of the file. It will be auto-generated if not provided.",type:"string",title:"File Name"},content_type:{examples:["image/png"],description:"The mime type of the file.",type:"string",title:"Content Type"},file_data:{format:"binary",description:"File data",type:"string",title:"File Data"}},required:["url"]},FluxProKontextEditInput:{$ref:"#/components/schemas/FluxProKontextInput"}}},paths:{"/fal-ai/flux-pro/kontext/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/flux-pro/kontext/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/flux-pro/kontext":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/flux-pro/kontext/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ma(e){return async({cesdk:t})=>{let i="fal-ai/flux-pro/kontext";return t.i18n.setTranslations({en:{"ly.img.ai.quickAction.styleTransfer":"Change Art Style","ly.img.ai.quickAction.artists":"Painted By",[`panel.${I(i)}.imageSelection`]:"Select Image To Change",[`panel.${i}.imageSelection`]:"Select Image To Change",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Ih(t,e)}}function Ih(e,t){return E({modelKey:"fal-ai/flux-pro/kontext",name:"Flux Pro Kontext",schema:ja,inputReference:"#/components/schemas/FluxProKontextEditInput",cesdk:e,middlewares:t.middlewares,headers:t.headers,supportedQuickActions:{"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})}},getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Fa={openapi:"3.0.4",info:{title:"Queue OpenAPI for fal-ai/flux-pro/kontext/max",version:"1.0.0",description:"","x-fal-metadata":{endpointId:"fal-ai/flux-pro/kontext/max",category:"image-to-image",thumbnailUrl:"https://storage.googleapis.com/fal_cdn/fal/for%20videos-1.jpg",playgroundUrl:"https://fal.ai/models/fal-ai/flux-pro/kontext/max",documentationUrl:"https://fal.ai/models/fal-ai/flux-pro/kontext/max/api"}},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},FluxProKontextMaxInput:{"x-fal-order-properties":["image_url","prompt"],type:"object",properties:{prompt:{examples:["Put a donut next to the flour."],description:"The prompt to generate an image from.",type:"string",title:"Prompt",maxLength:5e3,minLength:3,"x-imgly-builder":{component:"TextArea"}},image_url:{examples:["https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png"],description:"Image prompt for the omni model.",type:"string",title:"Image URL"},seed:{type:"integer",title:"Seed",default:0},guidance_scale:{type:"number",title:"Guidance scale (CFG)",default:3.5},sync_mode:{type:"boolean",title:"Sync Mode",default:!1},num_images:{type:"integer",title:"Num Images",default:1},safety_tolerance:{type:"string",title:"Safety Tolerance",default:"2"},output_format:{type:"string",title:"Output Format",default:"jpeg"},aspect_ratio:{type:"string",title:"Aspect Ratio",default:"1:1"}},title:"FluxKontextMaxInput",required:["prompt","image_url"]},FluxProKontextMaxOutput:{"x-fal-order-properties":["images","timings","seed","has_nsfw_concepts","prompt"],type:"object",properties:{prompt:{description:"The prompt used for generating the image.",type:"string",title:"Prompt"},images:{type:"array",title:"Images",items:{$ref:"#/components/schemas/fal__toolkit__image__image__Image"}},timings:{type:"object",title:"Timings",additionalProperties:{type:"number"}},has_nsfw_concepts:{type:"array",title:"Has Nsfw Concepts",items:{type:"boolean"}},seed:{type:"integer",title:"Seed"}},title:"FluxKontextMaxOutput",required:["images","timings","seed","has_nsfw_concepts","prompt"]},fal__toolkit__image__image__Image:{"x-fal-order-properties":["url","content_type","file_name","file_size","file_data","width","height"],type:"object",description:"Represents an image file.",title:"Image",properties:{file_size:{type:"integer",title:"File Size",examples:[4404019]},height:{type:"integer",title:"Height",examples:[1024]},url:{type:"string",title:"Url"},width:{type:"integer",title:"Width",examples:[1024]},file_name:{type:"string",title:"File Name",examples:["z9RV14K95DvU.png"]},content_type:{type:"string",title:"Content Type",examples:["image/png"]},file_data:{type:"string",format:"binary",title:"File Data"}},required:["url"]},FluxProKontextMaxEditInput:{$ref:"#/components/schemas/FluxProKontextMaxInput"}}},paths:{"/fal-ai/flux-pro/kontext/max":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextMaxInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ra(e){return async({cesdk:t})=>{let i="fal-ai/flux-pro/kontext/max";return t.i18n.setTranslations({en:{"ly.img.ai.quickAction.styleTransfer":"Change Art Style","ly.img.ai.quickAction.artists":"Painted By",[`panel.${I(i)}.imageSelection`]:"Select Image To Change",[`panel.${i}.imageSelection`]:"Select Image To Change",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Sh(t,e)}}function Sh(e,t){return E({modelKey:"fal-ai/flux-pro/kontext/max",name:"Flux Pro Kontext (Max)",schema:Fa,inputReference:"#/components/schemas/FluxProKontextMaxEditInput",cesdk:e,middlewares:t.middlewares,headers:t.headers,supportedQuickActions:{"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})}},getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Na={openapi:"3.0.0",info:{title:"Ideogram V3 API",version:"1.0.0",description:"Ideogram V3 text-to-image generation API"},components:{schemas:{IdeogramV3Input:{title:"IdeogramV3Input",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text description for image generation","x-imgly-builder":{component:"TextArea"}},style:{title:"Style",type:"string",enum:["AUTO","GENERAL","REALISTIC","DESIGN"],default:"AUTO",description:"The style of the generated image","x-imgly-enum-labels":{AUTO:"Auto",GENERAL:"General",REALISTIC:"Realistic",DESIGN:"Design"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Format",default:"square_hd","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},rendering_speed:{title:"Rendering Speed",type:"string",enum:["TURBO","BALANCED","QUALITY"],default:"QUALITY",description:"Speed vs quality tradeoff for generation","x-imgly-enum-labels":{TURBO:"Turbo",BALANCED:"Balanced",QUALITY:"Quality"}},expand_prompt:{title:"Expand Prompt",type:"boolean",default:!0,description:"Use MagicPrompt to enhance the prompt"},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results",minimum:0,maximum:2147483647}},"x-fal-order-properties":["prompt","style","image_size"],required:["prompt"]},IdeogramV3Output:{title:"IdeogramV3Output",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{width:{type:"integer",title:"Width",description:"The width of the generated image",minimum:64,maximum:14142,default:1024},height:{type:"integer",title:"Height",description:"The height of the generated image",minimum:64,maximum:14142,default:1024}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from"},content_type:{title:"Content Type",type:"string",description:"The mime type of the file"},file_name:{title:"File Name",type:"string",description:"The name of the file"},file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes"}},required:["url"]}}}};var Ba={square_hd:{width:1024,height:1024},square:{width:512,height:512},portrait_4_3:{width:768,height:1024},portrait_16_9:{width:576,height:1024},landscape_4_3:{width:1024,height:768},landscape_16_9:{width:1024,height:576}};function za(e){return Ba[e]??Ba.square_hd}function Ua(e){return async({cesdk:t})=>Th(t,e)}function Th(e,t){let i="fal-ai/ideogram/v3";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Ideogram V3",schema:Na,inputReference:"#/components/schemas/IdeogramV3Input",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",getBlockInput:r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??1024,height:r.image_size.height??1024}});let n=za(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var La={openapi:"3.0.0",info:{title:"Ideogram V3 Remix API",version:"1.0.0",description:"Ideogram V3 Remix image-to-image generation API"},components:{schemas:{IdeogramV3RemixInput:{title:"IdeogramV3RemixInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text description for image remix","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Input Image",type:"string",description:"URL of image to remix","x-imgly-builder":{component:"ImageUrl"}},style:{title:"Style",type:"string",enum:["AUTO","GENERAL","REALISTIC","DESIGN"],default:"AUTO",description:"The style of the generated image","x-imgly-enum-labels":{AUTO:"Auto",GENERAL:"General",REALISTIC:"Realistic",DESIGN:"Design"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Format",default:"square_hd","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},rendering_speed:{title:"Rendering Speed",type:"string",enum:["TURBO","BALANCED","QUALITY"],default:"BALANCED",description:"Speed vs quality tradeoff for generation","x-imgly-enum-labels":{TURBO:"Turbo",BALANCED:"Balanced",QUALITY:"Quality"}},strength:{title:"Strength",type:"number",minimum:.01,maximum:1,default:.8,description:"Controls how much the input image influences the remix","x-imgly-builder":{component:"Slider",min:.01,max:1,step:.01}}},"x-fal-order-properties":["image_url","prompt","image_size"],required:["prompt","image_url"]},IdeogramV3RemixOutput:{title:"IdeogramV3RemixOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{width:{type:"integer",title:"Width",description:"The width of the generated image",minimum:64,maximum:14142,default:1024},height:{type:"integer",title:"Height",description:"The height of the generated image",minimum:64,maximum:14142,default:1024}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from"},content_type:{title:"Content Type",type:"string",description:"The mime type of the file"},file_name:{title:"File Name",type:"string",description:"The name of the file"},file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes"}},required:["url"]}}}};var Va={square_hd:{width:1024,height:1024},square:{width:512,height:512},portrait_4_3:{width:768,height:1024},portrait_16_9:{width:576,height:1024},landscape_4_3:{width:1024,height:768},landscape_16_9:{width:1024,height:576}};function Qt(e){return Va[e]??Va.square_hd}function Ka(e){return async({cesdk:t})=>kh(t,e)}function kh(e,t){let i="fal-ai/ideogram/v3/remix";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Ideogram V3 Remix",schema:La,inputReference:"#/components/schemas/IdeogramV3RemixInput",cesdk:e,middleware:t.middlewares??[],headers:t.headers,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.8,image_size:r.image_size??"square_hd"})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.6,image_size:r.image_size??"square_hd"})},"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.7,image_size:r.image_size??"square_hd"})}},getImageSize:r=>typeof r.image_size=="string"?Qt(r.image_size):j(r.image_size)?r.image_size:Qt("square_hd"),getBlockInput:async r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??1024,height:r.image_size.height??1024}});let n=Qt(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var Ga={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},QwenImageEditInput:{title:"QwenImageEditInput",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:3,description:"Text description for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"URL of the source image to edit"},num_images:{type:"integer",title:"Number of Images",description:"Number of images to generate",default:1,minimum:1,maximum:4},image_size:{type:"string",title:"Image Size",description:"Size of the generated image",enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"x-imgly-enum-labels":{square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"}},acceleration:{type:"string",title:"Acceleration",description:"Speed vs quality tradeoff",enum:["none","regular","high"],default:"none","x-imgly-enum-labels":{none:"None (Best Quality)",regular:"Regular (Balanced)",high:"High (Fast)"}},output_format:{type:"string",title:"Output Format",description:"Image output format",enum:["jpeg","png"],default:"png","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}},guidance_scale:{type:"number",title:"Guidance Scale",description:"How closely to follow the prompt",default:4,minimum:0,maximum:20},num_inference_steps:{type:"integer",title:"Inference Steps",description:"Number of denoising steps",default:30,minimum:2,maximum:50},sync_mode:{type:"boolean",title:"Sync Mode",description:"Enable synchronous processing",default:!1},seed:{type:"integer",title:"Seed",description:"Random seed for reproducibility"},negative_prompt:{type:"string",title:"Negative Prompt",description:"What to avoid in the edited image","x-imgly-builder":{component:"TextArea"}},enable_safety_checker:{type:"boolean",title:"Safety Checker",description:"Enable NSFW content detection",default:!0}},"x-fal-order-properties":["image_url","prompt"],required:["prompt","image_url"]},QwenImageEditOutput:{title:"QwenImageEditOutput",type:"object",properties:{images:{type:"array",title:"Images",description:"Generated images",items:{$ref:"#/components/schemas/Image"}},timings:{type:"object",title:"Timings",description:"Processing time metrics",additionalProperties:!0},seed:{type:"integer",title:"Seed",description:"Random seed used for generation"},has_nsfw_concepts:{type:"array",title:"NSFW Detection",description:"NSFW content detection results",items:{type:"boolean"}},prompt:{type:"string",title:"Prompt",description:"Original edit prompt"}},"x-fal-order-properties":["images","seed","has_nsfw_concepts","prompt","timings"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/qwen-image-edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/qwen-image-edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/qwen-image-edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/QwenImageEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/qwen-image-edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/QwenImageEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ha(e){return async({cesdk:t})=>{let i="fal-ai/qwen-image-edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Generate",[`libraries.${I(i)}.history.label`]:"Edited With Qwen"}}),Ph(t,e)}}function Ph(e,t){let i="fal-ai/qwen-image-edit";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Qwen Image Edit",schema:Ga,inputReference:"#/components/schemas/QwenImageEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},middlewares:t.middlewares??t.middleware??[],headers:t.headers,getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Qa={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaInput:{title:"NanoBananaInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"A detailed text description of the desired image","x-imgly-builder":{component:"TextArea"}},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate (1-4)",minimum:1,maximum:4,default:1},sync_mode:{title:"Sync Mode",type:"boolean",description:"Return images as data URIs",default:!1},output_format:{title:"Output Format",type:"string",enum:["jpeg","png"],description:"The output format of the generated image",default:"jpeg","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}}},"x-fal-order-properties":["prompt"],required:["prompt"]},NanoBananaOutput:{title:"NanoBananaOutput",type:"object",properties:{description:{title:"Description",type:"string",description:"Text description of generated image"},images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},"x-fal-order-properties":["description","images"],required:["images"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/nano-banana/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Wa(e){return async({cesdk:t})=>qh(t,e)}function qh(e,t){let i="fal-ai/nano-banana";return e.i18n.setTranslations({en:{[`libraries.${I(i)}.history.label`]:"Generated From Text"}}),E({modelKey:i,name:"Nano Banana",schema:Qa,inputReference:"#/components/schemas/NanoBananaInput",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",supportedQuickActions:{"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt})}},getBlockInput:()=>Promise.resolve({image:{width:1024,height:1024}})},t)}var Ya={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaEditInput:{title:"NanoBananaEditRequest",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:3,description:"The prompt for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"Input image URL for editing"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",minItems:1,maxItems:10},strength:{title:"Edit Strength",type:"number",default:.75,minimum:0,maximum:1,description:"How much to change the image (0.0 = minimal changes, 1.0 = major changes)"},guidance_scale:{title:"Guidance Scale",type:"number",default:7.5,minimum:1,maximum:20,description:"How closely to follow the prompt"},num_inference_steps:{title:"Inference Steps",type:"integer",default:20,minimum:1,maximum:100,description:"Number of denoising steps"},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results"}},"x-fal-order-properties":["image_url","prompt"],required:["prompt"]},NanoBananaEditOutput:{title:"NanoBananaEditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated or edited images"}},"x-fal-order-properties":["images"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/nano-banana/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as Dh}from"@cesdk/cesdk-js";function Za(e){return async({cesdk:t})=>{let i="fal-ai/nano-banana/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),jh(t,e)}}function jh(e,t){let i="fal-ai/nano-banana/edit";return E({modelKey:i,name:"Nano Banana Edit",schema:Ya,inputReference:"#/components/schemas/NanoBananaEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,Dh.Jpeg,{targetHeight:1024,targetWidth:1024});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var Ja={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaProInput:{title:"NanoBananaProInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"A detailed text description of the desired image","x-imgly-builder":{component:"TextArea"}},aspect_ratio:{title:"Aspect Ratio",type:"string",enum:["1:1","3:2","2:3","4:3","3:4","16:9","9:16","21:9","9:21","2.4:1"],description:"The aspect ratio of the generated image",default:"1:1","x-imgly-enum-labels":{"1:1":"Square (1:1)","3:2":"Landscape 3:2","2:3":"Portrait 2:3","4:3":"Landscape 4:3","3:4":"Portrait 3:4","16:9":"Widescreen (16:9)","9:16":"Mobile (9:16)","21:9":"Ultra-Wide (21:9)","9:21":"Ultra-Tall (9:21)","2.4:1":"Cinematic (2.4:1)"}},resolution:{title:"Resolution",type:"string",enum:["1K","2K","4K"],description:"The resolution multiplier for the generated image",default:"1K","x-imgly-enum-labels":{"1K":"1K (Standard)","2K":"2K (High)","4K":"4K (Ultra)"}},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate (1-4)",minimum:1,maximum:4,default:1},sync_mode:{title:"Sync Mode",type:"boolean",description:"Return images as data URIs",default:!1},output_format:{title:"Output Format",type:"string",enum:["jpeg","png"],description:"The output format of the generated image",default:"jpeg","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}}},"x-fal-order-properties":["prompt","aspect_ratio","resolution"],required:["prompt"]},NanoBananaProOutput:{title:"NanoBananaProOutput",type:"object",properties:{description:{title:"Description",type:"string",description:"Text description of generated image"},images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},"x-fal-order-properties":["description","images"],required:["images"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/nano-banana-pro/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana-pro":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};var Fh={"1:1":{width:1024,height:1024,icon:"ratio1by1"},"3:2":{width:1536,height:1024,icon:"ratio4by3"},"2:3":{width:1024,height:1536,icon:"ratio3by4"},"4:3":{width:1536,height:1152,icon:"ratio4by3"},"3:4":{width:1152,height:1536,icon:"ratio3by4"},"16:9":{width:1920,height:1080,icon:"ratio16by9"},"9:16":{width:1080,height:1920,icon:"ratio9by16"},"21:9":{width:2560,height:1080,icon:"ratio16by9"},"9:21":{width:1080,height:2520,icon:"ratio9by16"},"2.4:1":{width:2400,height:1e3,icon:"ratio16by9"}};function Rh(e){let t=e.aspect_ratio??"1:1",i=Fh[t];if(!i)return{width:1024,height:1024};let r=e.resolution??"1K",n=1;switch(r){case"1K":n=1;break;case"2K":n=2;break;case"4K":n=4;break;default:n=1;break}return{width:i.width*n,height:i.height*n}}function Xa(e){return async({cesdk:t})=>Nh(t,e)}function Nh(e,t){let i="fal-ai/nano-banana-pro";return e.i18n.setTranslations({en:{[`libraries.${I(i)}.history.label`]:"Generated From Text"}}),E({modelKey:i,name:"Nano Banana Pro",schema:Ja,inputReference:"#/components/schemas/NanoBananaProInput",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",supportedQuickActions:{"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt})}},getBlockInput:r=>{let n=Rh(r);return Promise.resolve({image:{width:n.width,height:n.height}})}},t)}var eo={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaProEditInput:{title:"NanoBananaProEditRequest",type:"object",properties:{prompt:{maxLength:5e4,type:"string",title:"Prompt",minLength:3,description:"The prompt for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"Input image URL for editing"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",minItems:1,maxItems:10},num_images:{title:"Number of Images",type:"integer",default:1,minimum:1,maximum:4,description:"The number of images to generate"},aspect_ratio:{title:"Aspect Ratio",type:"string",default:"auto",enum:["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"],description:"The aspect ratio of the generated image"},resolution:{title:"Resolution",type:"string",default:"1K",enum:["1K","2K","4K"],description:"The resolution of the image to generate","x-imgly-enum-labels":{"1K":"1K (Standard)","2K":"2K (High)","4K":"4K (Ultra)"}},output_format:{title:"Output Format",type:"string",default:"png",enum:["jpeg","png","webp"],description:"The format of the generated image"},sync_mode:{title:"Sync Mode",type:"boolean",default:!1,description:"If true, media returns as data URI"}},"x-fal-order-properties":["image_url","prompt","resolution"],required:["prompt"]},NanoBananaProEditOutput:{title:"NanoBananaProEditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated or edited images"}},"x-fal-order-properties":["images"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/nano-banana-pro/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana-pro/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as zh}from"@cesdk/cesdk-js";function to(e){return async({cesdk:t})=>{let i="fal-ai/nano-banana-pro/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Uh(t,e)}}function Uh(e,t){let i="fal-ai/nano-banana-pro/edit";return E({modelKey:i,name:"Nano Banana Pro Edit",schema:eo,inputReference:"#/components/schemas/NanoBananaProEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,zh.Jpeg,{targetHeight:1024,targetWidth:1024});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var io={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},SeedreamV4Input:{title:"SeedreamV4TextToImageInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text prompt used to generate the image","x-imgly-builder":{component:"TextArea"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Image Size",default:"square_hd",description:"The size of the generated image","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},num_images:{title:"Number of Images",type:"integer",minimum:1,maximum:6,default:1,description:"Number of separate model generations"},max_images:{title:"Max Images",type:"integer",minimum:1,maximum:6,default:1,description:"Enables multi-image generation"},seed:{title:"Seed",type:"integer",description:"Control image generation randomness"},sync_mode:{title:"Sync Mode",type:"boolean",default:!1,description:"Return media as data URI"},enable_safety_checker:{title:"Enable Safety Checker",type:"boolean",default:!0,description:"Enable safety checking"}},"x-fal-order-properties":["prompt","image_size"],required:["prompt"]},SeedreamV4Output:{title:"SeedreamV4TextToImageOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},"x-fal-order-properties":["images","seed"],required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{height:{maximum:4096,minimum:1024,type:"integer",title:"Height",description:"The height of the generated image.",default:2048},width:{maximum:4096,minimum:1024,type:"integer",title:"Width",description:"The width of the generated image.",default:2048}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4Input"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4Output"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};var Vh={square_hd:{width:2048,height:2048},square:{width:1024,height:1024},portrait_4_3:{width:1536,height:2048},portrait_16_9:{width:1152,height:2048},landscape_4_3:{width:2048,height:1536},landscape_16_9:{width:2048,height:1152}};function ro(e){return Vh[e]||{width:2048,height:2048}}function no(e){return async({cesdk:t})=>Kh(t,e)}function Kh(e,t){let i="fal-ai/bytedance/seedream/v4/text-to-image";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Seedream V4",schema:io,inputReference:"#/components/schemas/SeedreamV4Input",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",getBlockInput:r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??2048,height:r.image_size.height??2048}});let n=ro(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var ao={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},SeedreamV4EditInput:{title:"SeedreamV4EditInput",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:1,description:"Text description for image editing. Describe the changes you want to make to the image.","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"URL of the input image to edit"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",maxItems:10},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate",default:1,minimum:1,maximum:6},image_size:{title:"Image Size",oneOf:[{type:"string",description:"Predefined image size",default:"2048x2048"},{type:"object",properties:{width:{type:"integer",minimum:256,maximum:4096},height:{type:"integer",minimum:256,maximum:4096}},required:["width","height"]}],description:"Size of the generated image. Can be a predefined size string or custom dimensions."},max_images:{title:"Max Images",type:"integer",description:"Maximum number of images to process",default:1,minimum:1,maximum:6},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results"},sync_mode:{title:"Sync Mode",type:"boolean",description:"Whether to return data URI in sync mode",default:!1},enable_safety_checker:{title:"Enable Safety Checker",type:"boolean",description:"Enable safety checker to filter inappropriate content",default:!0}},"x-fal-order-properties":["image_url","prompt"],required:["prompt","image_urls"]},SeedreamV4EditOutput:{title:"SeedreamV4EditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated/edited images"},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},"x-fal-order-properties":["images","seed"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/bytedance/seedream/v4/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4EditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4EditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as Hh}from"@cesdk/cesdk-js";function oo(e){return async({cesdk:t})=>{let i="fal-ai/bytedance/seedream/v4/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Qh(t,e)}}function Qh(e,t){let i="fal-ai/bytedance/seedream/v4/edit";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Seedream V4 Edit",schema:ao,inputReference:"#/components/schemas/SeedreamV4EditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e,propertyKey:"image_url"}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,Hh.Jpeg,{targetHeight:2048,targetWidth:2048});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var Wh={FluxProKontextEdit:Ma,FluxProKontextMaxEdit:Ra,Gemini25FlashImageEdit:qa,GeminiFlash25:Pa,GeminiFlashEdit:Da,IdeogramV3:Ua,IdeogramV3Remix:Ka,QwenImageEdit:Ha,NanoBanana:Wa,NanoBananaEdit:Za,NanoBananaPro:Xa,NanoBananaProEdit:to,Recraft20b:Aa,RecraftV3:Ea,SeedreamV4:no,SeedreamV4Edit:oo},k1=Wh;export{k1 as default};
145
+ `,type:"integer",title:"Seed"}},title:"FluxKontextOutput",required:["images","timings","seed","has_nsfw_concepts","prompt"]},fal__toolkit__image__image__Image:{"x-fal-order-properties":["url","content_type","file_name","file_size","file_data","width","height"],type:"object",description:"Represents an image file.",title:"Image",properties:{file_size:{examples:[4404019],description:"The size of the file in bytes.",type:"integer",title:"File Size"},height:{examples:[1024],description:"The height of the image in pixels.",type:"integer",title:"Height"},url:{description:"The URL where the file can be downloaded from.",type:"string",title:"Url"},width:{examples:[1024],description:"The width of the image in pixels.",type:"integer",title:"Width"},file_name:{examples:["z9RV14K95DvU.png"],description:"The name of the file. It will be auto-generated if not provided.",type:"string",title:"File Name"},content_type:{examples:["image/png"],description:"The mime type of the file.",type:"string",title:"Content Type"},file_data:{format:"binary",description:"File data",type:"string",title:"File Data"}},required:["url"]},FluxProKontextEditInput:{$ref:"#/components/schemas/FluxProKontextInput"}}},paths:{"/fal-ai/flux-pro/kontext/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/flux-pro/kontext/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/flux-pro/kontext":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/flux-pro/kontext/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ma(e){return async({cesdk:t})=>{let i="fal-ai/flux-pro/kontext";return t.i18n.setTranslations({en:{"ly.img.ai.quickAction.styleTransfer":"Change Art Style","ly.img.ai.quickAction.artists":"Painted By",[`panel.${I(i)}.imageSelection`]:"Select Image To Change",[`panel.${i}.imageSelection`]:"Select Image To Change",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Ih(t,e)}}function Ih(e,t){return E({modelKey:"fal-ai/flux-pro/kontext",name:"Flux Pro Kontext",schema:ja,inputReference:"#/components/schemas/FluxProKontextEditInput",cesdk:e,middlewares:t.middlewares,headers:t.headers,supportedQuickActions:{"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})}},getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Fa={openapi:"3.0.4",info:{title:"Queue OpenAPI for fal-ai/flux-pro/kontext/max",version:"1.0.0",description:"","x-fal-metadata":{endpointId:"fal-ai/flux-pro/kontext/max",category:"image-to-image",thumbnailUrl:"https://storage.googleapis.com/fal_cdn/fal/for%20videos-1.jpg",playgroundUrl:"https://fal.ai/models/fal-ai/flux-pro/kontext/max",documentationUrl:"https://fal.ai/models/fal-ai/flux-pro/kontext/max/api"}},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},FluxProKontextMaxInput:{"x-fal-order-properties":["image_url","prompt"],type:"object",properties:{prompt:{examples:["Put a donut next to the flour."],description:"The prompt to generate an image from.",type:"string",title:"Prompt",maxLength:5e3,minLength:3,"x-imgly-builder":{component:"TextArea"}},image_url:{examples:["https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png"],description:"Image prompt for the omni model.",type:"string",title:"Image URL"},seed:{type:"integer",title:"Seed",default:0},guidance_scale:{type:"number",title:"Guidance scale (CFG)",default:3.5},sync_mode:{type:"boolean",title:"Sync Mode",default:!1},num_images:{type:"integer",title:"Num Images",default:1},safety_tolerance:{type:"string",title:"Safety Tolerance",default:"2"},output_format:{type:"string",title:"Output Format",default:"jpeg"},aspect_ratio:{type:"string",title:"Aspect Ratio",default:"1:1"}},title:"FluxKontextMaxInput",required:["prompt","image_url"]},FluxProKontextMaxOutput:{"x-fal-order-properties":["images","timings","seed","has_nsfw_concepts","prompt"],type:"object",properties:{prompt:{description:"The prompt used for generating the image.",type:"string",title:"Prompt"},images:{type:"array",title:"Images",items:{$ref:"#/components/schemas/fal__toolkit__image__image__Image"}},timings:{type:"object",title:"Timings",additionalProperties:{type:"number"}},has_nsfw_concepts:{type:"array",title:"Has Nsfw Concepts",items:{type:"boolean"}},seed:{type:"integer",title:"Seed"}},title:"FluxKontextMaxOutput",required:["images","timings","seed","has_nsfw_concepts","prompt"]},fal__toolkit__image__image__Image:{"x-fal-order-properties":["url","content_type","file_name","file_size","file_data","width","height"],type:"object",description:"Represents an image file.",title:"Image",properties:{file_size:{type:"integer",title:"File Size",examples:[4404019]},height:{type:"integer",title:"Height",examples:[1024]},url:{type:"string",title:"Url"},width:{type:"integer",title:"Width",examples:[1024]},file_name:{type:"string",title:"File Name",examples:["z9RV14K95DvU.png"]},content_type:{type:"string",title:"Content Type",examples:["image/png"]},file_data:{type:"string",format:"binary",title:"File Data"}},required:["url"]},FluxProKontextMaxEditInput:{$ref:"#/components/schemas/FluxProKontextMaxInput"}}},paths:{"/fal-ai/flux-pro/kontext/max":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/FluxProKontextMaxInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ra(e){return async({cesdk:t})=>{let i="fal-ai/flux-pro/kontext/max";return t.i18n.setTranslations({en:{"ly.img.ai.quickAction.styleTransfer":"Change Art Style","ly.img.ai.quickAction.artists":"Painted By",[`panel.${I(i)}.imageSelection`]:"Select Image To Change",[`panel.${i}.imageSelection`]:"Select Image To Change",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Sh(t,e)}}function Sh(e,t){return E({modelKey:"fal-ai/flux-pro/kontext/max",name:"Flux Pro Kontext (Max)",schema:Fa,inputReference:"#/components/schemas/FluxProKontextMaxEditInput",cesdk:e,middlewares:t.middlewares,headers:t.headers,supportedQuickActions:{"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})}},getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Na={openapi:"3.0.0",info:{title:"Ideogram V3 API",version:"1.0.0",description:"Ideogram V3 text-to-image generation API"},components:{schemas:{IdeogramV3Input:{title:"IdeogramV3Input",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text description for image generation","x-imgly-builder":{component:"TextArea"}},style:{title:"Style",type:"string",enum:["AUTO","GENERAL","REALISTIC","DESIGN"],default:"AUTO",description:"The style of the generated image","x-imgly-enum-labels":{AUTO:"Auto",GENERAL:"General",REALISTIC:"Realistic",DESIGN:"Design"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Format",default:"square_hd","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},rendering_speed:{title:"Rendering Speed",type:"string",enum:["TURBO","BALANCED","QUALITY"],default:"QUALITY",description:"Speed vs quality tradeoff for generation","x-imgly-enum-labels":{TURBO:"Turbo",BALANCED:"Balanced",QUALITY:"Quality"}},expand_prompt:{title:"Expand Prompt",type:"boolean",default:!0,description:"Use MagicPrompt to enhance the prompt"},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results",minimum:0,maximum:2147483647}},"x-fal-order-properties":["prompt","style","image_size"],required:["prompt"]},IdeogramV3Output:{title:"IdeogramV3Output",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{width:{type:"integer",title:"Width",description:"The width of the generated image",minimum:64,maximum:14142,default:1024},height:{type:"integer",title:"Height",description:"The height of the generated image",minimum:64,maximum:14142,default:1024}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from"},content_type:{title:"Content Type",type:"string",description:"The mime type of the file"},file_name:{title:"File Name",type:"string",description:"The name of the file"},file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes"}},required:["url"]}}}};var Ba={square_hd:{width:1024,height:1024},square:{width:512,height:512},portrait_4_3:{width:768,height:1024},portrait_16_9:{width:576,height:1024},landscape_4_3:{width:1024,height:768},landscape_16_9:{width:1024,height:576}};function za(e){return Ba[e]??Ba.square_hd}function Ua(e){return async({cesdk:t})=>Th(t,e)}function Th(e,t){let i="fal-ai/ideogram/v3";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Ideogram V3",schema:Na,inputReference:"#/components/schemas/IdeogramV3Input",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",getBlockInput:r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??1024,height:r.image_size.height??1024}});let n=za(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var La={openapi:"3.0.0",info:{title:"Ideogram V3 Remix API",version:"1.0.0",description:"Ideogram V3 Remix image-to-image generation API"},components:{schemas:{IdeogramV3RemixInput:{title:"IdeogramV3RemixInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text description for image remix","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Input Image",type:"string",description:"URL of image to remix","x-imgly-builder":{component:"ImageUrl"}},style:{title:"Style",type:"string",enum:["AUTO","GENERAL","REALISTIC","DESIGN"],default:"AUTO",description:"The style of the generated image","x-imgly-enum-labels":{AUTO:"Auto",GENERAL:"General",REALISTIC:"Realistic",DESIGN:"Design"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Format",default:"square_hd","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},rendering_speed:{title:"Rendering Speed",type:"string",enum:["TURBO","BALANCED","QUALITY"],default:"BALANCED",description:"Speed vs quality tradeoff for generation","x-imgly-enum-labels":{TURBO:"Turbo",BALANCED:"Balanced",QUALITY:"Quality"}},strength:{title:"Strength",type:"number",minimum:.01,maximum:1,default:.8,description:"Controls how much the input image influences the remix","x-imgly-builder":{component:"Slider",min:.01,max:1,step:.01}}},"x-fal-order-properties":["image_url","prompt","image_size"],required:["prompt","image_url"]},IdeogramV3RemixOutput:{title:"IdeogramV3RemixOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{width:{type:"integer",title:"Width",description:"The width of the generated image",minimum:64,maximum:14142,default:1024},height:{type:"integer",title:"Height",description:"The height of the generated image",minimum:64,maximum:14142,default:1024}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from"},content_type:{title:"Content Type",type:"string",description:"The mime type of the file"},file_name:{title:"File Name",type:"string",description:"The name of the file"},file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes"}},required:["url"]}}}};var Va={square_hd:{width:1024,height:1024},square:{width:512,height:512},portrait_4_3:{width:768,height:1024},portrait_16_9:{width:576,height:1024},landscape_4_3:{width:1024,height:768},landscape_16_9:{width:1024,height:576}};function Qt(e){return Va[e]??Va.square_hd}function Ka(e){return async({cesdk:t})=>kh(t,e)}function kh(e,t){let i="fal-ai/ideogram/v3/remix";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Ideogram V3 Remix",schema:La,inputReference:"#/components/schemas/IdeogramV3RemixInput",cesdk:e,middleware:t.middlewares??[],headers:t.headers,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.8,image_size:r.image_size??"square_hd"})},"ly.img.createVariant":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.6,image_size:r.image_size??"square_hd"})},"ly.img.swapBackground":{mapInput:r=>({...r,image_url:r.uri,style:r.style??"AUTO",rendering_speed:r.rendering_speed??"BALANCED",strength:r.strength??.7,image_size:r.image_size??"square_hd"})}},getImageSize:r=>typeof r.image_size=="string"?Qt(r.image_size):j(r.image_size)?r.image_size:Qt("square_hd"),getBlockInput:async r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??1024,height:r.image_size.height??1024}});let n=Qt(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var Ga={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},QwenImageEditInput:{title:"QwenImageEditInput",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:3,description:"Text description for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"URL of the source image to edit"},num_images:{type:"integer",title:"Number of Images",description:"Number of images to generate",default:1,minimum:1,maximum:4},image_size:{type:"string",title:"Image Size",description:"Size of the generated image",enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],"x-imgly-enum-labels":{square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"}},acceleration:{type:"string",title:"Acceleration",description:"Speed vs quality tradeoff",enum:["none","regular","high"],default:"none","x-imgly-enum-labels":{none:"None (Best Quality)",regular:"Regular (Balanced)",high:"High (Fast)"}},output_format:{type:"string",title:"Output Format",description:"Image output format",enum:["jpeg","png"],default:"png","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}},guidance_scale:{type:"number",title:"Guidance Scale",description:"How closely to follow the prompt",default:4,minimum:0,maximum:20},num_inference_steps:{type:"integer",title:"Inference Steps",description:"Number of denoising steps",default:30,minimum:2,maximum:50},sync_mode:{type:"boolean",title:"Sync Mode",description:"Enable synchronous processing",default:!1},seed:{type:"integer",title:"Seed",description:"Random seed for reproducibility"},negative_prompt:{type:"string",title:"Negative Prompt",description:"What to avoid in the edited image","x-imgly-builder":{component:"TextArea"}},enable_safety_checker:{type:"boolean",title:"Safety Checker",description:"Enable NSFW content detection",default:!0}},"x-fal-order-properties":["image_url","prompt"],required:["prompt","image_url"]},QwenImageEditOutput:{title:"QwenImageEditOutput",type:"object",properties:{images:{type:"array",title:"Images",description:"Generated images",items:{$ref:"#/components/schemas/Image"}},timings:{type:"object",title:"Timings",description:"Processing time metrics",additionalProperties:!0},seed:{type:"integer",title:"Seed",description:"Random seed used for generation"},has_nsfw_concepts:{type:"array",title:"NSFW Detection",description:"NSFW content detection results",items:{type:"boolean"}},prompt:{type:"string",title:"Prompt",description:"Original edit prompt"}},"x-fal-order-properties":["images","seed","has_nsfw_concepts","prompt","timings"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/qwen-image-edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/qwen-image-edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/qwen-image-edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/QwenImageEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/qwen-image-edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/QwenImageEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Ha(e){return async({cesdk:t})=>{let i="fal-ai/qwen-image-edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Generate",[`libraries.${I(i)}.history.label`]:"Edited With Qwen"}}),Ph(t,e)}}function Ph(e,t){let i="fal-ai/qwen-image-edit";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Qwen Image Edit",schema:Ga,inputReference:"#/components/schemas/QwenImageEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},middlewares:t.middlewares??t.middleware??[],headers:t.headers,getBlockInput:async r=>{let{width:n,height:a}=await O(r.image_url,e.engine);return Promise.resolve({image:{width:n,height:a}})}},t)}var Qa={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaInput:{title:"NanoBananaInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"A detailed text description of the desired image","x-imgly-builder":{component:"TextArea"}},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate (1-4)",minimum:1,maximum:4,default:1},sync_mode:{title:"Sync Mode",type:"boolean",description:"Return images as data URIs",default:!1},output_format:{title:"Output Format",type:"string",enum:["jpeg","png"],description:"The output format of the generated image",default:"jpeg","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}}},"x-fal-order-properties":["prompt"],required:["prompt"]},NanoBananaOutput:{title:"NanoBananaOutput",type:"object",properties:{description:{title:"Description",type:"string",description:"Text description of generated image"},images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},"x-fal-order-properties":["description","images"],required:["images"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/nano-banana/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};function Wa(e){return async({cesdk:t})=>qh(t,e)}function qh(e,t){let i="fal-ai/nano-banana";return e.i18n.setTranslations({en:{[`libraries.${I(i)}.history.label`]:"Generated From Text"}}),E({modelKey:i,name:"Nano Banana",schema:Qa,inputReference:"#/components/schemas/NanoBananaInput",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",supportedQuickActions:{"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt})}},getBlockInput:()=>Promise.resolve({image:{width:1024,height:1024}})},t)}var Ya={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaEditInput:{title:"NanoBananaEditRequest",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:3,description:"The prompt for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"Input image URL for editing"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",minItems:1,maxItems:10},strength:{title:"Edit Strength",type:"number",default:.75,minimum:0,maximum:1,description:"How much to change the image (0.0 = minimal changes, 1.0 = major changes)"},guidance_scale:{title:"Guidance Scale",type:"number",default:7.5,minimum:1,maximum:20,description:"How closely to follow the prompt"},num_inference_steps:{title:"Inference Steps",type:"integer",default:20,minimum:1,maximum:100,description:"Number of denoising steps"},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results"}},"x-fal-order-properties":["image_url","prompt"],required:["prompt"]},NanoBananaEditOutput:{title:"NanoBananaEditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated or edited images"}},"x-fal-order-properties":["images"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/nano-banana/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as Dh}from"@cesdk/cesdk-js";function Za(e){return async({cesdk:t})=>{let i="fal-ai/nano-banana/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),jh(t,e)}}function jh(e,t){let i="fal-ai/nano-banana/edit";return E({modelKey:i,name:"Nano Banana Edit",schema:Ya,inputReference:"#/components/schemas/NanoBananaEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,Dh.Jpeg,{targetHeight:1024,targetWidth:1024});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var Ja={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaProInput:{title:"NanoBananaProInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"A detailed text description of the desired image","x-imgly-builder":{component:"TextArea"}},aspect_ratio:{title:"Aspect Ratio",type:"string",enum:["1:1","3:2","2:3","4:3","3:4","16:9","9:16","21:9","9:21","2.4:1"],description:"The aspect ratio of the generated image",default:"1:1","x-imgly-enum-labels":{"1:1":"Square (1:1)","3:2":"Landscape 3:2","2:3":"Portrait 2:3","4:3":"Landscape 4:3","3:4":"Portrait 3:4","16:9":"Widescreen (16:9)","9:16":"Mobile (9:16)","21:9":"Ultra-Wide (21:9)","9:21":"Ultra-Tall (9:21)","2.4:1":"Cinematic (2.4:1)"},"x-imgly-enum-icons":{"1:1":"@imgly/plugin/formats/ratio1by1","3:2":"@imgly/plugin/formats/ratio4by3","2:3":"@imgly/plugin/formats/ratio3by4","4:3":"@imgly/plugin/formats/ratio4by3","3:4":"@imgly/plugin/formats/ratio3by4","16:9":"@imgly/plugin/formats/ratio16by9","9:16":"@imgly/plugin/formats/ratio9by16","21:9":"@imgly/plugin/formats/ratio16by9","9:21":"@imgly/plugin/formats/ratio9by16","2.4:1":"@imgly/plugin/formats/ratio16by9"}},resolution:{title:"Resolution",type:"string",enum:["1K","2K","4K"],description:"The resolution multiplier for the generated image",default:"1K","x-imgly-enum-labels":{"1K":"1K (Standard)","2K":"2K (High)","4K":"4K (Ultra)"}},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate (1-4)",minimum:1,maximum:4,default:1},sync_mode:{title:"Sync Mode",type:"boolean",description:"Return images as data URIs",default:!1},output_format:{title:"Output Format",type:"string",enum:["jpeg","png"],description:"The output format of the generated image",default:"jpeg","x-imgly-enum-labels":{jpeg:"JPEG",png:"PNG"}}},"x-fal-order-properties":["prompt","aspect_ratio","resolution"],required:["prompt"]},NanoBananaProOutput:{title:"NanoBananaProOutput",type:"object",properties:{description:{title:"Description",type:"string",description:"Text description of generated image"},images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}}},"x-fal-order-properties":["description","images"],required:["images"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/nano-banana-pro/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana-pro":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};var Fh={"1:1":{width:1024,height:1024,icon:"ratio1by1"},"3:2":{width:1536,height:1024,icon:"ratio4by3"},"2:3":{width:1024,height:1536,icon:"ratio3by4"},"4:3":{width:1536,height:1152,icon:"ratio4by3"},"3:4":{width:1152,height:1536,icon:"ratio3by4"},"16:9":{width:1920,height:1080,icon:"ratio16by9"},"9:16":{width:1080,height:1920,icon:"ratio9by16"},"21:9":{width:2560,height:1080,icon:"ratio16by9"},"9:21":{width:1080,height:2520,icon:"ratio9by16"},"2.4:1":{width:2400,height:1e3,icon:"ratio16by9"}};function Rh(e){let t=e.aspect_ratio??"1:1",i=Fh[t];if(!i)return{width:1024,height:1024};let r=e.resolution??"1K",n=1;switch(r){case"1K":n=1;break;case"2K":n=2;break;case"4K":n=4;break;default:n=1;break}return{width:i.width*n,height:i.height*n}}function Xa(e){return async({cesdk:t})=>Nh(t,e)}function Nh(e,t){let i="fal-ai/nano-banana-pro";return e.i18n.setTranslations({en:{[`libraries.${I(i)}.history.label`]:"Generated From Text"}}),E({modelKey:i,name:"Nano Banana Pro",schema:Ja,inputReference:"#/components/schemas/NanoBananaProInput",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",supportedQuickActions:{"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt})}},getBlockInput:r=>{let n=Rh(r);return Promise.resolve({image:{width:n.width,height:n.height}})}},t)}var eo={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},NanoBananaProEditInput:{title:"NanoBananaProEditRequest",type:"object",properties:{prompt:{maxLength:5e4,type:"string",title:"Prompt",minLength:3,description:"The prompt for image editing","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"Input image URL for editing"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",minItems:1,maxItems:10},num_images:{title:"Number of Images",type:"integer",default:1,minimum:1,maximum:4,description:"The number of images to generate"},aspect_ratio:{title:"Aspect Ratio",type:"string",default:"auto",enum:["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16"],description:"The aspect ratio of the generated image"},resolution:{title:"Resolution",type:"string",default:"1K",enum:["1K","2K","4K"],description:"The resolution of the image to generate","x-imgly-enum-labels":{"1K":"1K (Standard)","2K":"2K (High)","4K":"4K (Ultra)"}},output_format:{title:"Output Format",type:"string",default:"png",enum:["jpeg","png","webp"],description:"The format of the generated image"},sync_mode:{title:"Sync Mode",type:"boolean",default:!1,description:"If true, media returns as data URI"}},"x-fal-order-properties":["image_url","prompt","resolution"],required:["prompt"]},NanoBananaProEditOutput:{title:"NanoBananaProEditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated or edited images"}},"x-fal-order-properties":["images"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/nano-banana-pro/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/nano-banana-pro/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProEditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/nano-banana-pro/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/NanoBananaProEditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as zh}from"@cesdk/cesdk-js";function to(e){return async({cesdk:t})=>{let i="fal-ai/nano-banana-pro/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Uh(t,e)}}function Uh(e,t){let i="fal-ai/nano-banana-pro/edit";return E({modelKey:i,name:"Nano Banana Pro Edit",schema:eo,inputReference:"#/components/schemas/NanoBananaProEditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,zh.Jpeg,{targetHeight:1024,targetWidth:1024});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var io={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},SeedreamV4Input:{title:"SeedreamV4TextToImageInput",type:"object",properties:{prompt:{title:"Prompt",type:"string",description:"Text prompt used to generate the image","x-imgly-builder":{component:"TextArea"}},image_size:{anyOf:[{enum:["square_hd","square","portrait_4_3","portrait_16_9","landscape_4_3","landscape_16_9"],type:"string"},{$ref:"#/components/schemas/ImageSize"}],title:"Image Size",default:"square_hd",description:"The size of the generated image","x-imgly-enum-labels":{ImageSize:"Custom",square_hd:"Square HD",square:"Square",portrait_4_3:"Portrait 4:3",portrait_16_9:"Portrait 16:9",landscape_4_3:"Landscape 4:3",landscape_16_9:"Landscape 16:9"},"x-imgly-enum-icons":{square:"@imgly/plugin/formats/ratio1by1",square_hd:"@imgly/plugin/formats/ratio1by1",portrait_4_3:"@imgly/plugin/formats/ratio3by4",portrait_16_9:"@imgly/plugin/formats/ratio9by16",landscape_4_3:"@imgly/plugin/formats/ratio4by3",landscape_16_9:"@imgly/plugin/formats/ratio16by9",ImageSize:"@imgly/plugin/formats/ratioFree"}},num_images:{title:"Number of Images",type:"integer",minimum:1,maximum:6,default:1,description:"Number of separate model generations"},max_images:{title:"Max Images",type:"integer",minimum:1,maximum:6,default:1,description:"Enables multi-image generation"},seed:{title:"Seed",type:"integer",description:"Control image generation randomness"},sync_mode:{title:"Sync Mode",type:"boolean",default:!1,description:"Return media as data URI"},enable_safety_checker:{title:"Enable Safety Checker",type:"boolean",default:!0,description:"Enable safety checking"}},"x-fal-order-properties":["prompt","image_size"],required:["prompt"]},SeedreamV4Output:{title:"SeedreamV4TextToImageOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/File"}},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},"x-fal-order-properties":["images","seed"],required:["images"]},ImageSize:{title:"ImageSize",type:"object",properties:{height:{maximum:4096,minimum:1024,type:"integer",title:"Height",description:"The height of the generated image.",default:2048},width:{maximum:4096,minimum:1024,type:"integer",title:"Width",description:"The width of the generated image.",default:2048}},"x-fal-order-properties":["width","height"]},File:{title:"File",type:"object",properties:{file_size:{title:"File Size",type:"integer",description:"The size of the file in bytes."},file_name:{title:"File Name",type:"string",description:"The name of the file. It will be auto-generated if not provided."},content_type:{title:"Content Type",type:"string",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},file_data:{format:"binary",title:"File Data",type:"string",description:"File data"}},"x-fal-order-properties":["url","content_type","file_name","file_size","file_data"],required:["url"]}}},paths:{"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4Input"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/text-to-image/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4Output"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};var Vh={square_hd:{width:2048,height:2048},square:{width:1024,height:1024},portrait_4_3:{width:1536,height:2048},portrait_16_9:{width:1152,height:2048},landscape_4_3:{width:2048,height:1536},landscape_16_9:{width:2048,height:1152}};function ro(e){return Vh[e]||{width:2048,height:2048}}function no(e){return async({cesdk:t})=>Kh(t,e)}function Kh(e,t){let i="fal-ai/bytedance/seedream/v4/text-to-image";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Seedream V4",schema:io,inputReference:"#/components/schemas/SeedreamV4Input",middleware:t.middlewares??t.middleware??[],headers:t.headers,userFlow:"placeholder",getBlockInput:r=>{if(j(r.image_size))return Promise.resolve({image:{width:r.image_size.width??2048,height:r.image_size.height??2048}});let n=ro(r.image_size??"square_hd");return Promise.resolve({image:n})}},t)}var ao={openapi:"3.0.0",info:{title:"Fal Queue API",version:"1.0.0",description:"The Fal Queue API."},components:{securitySchemes:{apiKeyAuth:{type:"apiKey",in:"header",name:"Authorization",description:"Fal Key"}},schemas:{QueueStatus:{type:"object",properties:{status:{type:"string",enum:["IN_QUEUE","IN_PROGRESS","COMPLETED"]},request_id:{type:"string",description:"The request id."},response_url:{type:"string",description:"The response url."},status_url:{type:"string",description:"The status url."},cancel_url:{type:"string",description:"The cancel url."},logs:{type:"object",description:"The logs.",additionalProperties:!0},metrics:{type:"object",description:"The metrics.",additionalProperties:!0},queue_position:{type:"integer",description:"The queue position."}},required:["status","request_id"]},SeedreamV4EditInput:{title:"SeedreamV4EditInput",type:"object",properties:{prompt:{maxLength:5e3,type:"string",title:"Prompt",minLength:1,description:"Text description for image editing. Describe the changes you want to make to the image.","x-imgly-builder":{component:"TextArea"}},image_url:{title:"Image URL",type:"string",description:"URL of the input image to edit"},image_urls:{title:"Image URLs",type:"array",items:{type:"string"},description:"Array of input image URLs for editing (up to 10 images)",maxItems:10},num_images:{title:"Number of Images",type:"integer",description:"Number of images to generate",default:1,minimum:1,maximum:6},image_size:{title:"Image Size",oneOf:[{type:"string",description:"Predefined image size",default:"2048x2048"},{type:"object",properties:{width:{type:"integer",minimum:256,maximum:4096},height:{type:"integer",minimum:256,maximum:4096}},required:["width","height"]}],description:"Size of the generated image. Can be a predefined size string or custom dimensions."},max_images:{title:"Max Images",type:"integer",description:"Maximum number of images to process",default:1,minimum:1,maximum:6},seed:{title:"Seed",type:"integer",description:"Random seed for reproducible results"},sync_mode:{title:"Sync Mode",type:"boolean",description:"Whether to return data URI in sync mode",default:!1},enable_safety_checker:{title:"Enable Safety Checker",type:"boolean",description:"Enable safety checker to filter inappropriate content",default:!0}},"x-fal-order-properties":["image_url","prompt"],required:["prompt","image_urls"]},SeedreamV4EditOutput:{title:"SeedreamV4EditOutput",type:"object",properties:{images:{title:"Images",type:"array",items:{$ref:"#/components/schemas/Image"},description:"The generated/edited images"},seed:{title:"Seed",type:"integer",description:"The seed used for generation"}},"x-fal-order-properties":["images","seed"],required:["images"]},Image:{title:"Image",type:"object",properties:{file_size:{anyOf:[{type:"integer"},{type:"null"}],title:"File Size",description:"The size of the file in bytes."},height:{anyOf:[{type:"integer"},{type:"null"}],title:"Height",description:"The height of the image in pixels."},file_name:{anyOf:[{type:"string"},{type:"null"}],title:"File Name",description:"The name of the file. It will be auto-generated if not provided."},content_type:{anyOf:[{type:"string"},{type:"null"}],title:"Content Type",description:"The mime type of the file."},url:{title:"Url",type:"string",description:"The URL where the file can be downloaded from."},width:{anyOf:[{type:"integer"},{type:"null"}],title:"Width",description:"The width of the image in pixels."}},description:"Represents an image file.","x-fal-order-properties":["url","content_type","file_name","file_size","width","height"],required:["url"]}}},paths:{"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}/status":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}},{name:"logs",in:"query",required:!1,schema:{type:"number",description:"Whether to include logs (`1`) in the response or not (`0`)."}}],responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}/cancel":{put:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"The request was cancelled.",content:{"application/json":{schema:{type:"object",properties:{success:{type:"boolean",description:"Whether the request was cancelled successfully."}}}}}}}}},"/fal-ai/bytedance/seedream/v4/edit":{post:{requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4EditInput"}}}},responses:{"200":{description:"The request status.",content:{"application/json":{schema:{$ref:"#/components/schemas/QueueStatus"}}}}}}},"/fal-ai/bytedance/seedream/v4/edit/requests/{request_id}":{get:{parameters:[{name:"request_id",in:"path",required:!0,schema:{type:"string",description:"Request ID"}}],responses:{"200":{description:"Result of the request.",content:{"application/json":{schema:{$ref:"#/components/schemas/SeedreamV4EditOutput"}}}}}}}},servers:[{url:"https://queue.fal.run"}],security:[{apiKeyAuth:[]}]};import{MimeType as Hh}from"@cesdk/cesdk-js";function oo(e){return async({cesdk:t})=>{let i="fal-ai/bytedance/seedream/v4/edit";return t.i18n.setTranslations({en:{[`panel.${I(i)}.imageSelection`]:"Select Image To Edit",[`panel.${i}.imageSelection`]:"Select Image To Edit",[`libraries.${I(i)}.history.label`]:"Generated From Image"}}),Qh(t,e)}}function Qh(e,t){let i="fal-ai/bytedance/seedream/v4/edit";return U(e,"@imgly/plugin/formats",D.Formats),E({modelKey:i,name:"Seedream V4 Edit",schema:ao,inputReference:"#/components/schemas/SeedreamV4EditInput",cesdk:e,supportedQuickActions:{"ly.img.editImage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.swapBackground":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.styleTransfer":{mapInput:r=>({prompt:r.style,image_url:r.uri})},"ly.img.artistTransfer":{mapInput:r=>({prompt:r.artist,image_url:r.uri})},"ly.img.createVariant":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.combineImages":{mapInput:r=>({prompt:r.prompt,image_urls:r.uris,exportFromBlockIds:r.exportFromBlockIds})},"ly.img.remixPage":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})},"ly.img.remixPageWithPrompt":{mapInput:r=>({prompt:r.prompt,image_url:r.uri})}},renderCustomProperty:L.ImageUrl(i,{cesdk:e,propertyKey:"image_url"}),middleware:[async(r,n,a)=>{let o=r;if(r.exportFromBlockIds&&r.exportFromBlockIds.length>0){let s=await Promise.all(r.exportFromBlockIds.map(async d=>{let u=await e.engine.block.export(d,Hh.Jpeg,{targetHeight:2048,targetWidth:2048});return URL.createObjectURL(u)}));o={...r,image_urls:s},delete o.exportFromBlockIds}else r.image_url&&!r.image_urls&&(o={...r,image_urls:[r.image_url]},delete o.image_url);return a(o,n)},...t.middlewares??t.middleware??[]],headers:t.headers,getBlockInput:async r=>{let n=r.image_url;if(!n&&r.image_urls&&r.image_urls.length>0&&(n=r.image_urls[0]),!n)throw new Error("No image URL provided");let{width:a,height:o}=await O(n,e.engine);return Promise.resolve({image:{width:a,height:o}})}},t)}var Wh={FluxProKontextEdit:Ma,FluxProKontextMaxEdit:Ra,Gemini25FlashImageEdit:qa,GeminiFlash25:Pa,GeminiFlashEdit:Da,IdeogramV3:Ua,IdeogramV3Remix:Ka,QwenImageEdit:Ha,NanoBanana:Wa,NanoBananaEdit:Za,NanoBananaPro:Xa,NanoBananaProEdit:to,Recraft20b:Aa,RecraftV3:Ea,SeedreamV4:no,SeedreamV4Edit:oo},k1=Wh;export{k1 as default};
146
146
  /*! Bundled license information:
147
147
 
148
148
  lodash-es/lodash.js: