# inference.flux-kontext.max.img2img.v2

Source: https://docs.prodia.com/job-types/inference-flux-kontext-max-img2img-v2/

The `inference.flux-kontext.max.img2img.v2` job transforms an input image guided by a text prompt using FLUX.1 Kontext Max.

```json
{
    "type": "inference.flux-kontext.max.img2img.v2",
    "config": {
        "prompt": "a serene mountain landscape at golden hour",
        "image": "reference.png"
    }
}
```

Additional configuration:

- `prompt_upsampling` (boolean; default `False`)
- `aspect_ratio` (string)
- `safety_tolerance` (integer; default `2`)
- `seed` (integer)

This job type is also available under its partner alias `inference.partner.flux-kontext.max.img2img.v2`.

## Schema

```json
{
	"type": "object",
	"required": [
		"type",
		"config"
	],
	"properties": {
		"type": {
			"type": "string"
		},
		"config": {
			"type": "object",
			"required": [
				"prompt"
			],
			"properties": {
				"image": {
					"type": "string",
					"format": "filename",
					"example": "input.png",
					"description": "The input image that will be edited."
				},
				"prompt": {
					"type": "string",
					"minLength": 3,
					"maxLength": 4096,
					"examples": [
						"puppies in a cloud, 4k"
					]
				},
				"prompt_upsampling": {
					"description": "Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.",
					"type": "boolean",
					"default": false
				},
				"aspect_ratio": {
					"description": "Aspect Ratio",
					"type": "string",
					"pattern": "^[1-9][0-9]*:[1-9][0-9]*$"
				},
				"safety_tolerance": {
					"description": "Tolerance level for input and output moderation. Between 0 and 2, 0 being most strict, 2 being least strict.",
					"type": "integer",
					"default": 2,
					"minimum": 0,
					"maximum": 2
				},
				"seed": {
					"type": "integer",
					"examples": [
						42,
						531286735183442
					]
				}
			}
		}
	},
	"$schema": "https://json-schema.org/draft/2020-12/schema"
}
```
