ComfyUI Node
Generate or Edit Image · flux-kontext-pro
Generate or Edit Image OpenAPI Specification
Generate or Edit Image · flux-kontext-pro
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
◄promptA serene mountain landscape at sunset with a lake reflecting the orange sky►
◄enableTranslationtrue►
◄aspectRatio16:9►
◄outputFormatjpeg►
◄promptUpsamplingfalse►
◄safetyTolerance2►
◄uploadCnfalse►
◄inputImagehttps://example.com/input-image.jpg►
◄watermarkyour-watermark-id►
◄timeout_seconds1200►
◄callback_url►
CategoryKIE Next/Image/Black Forest Labs/Flux Kontext
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A serene mountain landscape at sunset with a lake reflecting the orange sky | Text prompt describing the desired image or edit. Required for both generation and editing modes. - Should be detailed and specific - For image editing, describe the desired changes - For image generation, describe the complete scene - IMPORTANT: Only English language is supported |
| enableTranslationopt | BOOLEAN | true | Whether to enable automatic translation feature. - Since prompt only supports English, when this parameter is true, the system will automatically translate non-English prompts to English - If your prompt is already in English, you can set this to false - Default value: true |
| aspectRatioopt | COMBO | 16:9 | Output image aspect ratio. You Applicable in both text-to-image generation and image editing modes. For **text-to-image generation** , the output image will follow the specified aspect ratio. For **image editing** , if aspectRatio is provided, the edited image will follow that ratio. If not provided, the image will retain its original aspect ratio. Supported Aspect Ratios: | Ratio | Format Type | Common Use Cases | |-------|-------------|-----------------| | 21:9 | Ultra-wide | Cinematic displays, panoramic views | | 16:9 | Widescreen | HD video, desktop wallpapers | | 4:3 | Standard | Traditional displays, presentations | | 1:1 | Square | Social media posts, profile pictures | | 3:4 | Portrait | Magazine layouts, portrait photos | | 9:16 | Mobile Portrait | Smartphone wallpapers, stories | > Note: Default ratio is "16:9" if not specified. |
| outputFormatopt | COMBO | jpeg | Output image format. |
| promptUpsamplingopt | BOOLEAN | false | - If true, performs upsampling on the prompt - May increase processing time |
| safetyToleranceopt | COMBO | 2 | **For Image Generation Mode:** Moderation level for inputs and outputs. Value ranges from 0 (most strict) to 6 (more permissive). **For Image Editing Mode:** Moderation level for inputs and outputs. Value ranges from 0 (most strict) to 2 (balanced). Default: 2 |
| uploadCnopt | BOOLEAN | false | (Optional) Specifies the server region for image upload. Set to true to use servers in China, false to use non-China servers. Choose based on your geographical location for optimal upload speeds. |
| inputImageopt | STRING | https://example.com/input-image.jpg | URL of the input image for editing mode. Required when editing an existing image. - Must be a valid image URL - Image must be accessible to the API server |
| watermarkopt | STRING | your-watermark-id | Watermark identifier to add to the generated image. - Optional - If provided, a watermark will be added to the output image |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |