black-forest-labs / flux-kontext-dev
Open-weight version of FLUX.1 Kontext
Prediction
black-forest-labs/flux-kontext-devOfficial modelIDstxx1vbb6srma0cqpa7amwfwrrStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Change the car color to red, turn the headlights on
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- jpg
- output_quality
- 80
- num_inference_steps
- 30
{ "prompt": "Change the car color to red, turn the headlights on", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg", "aspect_ratio": "match_input_image", "output_format": "jpg", "output_quality": 80, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Change the car color to red, turn the headlights on", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg", aspect_ratio: "match_input_image", output_format: "jpg", output_quality: 80, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "Change the car color to red, turn the headlights on", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg", "aspect_ratio": "match_input_image", "output_format": "jpg", "output_quality": 80, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "Change the car color to red, turn the headlights on", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg", "aspect_ratio": "match_input_image", "output_format": "jpg", "output_quality": 80, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:02:53.587934Z", "created_at": "2025-06-27T18:02:47.478000Z", "data_removed": false, "error": null, "id": "stxx1vbb6srma0cqpa7amwfwrr", "input": { "prompt": "Change the car color to red, turn the headlights on", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg", "aspect_ratio": "match_input_image", "output_format": "jpg", "output_quality": 80, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 16326\nTotal safe images: 1 out of 1\ngenerate image took 4.09 seconds", "metrics": { "image_count": 1, "predict_time": 4.174059952, "total_time": 6.109934 }, "output": "https://replicate.delivery/xezq/jqLBwXkoF7JSKVMLOeTmUSxSW3fYe4SSEwHHl3Dyq9hb2R2pA/output.jpg", "started_at": "2025-06-27T18:02:49.413874Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-s3sagqprgkqqgfcqn37xe3awdtfzf27os4koqitn3out6ukwgwiq", "get": "https://api.replicate.com/v1/predictions/stxx1vbb6srma0cqpa7amwfwrr", "cancel": "https://api.replicate.com/v1/predictions/stxx1vbb6srma0cqpa7amwfwrr/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelID93sf7b5egsrm80cqpaeshaffewStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Remove the thing from her face
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 80
- num_inference_steps
- 30
{ "prompt": "Remove the thing from her face", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZSEFyKwWspeBToQfG3IVZWhgMG3J0BagA6AmgTQnb0ln85/replicate-prediction-4kdj1m1wddrm80cq315b9tz3f8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Remove the thing from her face", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/N5ZSEFyKwWspeBToQfG3IVZWhgMG3J0BagA6AmgTQnb0ln85/replicate-prediction-4kdj1m1wddrm80cq315b9tz3f8.png", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 80, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "Remove the thing from her face", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZSEFyKwWspeBToQfG3IVZWhgMG3J0BagA6AmgTQnb0ln85/replicate-prediction-4kdj1m1wddrm80cq315b9tz3f8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "Remove the thing from her face", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZSEFyKwWspeBToQfG3IVZWhgMG3J0BagA6AmgTQnb0ln85/replicate-prediction-4kdj1m1wddrm80cq315b9tz3f8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:19:31.809567Z", "created_at": "2025-06-27T18:19:27.750000Z", "data_removed": false, "error": null, "id": "93sf7b5egsrm80cqpaeshaffew", "input": { "prompt": "Remove the thing from her face", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZSEFyKwWspeBToQfG3IVZWhgMG3J0BagA6AmgTQnb0ln85/replicate-prediction-4kdj1m1wddrm80cq315b9tz3f8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 47592\nTotal safe images: 1 out of 1\ngenerate image took 3.93 seconds", "metrics": { "image_count": 1, "predict_time": 4.051407489, "total_time": 4.059567 }, "output": "https://replicate.delivery/xezq/jOwnqUyerFUjXqIbtsPdhmRyow2fKrqeagUwOvDDe24OrksTB/output.webp", "started_at": "2025-06-27T18:19:27.758159Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-uy656bgdlopy2x64a3b5cjzfus66qstvl4aljqkffg6sodwhdceq", "get": "https://api.replicate.com/v1/predictions/93sf7b5egsrm80cqpaeshaffew", "cancel": "https://api.replicate.com/v1/predictions/93sf7b5egsrm80cqpaeshaffew/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelID372tkyerwdrme0cqpaes5tnq6mStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 80
- num_inference_steps
- 30
{ "prompt": "Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZiEfM0ljGjrYvhso7oxzsqNM8ySbn0kNuh0ZWfGRA7BFlk/replicate-prediction-gc3anvmcpnrme0cq31csqrxq18.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/N5ZiEfM0ljGjrYvhso7oxzsqNM8ySbn0kNuh0ZWfGRA7BFlk/replicate-prediction-gc3anvmcpnrme0cq31csqrxq18.png", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 80, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZiEfM0ljGjrYvhso7oxzsqNM8ySbn0kNuh0ZWfGRA7BFlk/replicate-prediction-gc3anvmcpnrme0cq31csqrxq18.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZiEfM0ljGjrYvhso7oxzsqNM8ySbn0kNuh0ZWfGRA7BFlk/replicate-prediction-gc3anvmcpnrme0cq31csqrxq18.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:19:43.098535Z", "created_at": "2025-06-27T18:19:38.595000Z", "data_removed": false, "error": null, "id": "372tkyerwdrme0cqpaes5tnq6m", "input": { "prompt": "Change the background to a beach while keeping the person in the exact same position, scale, and pose. Maintain identical subject placement, camera angle, framing, and perspective. Only replace the environment around them", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZiEfM0ljGjrYvhso7oxzsqNM8ySbn0kNuh0ZWfGRA7BFlk/replicate-prediction-gc3anvmcpnrme0cq31csqrxq18.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 40640\nTotal safe images: 1 out of 1\ngenerate image took 3.95 seconds", "metrics": { "image_count": 1, "predict_time": 4.060608234, "total_time": 4.503535 }, "output": "https://replicate.delivery/xezq/Lj4DEIcRJEKHKNM36XgPZnRoVzqOkGxSeJfBes0s1BoerksTB/output.webp", "started_at": "2025-06-27T18:19:39.037927Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-oombotgyyiezerlfxh7s66nbieteomizbzveywkhvwi4jq25hrva", "get": "https://api.replicate.com/v1/predictions/372tkyerwdrme0cqpaes5tnq6m", "cancel": "https://api.replicate.com/v1/predictions/372tkyerwdrme0cqpaes5tnq6m/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelID6r9ptq0ag1rm80cqpaf81728m4StatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 80
- num_inference_steps
- 40
{ "prompt": "Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZABPLlTRBUpfUertPQzrcgEi3XpEMccOyBiHcv59FaFOKb/replicate-prediction-0dj72zjvj9rma0cq30vbp2htt8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 40 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/N5ZABPLlTRBUpfUertPQzrcgEi3XpEMccOyBiHcv59FaFOKb/replicate-prediction-0dj72zjvj9rma0cq30vbp2htt8.png", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 80, num_inference_steps: 40 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZABPLlTRBUpfUertPQzrcgEi3XpEMccOyBiHcv59FaFOKb/replicate-prediction-0dj72zjvj9rma0cq30vbp2htt8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 40 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZABPLlTRBUpfUertPQzrcgEi3XpEMccOyBiHcv59FaFOKb/replicate-prediction-0dj72zjvj9rma0cq30vbp2htt8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 40 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:19:57.010999Z", "created_at": "2025-06-27T18:19:51.296000Z", "data_removed": false, "error": null, "id": "6r9ptq0ag1rm80cqpaf81728m4", "input": { "prompt": "Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZABPLlTRBUpfUertPQzrcgEi3XpEMccOyBiHcv59FaFOKb/replicate-prediction-0dj72zjvj9rma0cq30vbp2htt8.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 40 }, "logs": "Starting generate image\nUsing seed: 3859\nTotal safe images: 1 out of 1\ngenerate image took 4.77 seconds", "metrics": { "image_count": 1, "predict_time": 5.186928015, "total_time": 5.714999 }, "output": "https://replicate.delivery/xezq/TVtOwU107JKTH1CdfTiGbQhRNaPEgAFbfgkjBdzBEbYNLJ7UA/output.webp", "started_at": "2025-06-27T18:19:51.824071Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-finly3qfbmemvudfplfam66c6kamvikhka7ds64yzsvlzokps7wq", "get": "https://api.replicate.com/v1/predictions/6r9ptq0ag1rm80cqpaf81728m4", "cancel": "https://api.replicate.com/v1/predictions/6r9ptq0ag1rm80cqpaf81728m4/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelIDdkwx23vrqxrm80cqpaf9gx37jrStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- Replace 'Choose joy' with 'Choose Dev'
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 80
- num_inference_steps
- 30
{ "prompt": "Replace 'Choose joy' with 'Choose Dev'", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZZeeLqw3DzqKDOLm7THTrmzETvPL32nRy9EOuHrv4rqXuD/choose-joy.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "Replace 'Choose joy' with 'Choose Dev'", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/N5ZZeeLqw3DzqKDOLm7THTrmzETvPL32nRy9EOuHrv4rqXuD/choose-joy.png", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 80, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "Replace 'Choose joy' with 'Choose Dev'", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZZeeLqw3DzqKDOLm7THTrmzETvPL32nRy9EOuHrv4rqXuD/choose-joy.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "Replace \'Choose joy\' with \'Choose Dev\'", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZZeeLqw3DzqKDOLm7THTrmzETvPL32nRy9EOuHrv4rqXuD/choose-joy.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:20:23.519890Z", "created_at": "2025-06-27T18:20:19.519000Z", "data_removed": false, "error": null, "id": "dkwx23vrqxrm80cqpaf9gx37jr", "input": { "prompt": "Replace 'Choose joy' with 'Choose Dev'", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/N5ZZeeLqw3DzqKDOLm7THTrmzETvPL32nRy9EOuHrv4rqXuD/choose-joy.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 56488\nTotal safe images: 1 out of 1\ngenerate image took 3.93 seconds", "metrics": { "image_count": 1, "predict_time": 3.992157694, "total_time": 4.00089 }, "output": "https://replicate.delivery/xezq/y4rWkvPLD2qzMdRjwhBbSYGNtRlEEj5VOaASAwIk5I15SyOF/output.webp", "started_at": "2025-06-27T18:20:19.527733Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-clmqiagwqnyrn7djg5hrhlvwhgnb6sircdfoywqxpwcz2dxipe5a", "get": "https://api.replicate.com/v1/predictions/dkwx23vrqxrm80cqpaf9gx37jr", "cancel": "https://api.replicate.com/v1/predictions/dkwx23vrqxrm80cqpaf9gx37jr/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelIDzcd4gheby9rmc0cqpaf9mv9q2wStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- remove the car
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 80
- num_inference_steps
- 30
{ "prompt": "remove the car", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/NFl10jqNZNgyedyM3PgoQnURxUFCIXfCoSqvee3eLRt76v5H/fofr_a_photo_of_a_car_--chaos_25_--ar_34_--exp_45_--sref_3585_4af0325a-a60a-41d8-b422-172f6562b0c1_3.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "remove the car", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/pbxt/NFl10jqNZNgyedyM3PgoQnURxUFCIXfCoSqvee3eLRt76v5H/fofr_a_photo_of_a_car_--chaos_25_--ar_34_--exp_45_--sref_3585_4af0325a-a60a-41d8-b422-172f6562b0c1_3.png", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 80, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "remove the car", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/NFl10jqNZNgyedyM3PgoQnURxUFCIXfCoSqvee3eLRt76v5H/fofr_a_photo_of_a_car_--chaos_25_--ar_34_--exp_45_--sref_3585_4af0325a-a60a-41d8-b422-172f6562b0c1_3.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "remove the car", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/NFl10jqNZNgyedyM3PgoQnURxUFCIXfCoSqvee3eLRt76v5H/fofr_a_photo_of_a_car_--chaos_25_--ar_34_--exp_45_--sref_3585_4af0325a-a60a-41d8-b422-172f6562b0c1_3.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:20:44.918527Z", "created_at": "2025-06-27T18:20:40.818000Z", "data_removed": false, "error": null, "id": "zcd4gheby9rmc0cqpaf9mv9q2w", "input": { "prompt": "remove the car", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/pbxt/NFl10jqNZNgyedyM3PgoQnURxUFCIXfCoSqvee3eLRt76v5H/fofr_a_photo_of_a_car_--chaos_25_--ar_34_--exp_45_--sref_3585_4af0325a-a60a-41d8-b422-172f6562b0c1_3.png", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 80, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 26416\nTotal safe images: 1 out of 1\ngenerate image took 3.97 seconds", "metrics": { "image_count": 1, "predict_time": 4.089088038, "total_time": 4.100527 }, "output": "https://replicate.delivery/xezq/uxyhRblkZ166NdzeffBzecLZPv6d39AGc2pXeiMEih6mfSyOF/output.webp", "started_at": "2025-06-27T18:20:40.829439Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-k7hs4rs7jp6iloi6molz7otp7oagwk53sdqw4jmdsmnubvev2hca", "get": "https://api.replicate.com/v1/predictions/zcd4gheby9rmc0cqpaf9mv9q2w", "cancel": "https://api.replicate.com/v1/predictions/zcd4gheby9rmc0cqpaf9mv9q2w/cancel" }, "version": "hidden" }
Prediction
black-forest-labs/flux-kontext-devOfficial modelID6qxmx4rn9nrme0cqpaftdhj5gcStatusSucceededSourceWebTotal durationCreatedInput
- prompt
- change the letters to be gold
- go_fast
- guidance
- 2.5
- aspect_ratio
- match_input_image
- output_format
- webp
- output_quality
- 100
- num_inference_steps
- 30
{ "prompt": "change the letters to be gold", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/xezq/EfZkhjp1Al3SJCaej8o6fFK0QfvmRdWZmOLiDhmic1GjR6qTB/tmp93y1duqi.jpg", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 100, "num_inference_steps": 30 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = { prompt: "change the letters to be gold", go_fast: true, guidance: 2.5, input_image: "https://replicate.delivery/xezq/EfZkhjp1Al3SJCaej8o6fFK0QfvmRdWZmOLiDhmic1GjR6qTB/tmp93y1duqi.jpg", aspect_ratio: "match_input_image", output_format: "webp", output_quality: 100, num_inference_steps: 30 }; const output = await replicate.run("black-forest-labs/flux-kontext-dev", { input }); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "black-forest-labs/flux-kontext-dev", input={ "prompt": "change the letters to be gold", "go_fast": True, "guidance": 2.5, "input_image": "https://replicate.delivery/xezq/EfZkhjp1Al3SJCaej8o6fFK0QfvmRdWZmOLiDhmic1GjR6qTB/tmp93y1duqi.jpg", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 100, "num_inference_steps": 30 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run black-forest-labs/flux-kontext-dev using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "input": { "prompt": "change the letters to be gold", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/xezq/EfZkhjp1Al3SJCaej8o6fFK0QfvmRdWZmOLiDhmic1GjR6qTB/tmp93y1duqi.jpg", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 100, "num_inference_steps": 30 } }' \ https://api.replicate.com/v1/models/black-forest-labs/flux-kontext-dev/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2025-06-27T18:21:03.651349Z", "created_at": "2025-06-27T18:20:59.597000Z", "data_removed": false, "error": null, "id": "6qxmx4rn9nrme0cqpaftdhj5gc", "input": { "prompt": "change the letters to be gold", "go_fast": true, "guidance": 2.5, "input_image": "https://replicate.delivery/xezq/EfZkhjp1Al3SJCaej8o6fFK0QfvmRdWZmOLiDhmic1GjR6qTB/tmp93y1duqi.jpg", "aspect_ratio": "match_input_image", "output_format": "webp", "output_quality": 100, "num_inference_steps": 30 }, "logs": "Starting generate image\nUsing seed: 35432\nTotal safe images: 1 out of 1\ngenerate image took 3.98 seconds", "metrics": { "image_count": 1, "predict_time": 4.046810678, "total_time": 4.054349 }, "output": "https://replicate.delivery/xezq/KAAQgaRLY7obDppnFKf5UIJtnI54MtfvGZNLT1B50jAPMJ7UA/output.webp", "started_at": "2025-06-27T18:20:59.604538Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-twnjba3dz6fel4ze5l75d6kbt564xq45wk3issmvuq47drtzfisq", "get": "https://api.replicate.com/v1/predictions/6qxmx4rn9nrme0cqpaftdhj5gc", "cancel": "https://api.replicate.com/v1/predictions/6qxmx4rn9nrme0cqpaftdhj5gc/cancel" }, "version": "hidden" }
Want to make some of these yourself?
Run this model