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.
Modell testen
PNG, JPEG, WebP oder GIF · maximal 20 MiB
Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
{
"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"
}Menschliche Präferenz
Elo-Wertungen aus anonymen Direktvergleichen, verglichen mit anderen Bild- und Videomodellen.
Ranglisten aus Artificial Analysis Arena
Arena für Bildbearbeitung: Personen wählen aus zwei Bearbeitungen desselben Bildes und derselben Anweisung die bessere aus, ohne die Modellnamen zu sehen.
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).
Jetzt loslegen
Senden Sie dieses Modell über die 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"Erstellen Sie einen SandBase API-Schlüssel und legen Sie ihn in Ihrer Serverumgebung fest. Alle Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie den Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis und committen Sie ihn nicht in ein Repository.
POST an /v1/run mit dieser Modell-ID und ihren Eingaben. Das obige Anfragebeispiel umfasst Übermittlung und Polling.
Verwenden Sie die zurückgegebene Run-ID zum Polling, bis der Status completed, failed oder timeout ist. Lesen Sie die Ausgabe erst nach completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Übergeben Sie eine öffentlich zugängliche Date-URL im Bild-, Video- oder Audiofeld des Modells. Unterstützte Formate und Limits werden neben jedem Playground-Eingabefeld angezeigt.
Verwenden Sie im Playground bei unterstützten Bildfeldern die Steuerung zum Hochladen oder Ersetzen. Video-URL-Felder akzeptieren ein gehostetes Fahrvideo; sie implizieren keine Unterstützung für Video-Uploads.
seedintegerThe same seed and the same prompt given to the same version of the model will output the same image every time.
imagestringerforderlichThe URL of the image to edit. Max width: 14142px, Max height: 14142px, Timeout: 20s
promptstringerforderlichThe prompt to edit the image.
output_formatstringOutput format
Standard: "jpeg"
Mögliche Werte: "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.
Standard: 2.5
Minimum: 1
Maximum: 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.
Standard: "match_input"
Mögliche Werte: "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.
Standard: 28
Minimum: 10
Maximum: 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
}Ein abgeschlossener Run stellt sein Ergebnis in der Ausgabe bereit. Das Folgende ist das gespeicherte Beispiel des Modells, keine neue Generierung.
[
{
"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"
}
]