imagesarrayจำเป็น
Reference image URLs or data URIs, in image 1 through image 10 order. Each must be at least 256 pixels per dimension and at most 4 megapixels. The first controls auto aspect ratio.
bfl/flux-3/editFLUX 3 by Black Forest Labs edits up to 10 reference images from a text instruction, with strong prompt adherence and typography at 512px to 4K resolution tiers.
ลองใช้โมเดล
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"images": [
"https://static.sandbase.ai/examples/569ea553-5e21-4726-8615-1ba33c57e547/input/d1285e69-70ed-44f3-9aab-44a1de9b71f4.png"
],
"prompt": "make the background blue"
}FLUX 3 by Black Forest Labs edits up to 10 reference images from an instruction, with strong prompt adherence and typography at resolution tiers from 512px to 4K.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Text instruction. |
images | image URL[], required | — | Images to edit, Image 1 to Image 10. |
resolution | 512sq / 768sq / 1k / 2k / 4k | 1k | Size tier; sets the per-image rate. |
output_format | jpeg / png | jpeg | Output file format. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | — | Output shape. |
BFL's official per-image tiers: $0.041 for the 512 and 768 square tiers, $0.048 at 1K, $0.10 at 2K, $0.607 at 4K.
| Request | 512sq | 1k | 2k | 4k |
|---|---|---|---|---|
| One image | $0.041 | $0.048 | $0.10 | $0.607 |
Failed runs are not charged.
Other FLUX 3 endpoints: bfl/flux-3/text-to-image, bfl/flux-3/text-to-video, bfl/flux-3/image-to-video.
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน 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-3/edit",
"images": [
"https://storage.googleapis.com/falserverless/example_inputs/flux2_pro_edit_input.png"
],
"prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph.",
"resolution": "1k",
"output_format": "jpeg"
}
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 และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
imagesarrayจำเป็นReference image URLs or data URIs, in image 1 through image 10 order. Each must be at least 256 pixels per dimension and at most 4 megapixels. The first controls auto aspect ratio.
promptstringจำเป็นThe prompt to generate an image from.
resolutionstringOutput resolution tier. 4k can take several minutes.
ค่าเริ่มต้น: "1k"
ค่าที่เป็นไปได้: "512sq", "768sq", "1k", "2k", "4k"
aspect_ratiostringThe aspect ratio of the generated image.
ค่าที่เป็นไปได้: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
output_formatstringThe format of the generated image.
ค่าเริ่มต้น: "jpeg"
ค่าที่เป็นไปได้: "jpeg", "png"
{
"model": "bfl/flux-3/edit",
"images": [
"https://storage.googleapis.com/falserverless/example_inputs/flux2_pro_edit_input.png"
],
"prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph.",
"resolution": "1k",
"output_format": "jpeg"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/569ea553-5e21-4726-8615-1ba33c57e547/output/915964a1-cebf-40ba-b9ed-e7d62de59b4e.jpg"
}
]