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/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/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.30 在此页面运行
你的新 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/developers/models/bria/fibo-edit-1.5/expand.md. 所有模型和指南: https://doitong.com/developers/llms.txt






