Nodes/ComfyUI-KIE-Nodes-Next/Generate or Edit Image · flux-kontext-pro
ComfyUI Node

Generate or Edit Image · flux-kontext-pro

Generate or Edit Image OpenAPI Specification

By felipederosilva·Created 24 days ago·Updated about 11 hours ago· 0
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)

    NameTypeDefaultDescription
    promptSTRINGA serene mountain landscape at sunset with a lake reflecting the orange skyText 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
    enableTranslationoptBOOLEANtrueWhether 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
    aspectRatiooptCOMBO16:9Output 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.
    outputFormatoptCOMBOjpegOutput image format.
    promptUpsamplingoptBOOLEANfalse- If true, performs upsampling on the prompt - May increase processing time
    safetyToleranceoptCOMBO2**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
    uploadCnoptBOOLEANfalse(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.
    inputImageoptSTRINGhttps://example.com/input-image.jpgURL 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
    watermarkoptSTRINGyour-watermark-idWatermark identifier to add to the generated image. - Optional - If provided, a watermark will be added to the output image
    timeout_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    imageIMAGE—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—