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"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/bria/fibo-edit-1.5/expand?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-edit-1.5/expand", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh-CN/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.ru/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "bria/fibo-edit-1.5/expand",
"input": {
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
通过 Doitong API 调用 Bria Expand (FIBO-Edit-1.5) 模型(bria/fibo-edit-1.5/expand)。智能体文档:https://doitong.com/zh-CN/developers/models/bria/fibo-edit-1.5/expand.md
POST https://api.doitong.ru/v1/run/bria/fibo-edit-1.5/expand?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
如果响应状态为 "queued" 或 "running",请轮询 GET https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20,直到状态变为 "succeeded";文件位于 outputs[].url。使用相同请求体 POST https://api.doitong.ru/v1/quote/bria/fibo-edit-1.5/expand,可在运行前返回确切价格。
此请求: $0.04 40 API 积分 · ≈ ₽4.29 在此页面运行
你的新 API 密钥。 它只会在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保管:切勿将其放入在浏览器中运行的代码里。
构建请求
控件根据模型架构生成。修改控件时,代码和价格会同步更新。
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"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/bria/fibo-edit-1.5/expand?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-edit-1.5/expand", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "bria/fibo-edit-1.5/expand",
"input": {
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"wait_seconds": 20
}
}
}
关于 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' 时包含的未合成帧。它具有请求的画布尺寸,并包含模型输出,不含任何粘贴或混合内容。
其他 Bria Fibo Edit 1.5 变体
更多模型:图像编辑
对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh-CN/developers/models/bria/fibo-edit-1.5/expand.md. 所有模型和指南: https://doitong.com/developers/llms.txt






