Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用
文生图BFL

Flux 3.1 Text to Image

API 文档
bfl/flux-3.1/text-to-image

FLUX 3.1 by Black Forest Labs generates images from a text prompt, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Quality mode is best for typography and fine detail.

试用该模型

Playground

打开 playground
输入
The prompt to generate an image from.
The aspect ratio of the generated image.
Output resolution tier.
高级设置
The format of the generated image.
Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox <fox> sits under a red umbrella <umbrella>`.

Fill in prompt to run

Per run$0.03
结果
示例
  1. 335fcc25-593f-4c89-8df0-0d134647eb6d.jpg
    打开原始文件

示例

选择一个示例,将其输入和结果加载到 playground 中。

  • 输入
    {
      "aspect_ratio": "16:9",
      "bounding_boxes": [
        {
          "box": {
            "x_max": 0.75,
            "x_min": 0.3,
            "y_max": 0.55,
            "y_min": 0.05
          },
          "description": "a large red umbrella",
          "label": "umbrella"
        },
        {
          "box": {
            "x_max": 0.66,
            "x_min": 0.42,
            "y_max": 0.95,
            "y_min": 0.45
          },
          "description": "a red fox sitting, looking at the camera",
          "label": "fox"
        }
      ],
      "prompt": "A red fox <fox> sits under a red umbrella <umbrella> on a rainy cobblestone street at dusk, cinematic photograph"
    }
    打开结果 ↗
  • 输入
    {
      "aspect_ratio": "16:9",
      "prompt": "A minimalist poster for a jazz night: the words \"BLUE NOTE FRIDAYS\" in bold cream letters above a saxophone silhouette, deep navy background, risograph texture"
    }
    打开结果 ↗
  • 输入
    {
      "aspect_ratio": "16:9",
      "prompt": "A red fox leaping over a stream in a pine forest at dawn, low-angle wildlife photograph"
    }
    打开结果 ↗

Flux 3.1 Text to Image

FLUX 3.1 by Black Forest Labs generates images from a text prompt, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Quality mode is best for typography and fine detail.

Fields

FieldTypeDefaultNotes
promptstring, required—Text instruction.
resolution1k2k4k1kSize tier; sets the per-image rate.
aspect_ratio21:916:93:24:35:41:14:53:42:39:16—Output shape.
output_formatjpeg / pngjpegOutput file format.
bounding_boxesobject[]—Optional layout boxes, with (0, 0) at the top-left. Place objects in given regions. Each box has a description, an optional label, and edges {x_min, y_min, x_max, y_max} as 0-1 fractions; Write <label> in the prompt to tie it to a box.

Billing

BFL's official per-image price for FLUX 3.1 Image Quality: $0.03 at 1K, $0.06 at 2K, $0.28 at 4K.

Request1k2k4k
One image$0.03$0.06$0.28

Failed runs are not charged.

Prompting

  • Quote any text that must appear and say where it goes.
  • Name a bounding box in the prompt by its label to control where that object goes.

Limits

  • One output image per request.
  • Maximum output size is 4 MP.

Also on SandBase

Other FLUX 3.1 endpoints: bfl/flux-3.1/edit, bfl/flux-3.1/fast/text-to-image, bfl/flux-3.1/fast/edit. Previous generation: bfl/flux-3/text-to-image, bfl/flux-3/edit.