seedinteger
The same seed and the same prompt given to the same version of the model will output the same image every time.
bfl/flux-2/kontext/devFlux 2 Kontext Dev by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.
model को आज़माएँ
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"image": "https://static.sandbase.ai/examples/d4b6c66d-af5e-4af7-9d4e-4d82e9f249ac/input/8fde3e25-c086-4505-bd6d-4b7c824136b5.webp",
"prompt": "Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting"
}मानवीय पसंद
ब्लाइंड साइड-बाय-साइड वोटों से प्राप्त Elo रेटिंग, अन्य इमेज और वीडियो मॉडलों से तुलना में।
रैंकिंग का स्रोत Artificial Analysis Arena
इमेज-एडिटिंग Arena: लोग एक ही छवि और निर्देश के दो संपादनों में से बेहतर चुनते हैं, मॉडल नाम देखे बिना।
FLUX.1 Kontext [dev] edits a single image from an instruction: change objects, text, or style while keeping the rest consistent.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text instruction. |
image | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
guidance_scale | number 1–20 | 2.5 | How strictly to follow the prompt. |
num_inference_steps | integer 10–50 | 28 | More steps add detail and time. |
output_format | jpeg / png | jpeg | Output file format. |
resolution_mode | auto / match_input / 1:1 / 16:9 / 21:9 / 3:2 / 2:3 / 4:5 / 5:4 / 3:4 / 4:3 / 9:16 / 9:21 | match_input | match_input keeps the input size; or choose a ratio. |
seed | integer | random | Fix it to compare prompt changes. |
$0.025 per image.
| Request | Price |
|---|---|
| One image | $0.025 |
Failed runs are not charged.
Related: bfl/flux-2/dev/edit (FLUX.2, multi-image).
बिल्डिंग शुरू करें
इस model को SandBase Unified Run API के माध्यम से सबमिट करें।
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "bfl/flux-2/kontext/dev",
"image": "https://static.sandbase.ai/examples/bfl/flux-2/kontext/dev/input_image_0.webp",
"prompt": "Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting",
"output_format": "jpeg",
"guidance_scale": 2.5,
"resolution_mode": "match_input",
"num_inference_steps": 28
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
seedintegerThe same seed and the same prompt given to the same version of the model will output the same image every time.
imagestringआवश्यकThe URL of the image to edit. Max width: 14142px, Max height: 14142px, Timeout: 20s
promptstringआवश्यकThe prompt to edit the image.
output_formatstringOutput format
डिफ़ॉल्ट: "jpeg"
संभावित मान: "jpeg", "png"
guidance_scalenumberThe CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
डिफ़ॉल्ट: 2.5
न्यूनतम: 1
अधिकतम: 20
resolution_modestringDetermines how the output resolution is set for image editing. - `auto`: The model selects an optimal resolution from a predefined set that best matches the input image's aspect ratio. This is the recommended setting for most use cases as it's what the model was trained on. - `match_input`: The model will attempt to use the same resolution as the input image. The resolution will be adjusted to be compatible with the model's requirements (e.g. dimensions must be multiples of 16 and within supported limits). Apart from these, a few aspect ratios are also supported.
डिफ़ॉल्ट: "match_input"
संभावित मान: "auto", "match_input", "1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"
num_inference_stepsintegerThe number of inference steps to perform.
डिफ़ॉल्ट: 28
न्यूनतम: 10
अधिकतम: 50
{
"model": "bfl/flux-2/kontext/dev",
"image": "https://static.sandbase.ai/examples/bfl/flux-2/kontext/dev/input_image_0.webp",
"prompt": "Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting",
"output_format": "jpeg",
"guidance_scale": 2.5,
"resolution_mode": "match_input",
"num_inference_steps": 28
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"source": "BFL/FLUX schema mirror",
"source_url": "https://docs.bfl.ai/flux_2/flux2_overview",
"url": "https://static.sandbase.ai/examples/d4b6c66d-af5e-4af7-9d4e-4d82e9f249ac/output/4f32256b-22fa-4ee3-8a38-31d0fa466211.jpeg"
}
]