Flux (Kie.ai) icon

Flux (Kie.ai)

Generate images using Flux and Flux Kontext via Kie.ai API

Image-to-Image

AI-generated

Summary

Transform an input image to a new image based on a textual prompt using the Flux image-to-image models via the Kie.ai API.

Inputs

  • Model (required) — Select the Flux image-to-image model to use, either 'Flux 2 Pro' or 'Flux 2 Flex'.
  • Prompt (required) — Provide the textual prompt that guides how the input image will be transformed.
  • Image URL (required) — URL of the input image to transform.
  • Aspect Ratio — Specify the output image aspect ratio (options: 1:1, 16:9, 9:16, 4:3, 3:4). Defaults to 1:1.
  • Seed — Number seed for deterministic output. Set 0 to use a random seed.
  • Resolution — Output resolution of the generated image, either '1K' or '2K'. Defaults to '1K'.
  • Strength — Degree of transformation applied to the input image, from 0 (no change) to 1 (full change). Defaults to 0.75.
  • Reply URL — Webhook URL that the node will call when the image generation task completes.
  • Reply Ref — Custom reference string to be passed back in the webhook callback.
  • Wait for Completion — Whether to wait and poll for the task completion synchronously (polls every 3 seconds up to 5 minutes). Defaults to true.

Output shape

a single JSON object containing the API response with details of the generated image and task status

If 'Wait for Completion' is true, the output includes the finalized generation result after polling the task until completion or timeout; otherwise, it returns the task creation response immediately. Errors will be thrown on failure unless 'Continue on Fail' is enabled, in which case error messages are output as JSON objects.

Examples

Example 1: Generating a transformed image from a given input image URL with a descriptive prompt

Choose the desired Flux 2 Pro or Flux 2 Flex model, set your textual prompt and input image URL, configure optional parameters like seed, resolution, and strength, and optionally wait for the task to complete to get the final image immediately in the workflow.

Links

Discussion