> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eden.art/llms.txt
> Use this file to discover all available pages before exploring further.

# Flux Kontext

> Generate an image with the initial image as context or edit the image in accordance with the prompt.

## Overview

Generate an image with the initial image as context or edit the image in accordance with the prompt.

* **Output Type**: image
* **Base Model**: flux-dev
* **Estimated Cost**: (fast ? 4 : 8) \* n\_samples credits
* **Handler**: replicate

## Parameters

### Required Parameters

<ParamField body="prompt" type="string" required>
  Instructions

  <Tip>
    Text description of what you want to generate, or the instruction on how to edit the given image.
  </Tip>

  * Label: Prompt
</ParamField>

<ParamField body="init_image" type="image" required>
  Image reference

  <Tip>
    This is the input or starting image for the generation, or the reference image to base the new image on.
  </Tip>

  * Label: Input image
</ParamField>

<ParamField body="aspect_ratio" type="string" required default="match_input_image">
  Aspect ratio width/height

  <Tip>
    If you are using an init\_image, leave it at the default "match\_input\_image" unless you want to resize the image.
  </Tip>

  * Label: Aspect ratio
  * Options: `match_input_image`, `21:9`, `16:9`, `3:2`, `4:3`, `5:4`, `1:1`, `4:5`, `3:4`, `2:3`, `9:16`, `9:21`
</ParamField>

### Optional Parameters

<ParamField body="seed" type="integer" default="random">
  Set random seed for reproducibility. If blank, will be set to a random value.

  <Tip>
    You should only set this if you want to start from/copy the seed of a previous image. Unless one is specified, you should leave this blank!
  </Tip>

  * Label: Seed
  * Minimum: 0
  * Maximum: 2147483647
</ParamField>

<ParamField body="fast" type="boolean" default={false}>
  Use the fast (pro) model, otherwise use max (high quality but slower)

  * Label: Fast
</ParamField>

<ParamField body="n_samples" type="integer" default={1}>
  Number of samples to generate

  <Tip>
    Will produce n\_samples variations using the same prompt.
  </Tip>

  * Label: Number of samples
  * Minimum: 1
  * Maximum: 4
</ParamField>
