图像Black Forest Labs新增

FLUX Kontext Pro

使用文本指令编辑图像

model: "flux-kontext-pro"

API 文档代理文档

模式

一个模型ID,支持下列所有模式。您发送的字段决定模式,价格随模式而定。

模式选择方式典型价格
图像编辑image_url
请求示例
{
  "model": "flux-kontext-pro",
  "input": {
    "prompt": "a lighthouse at dusk",
    "image_url": "https://example.com/image.jpg"
  }
}
$0.040
结构控制modecontrol_image_url
请求示例
{
  "model": "flux-kontext-pro",
  "input": {
    "prompt": "a lighthouse at dusk",
    "image_url": "https://example.com/image.jpg",
    "mode": "structure",
    "control_image_url": "https://example.com/image.jpg"
  }
}
$0.050

输入

必需

Prompt

必需

Image to edit. A public https URL, or an upload URL from POST /v1/uploads.

可选
1

Count

可选

Control image (https URL), with mode "structure".

可选

Selects a mode that the other fields cannot: "structure" follows the edges or depth of a control image.

可选

Follow the control image's edges (canny) or its depth.

高级选项 (4)

主要控件之外的提供商设置。保持为空可使用模型的默认值。

可选

Let the model rewrite the prompt for better results.

可选
-

How strictly the model follows the prompt. Higher is more literal.

可选

File format of the result.

可选

Random seed. The same seed and input reproduce the same result.

结果

FLUX Kontext Pro示例输出

该模型的真实结果。运行它可在此处查看您的输出。

curl https://arteza.ai/api/v1/generations \
  -H "Authorization: Bearer $ARTEZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-kontext-pro",
  "input": {
    "prompt": "man with the bycycle"
  }
}'
FLUX Kontext Pro 1FLUX Kontext Pro 2FLUX Kontext Pro 3FLUX Kontext Pro 4FLUX Kontext Pro 5FLUX Kontext Pro 6