Fibo Edit [Structured Instruction]
Tích hợp
bria/fibo-edit/edit/structured_instruction
# 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/edit/structured_instruction?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
# 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/edit/structured_instruction?wait=20", {
method: "POST",
headers,
body: JSON.stringify({}),
});
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 = {}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-edit/edit/structured_instruction", 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/vi/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/edit/structured_instruction",
"input": {}
}
Gọi mô hình Fibo Edit [Structured Instruction] (bria/fibo-edit/edit/structured_instruction) qua Doitong API. Tài liệu cho tác nhân: https://doitong.com/vi/developers/models/bria/fibo-edit/edit/structured_instruction.md
POST https://api.doitong.ru/v1/run/bria/fibo-edit/edit/structured_instruction?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{}
Nếu trạng thái phản hồi là "queued" hoặc "running", hãy thăm dò GET https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20 cho đến khi trạng thái là "succeeded"; tệp nằm trong outputs[].url. POST https://api.doitong.ru/v1/quote/bria/fibo-edit/edit/structured_instruction với cùng nội dung sẽ trả về giá chính xác trước khi chạy.
Yêu cầu này: 0,01 $ 10 tín dụng API · ≈ 1,05 ₽ Chạy trên trang này
Khóa API mới của bạn. Khóa này chỉ hiển thị lúc này và đã được chèn vào mã cũng như trường khóa API bên dưới. Hãy giữ bí mật: không bao giờ đưa khóa này vào mã chạy trong trình duyệt.
Kết quả đầu tiên của bạn sẽ xuất hiện ở đây
Tạo một yêu cầu bên dưới và chạy bằng khóa API của bạn. Đầu ra được sao chép vào bộ lưu trữ của chúng tôi, giữ vĩnh viễn hoặc 7 ngày miễn phí.
Tạo một yêu cầu
Các điều khiển được tạo từ lược đồ mô hình. Mã và giá sẽ cập nhật khi bạn thay đổi chúng.
/run/bria/fibo-edit/edit/structured_instruction?wait=20
báo giá → 0,01 $
# 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/edit/structured_instruction?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
# 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/edit/structured_instruction?wait=20", {
method: "POST",
headers,
body: JSON.stringify({}),
});
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 = {}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-edit/edit/structured_instruction", 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/edit/structured_instruction",
"input": {},
"wait_seconds": 20
}
}
}
Chạy yêu cầu này
Key của bạn vẫn nằm trong trình duyệt này: key chỉ được gửi đến Doitong API và chỉ được lưu trong localStorage nếu bạn chọn Ghi nhớ. Nhận khóa API
Giới thiệu về Fibo Edit [Structured Instruction]
Chỉ tạo chỉ dẫn có cấu trúc cho một lần chỉnh sửa, không tạo ảnh. Đầu vào gồm `image_url`, `mask_url`, `instruction` và `seed` tùy chọn. Kết quả JSON bao quát các trường như đối tượng, ánh sáng, thẩm mỹ, bối cảnh nền, đặc điểm nhiếp ảnh và văn bản cần kết xuất.
Tham số
Gửi tên chuẩn hoặc tên gốc, không gửi cả hai. Tên chuẩn
image_urltùy chọn
image
mask_urltùy chọn
mask
instructiontùy chọn
seedtùy chọn
Các tham số tệp nhận URL https:// công khai, URI data: tối đa 10 MB hoặc file_url của một tệp tải lên. Tệp
Đầu ra
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "bria/fibo-edit/edit/structured_instruction",
"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": 10,
"usd": "0.01",
"charged": 10,
"refunded": 0
},
"input": {},
"output": {
"short_description": "string",
"objects": [
{
"description": "string",
"location": "string",
"relationship": "string",
"relative_size": "string",
"shape_and_color": "string",
"texture": "string",
"appearance_details": "string",
"number_of_objects": 1,
"pose": "string",
"expression": "string",
"clothing": "string",
"action": "string",
"gender": "string",
"skin_tone_and_texture": "string",
"orientation": "string"
}
],
"background_setting": "string",
"lighting": {
"conditions": "string",
"direction": "string",
"shadows": "string"
},
"aesthetics": {
"composition": "string",
"color_scheme": "string",
"mood_atmosphere": "string",
"preference_score": "string",
"aesthetic_score": "string"
},
"photographic_characteristics": {
"depth_of_field": "string",
"focus": "string",
"camera_angle": "string",
"lens_focal_length": "string"
},
"style_medium": "string",
"text_render": [],
"context": "string",
"artistic_style": "string",
"edit_instruction": "string"
},
"outputs": [
{
"type": "file",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
"content_type": "image/jpeg",
"file_size": 1843200,
"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"
}
}
Các trường đầu ra
- short_description
- string | nullMô tả ngắn về hình ảnh đầu ra dự kiến.
- objects
- array of object {description, location, relationship, relative_size, shape_and_color, texture, appearance_details, number_of_objects, pose, expression, clothing, action, gender, skin_tone_and_texture, orientation} | nullChỉ định nội dung hình ảnh được tạo dưới dạng danh sách, ghi lại thuộc tính của từng đối tượng và mối quan hệ của chúng với các đối tượng khác được mô tả.
- background_setting
- string | nullBối cảnh nền cho hình ảnh được tạo.
- lighting
- object {conditions, direction, shadows} | nullÁnh sáng cho hình ảnh được tạo.
- aesthetics
- object {composition, color_scheme, mood_atmosphere, preference_score, aesthetic_score} | nullĐặc tính thẩm mỹ cho hình ảnh được tạo.
- photographic_characteristics
- object {depth_of_field, focus, camera_angle, lens_focal_length} | nullĐặc tính nhiếp ảnh cho hình ảnh được tạo.
- style_medium
- string | nullChất liệu phong cách cho hình ảnh được tạo.
- text_render
- array of any | nullDanh sách mục văn bản cần đưa vào hình ảnh.
- context
- string | nullBối cảnh cho hình ảnh được tạo.
- artistic_style
- string | nullPhong cách nghệ thuật cho hình ảnh được tạo.
- edit_instruction
- string | nullHướng dẫn mô tả cách chỉnh sửa hình ảnh.
Các biến thể Fibo Edit khác
Thêm mô hình: LLM
Dành cho tác nhân AI: trang này ở dạng Markdown tại https://doitong.com/vi/developers/models/bria/fibo-edit/edit/structured_instruction.md. Tất cả mô hình và hướng dẫn: https://doitong.com/developers/llms.txt