# FLUX.2 [klein] 9B — Edit > Image-to-image editing with FLUX.2 [klein] 9B from Black Forest Labs. Precise modifications using natural language descriptions and hex color control. ## Overview - **Endpoint**: `https://api.runflow.io/v1/run/black-forest-labs/flux-2-klein-9b/edit` - **Model ID**: `black-forest-labs/flux-2-klein-9b/edit` - **Provider**: Black Forest Labs - **License**: commercial - **Last Updated**: 2026-04-08 ## Pricing - **Base price**: $0.011/megapixel - **Note**: Per megapixel (input + output) ## Input Schema ### `prompt` (string, required) ### `image_urls` (array, required) ### `seed` (integer, optional) ### `num_inference_steps` (integer, optional) - **Default**: `4` ### `image_size` (string, optional) ### `num_images` (integer, optional) - **Default**: `1` ### `sync_mode` (boolean, optional) - **Default**: `false` ### `enable_safety_checker` (boolean, optional) - **Default**: `true` ### `output_format` (string, optional) - **Default**: `png` - **Options**: `jpeg`, `png`, `webp` ## Usage Examples ### cURL ```bash curl -X POST https://api.runflow.io/v1/run/black-forest-labs/flux-2-klein-9b/edit \ -H "Authorization: Bearer $RUNFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A professional headshot, soft studio lighting", "output_format": "png" }' ``` ### Python ```python import requests response = requests.post( "https://api.runflow.io/v1/run/black-forest-labs/flux-2-klein-9b/edit", headers={"Authorization": "Bearer RUNFLOW_API_KEY"}, json={ "prompt": "A professional headshot, soft studio lighting", "output_format": "png", }, ) data = response.json() print(data["images"][0]["url"]) ``` ### JavaScript ```javascript const response = await fetch( "https://api.runflow.io/v1/run/black-forest-labs/flux-2-klein-9b/edit", { method: "POST", headers: { "Authorization": "Bearer RUNFLOW_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "A professional headshot, soft studio lighting", output_format: "png", }), } ); const data = await response.json(); console.log(data.images[0].url); ``` ## Additional Resources - [Playground](https://www.runflow.io/models/black-forest-labs/flux-2-klein-9b/edit) - [API Reference](https://www.runflow.io/models/black-forest-labs/flux-2-klein-9b/edit/api) - [Documentation](https://www.runflow.io/docs)