跳转到内容

Bria Expand (FIBO-Edit-1.5)

集成

模型 id bria/fibo-edit-1.5/expand
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/bria/fibo-edit-1.5/expand?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此请求: $0.04 40 API 积分 · ≈ ₽4.30 在此页面运行

获取 API 密钥
Bria AI 图像编辑 #image-expansion#outpainting#aspect-ratio#canvas-extension

将图像扩展为新宽高比或自定义画布的扩图工具,面积低于25百万像素

Bria AI · 图像

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

对新增区域内容的可选描述。普通画布调整通常不需要描述:省略后会要求模型仅扩展现有图像。

•必填 image_url
拖放文件,或

用于扩展的图像,以文件或 URL 形式提供。

aspect_ratio

最终图像比例设置,使原始图像居中并扩展周围画布。指定后优先于 'original_image_size' 和 'original_image_location'。

高级 negative_prompt · seed · retain_original_quality · preserve_alpha · return_model_output · canvas_size · original_image_size · original_image_location

针对为 SDXL 扩展 API 路由编写的请求进行兼容性检查:提供此不受支持的输入会触发明确拒绝,以防其值被静默丢弃。请改用 'prompt'。

随机生成种子。无论在此提供还是省略后随机选择,都会始终包含在响应中。使用之前响应中的值可以重建其结果。

与 'original_image_location' 配对的扩展图像尺寸。指定最终画布的 [width, height],其面积必须小于 25 百万像素。

原始图像在画布中的目标 [width, height]。提供 'aspect_ratio' 时会覆盖此设置;否则会先将图像调整为这些尺寸再放置。

原始图像左上角的放置坐标 [x, y];提供 'aspect_ratio' 时忽略。允许超出画布边界,超出的原始图像部分会被裁剪。

POST /run/bria/fibo-edit-1.5/expand?wait=20 报价 → $0.04
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/bria/fibo-edit-1.5/expand?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Bria Expand (FIBO-Edit-1.5)

将图像扩展到边界之外。选择九个`aspect_ratio`值之一,或将`canvas_size`定义为[width, height],面积低于25百万像素,并提供`original_image_size`和`original_image_location`。可选的`prompt`用于描述新增区域。`retain_original_quality`和`preserve_alpha`默认开启,`return_model_output`用于诊断。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
image_url必填 image
类型url · image
用于扩展的图像,以文件或 URL 形式提供。
canvas_size可选
类型integer[]
≤ 2 个项目≥ 2 个项目
与 'original_image_location' 配对的扩展图像尺寸。指定最终画布的 [width, height],其面积必须小于 25 百万像素。
aspect_ratio可选
类型enum
1:12:33:23:44:34:55:49:1616:9
最终图像比例设置,使原始图像居中并扩展周围画布。指定后优先于 'original_image_size' 和 'original_image_location'。
original_image_size可选
类型integer[]
≤ 2 个项目≥ 2 个项目
原始图像在画布中的目标 [width, height]。提供 'aspect_ratio' 时会覆盖此设置;否则会先将图像调整为这些尺寸再放置。
original_image_location可选
类型integer[]
≤ 2 个项目≥ 2 个项目
原始图像左上角的放置坐标 [x, y];提供 'aspect_ratio' 时忽略。允许超出画布边界,超出的原始图像部分会被裁剪。
prompt可选
类型string | null
对新增区域内容的可选描述。普通画布调整通常不需要描述:省略后会要求模型仅扩展现有图像。
seed可选
类型integer | null
0 – 2,147,483,647
随机生成种子。无论在此提供还是省略后随机选择,都会始终包含在响应中。使用之前响应中的值可以重建其结果。
negative_prompt可选
类型string | null
针对为 SDXL 扩展 API 路由编写的请求进行兼容性检查:提供此不受支持的输入会触发明确拒绝,以防其值被静默丢弃。请改用 'prompt'。
retain_original_quality可选
类型boolean
默认值true
启用后可在不重采样的情况下,以完整分辨率保留受蒙版保护的原始像素。模型以约一百万像素进行生成,然后为更大画布放大。禁用后结果会整体变得模糊,这可能会隐藏纹理背景中的接缝。
preserve_alpha可选
类型boolean
默认值true
通过边缘复制按需延展原始 alpha 通道,从而保留输入透明度以扩展抠图。由于生成过程在 RGB 中进行,模型不会生成 alpha。禁用后将获得扁平化的 RGB 输出。
return_model_output可选
类型boolean
默认值false
返回额外的诊断帧,以区分模型错误和合成错误,同时不改变最终图像。该帧显示重新插入原始图像并混合接缝之前的模型结果;如果此帧中已经出现边界缺陷,则属于生成错误而非后处理错误。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "bria/fibo-edit-1.5/expand",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 40,
    "usd": "0.04",
    "charged": 40,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "image": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768
    },
    "seed": 42,
    "structured_instruction": {},
    "model_output": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768
    }
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
image
object {url, content_type, file_name, file_size, width, height}扩展生成的图像。
seed
integer生成期间使用的种子,可用于复现结果。
structured_instruction
object用于约束模型的结构化提示词。
model_output
object {url, content_type, file_name, file_size, width, height} | null仅在启用 'return_model_output' 时包含的未合成帧。它具有请求的画布尺寸,包含模型输出,但不含任何粘贴或混合内容。

更多模型:图像编辑

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/bria/fibo-edit-1.5/expand.md. 所有模型和指南: https://doitong.com/developers/llms.txt