Fibo Lite · Structured Prompt
Tích hợp
bria/fibo-lite/generate/structured_prompt
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/bria/fibo-lite/generate/structured_prompt?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/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-lite/generate/structured_prompt?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
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.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-lite/generate/structured_prompt", 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.com/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "bria/fibo-lite/generate/structured_prompt",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
}
Gọi mô hình Fibo Lite · Structured Prompt (bria/fibo-lite/generate/structured_prompt) qua Doitong API. Tài liệu cho tác nhân: https://doitong.com/vi/developers/models/bria/fibo-lite/generate/structured_prompt.md
POST https://api.doitong.com/v1/run/bria/fibo-lite/generate/structured_prompt?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}
Nếu trạng thái phản hồi là "queued" hoặc "running", hãy thăm dò GET https://api.doitong.com/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.com/v1/quote/bria/fibo-lite/generate/structured_prompt 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,008 $ 8 tín dụng API 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-lite/generate/structured_prompt?wait=20
báo giá → 0,008 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/bria/fibo-lite/generate/structured_prompt?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.com/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-lite/generate/structured_prompt?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
}),
});
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.com/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/bria/fibo-lite/generate/structured_prompt", 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-lite/generate/structured_prompt",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"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 Lite · Structured Prompt
Trả về mô tả có cấu trúc để dùng với Fibo Lite thay vì hình ảnh. Đầu vào gồm `prompt`, `structured_prompt` hiện có hoặc `image_url`, cùng `seed`. Kết quả JSON bao quát thẩm mỹ, phong cách nghệ thuật, bối cảnh nền, ánh sáng, đối tượng, đặc điểm nhiếp ảnh, cảm xúc chủ thể và văn bả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
prompttùy chọn
structured_prompttùy chọn
structured_prompt.short_descriptionbắt buộc
structured_prompt.objectsbắt buộc
structured_prompt.objects[].descriptionbắt buộc
structured_prompt.objects[].locationbắt buộc
structured_prompt.objects[].relationshipbắt buộc
structured_prompt.objects[].relative_sizetùy chọn
structured_prompt.objects[].shape_and_colortùy chọn
structured_prompt.objects[].texturetùy chọn
structured_prompt.objects[].appearance_detailstùy chọn
structured_prompt.objects[].number_of_objectstùy chọn
structured_prompt.objects[].posetùy chọn
structured_prompt.objects[].expressiontùy chọn
structured_prompt.objects[].clothingtùy chọn
structured_prompt.objects[].actiontùy chọn
structured_prompt.objects[].gendertùy chọn
structured_prompt.objects[].skin_tone_and_texturetùy chọn
structured_prompt.objects[].orientationtùy chọn
structured_prompt.background_settingbắt buộc
structured_prompt.lightingbắt buộc
structured_prompt.lighting.conditionsbắt buộc
structured_prompt.lighting.directionbắt buộc
structured_prompt.lighting.shadowstùy chọn
structured_prompt.aestheticsbắt buộc
structured_prompt.aesthetics.compositionbắt buộc
structured_prompt.aesthetics.color_schemebắt buộc
structured_prompt.aesthetics.mood_atmospherebắt buộc
structured_prompt.aesthetics.aesthetic_scorebắt buộc
structured_prompt.aesthetics.preference_scorebắt buộc
structured_prompt.photographic_characteristicstùy chọn
structured_prompt.photographic_characteristics.depth_of_fieldbắt buộc
structured_prompt.photographic_characteristics.focusbắt buộc
structured_prompt.photographic_characteristics.camera_anglebắt buộc
structured_prompt.photographic_characteristics.lens_focal_lengthbắt buộc
structured_prompt.style_mediumtùy chọn
structured_prompt.text_rendertùy chọn
structured_prompt.text_render[].textbắt buộc
structured_prompt.text_render[].locationbắt buộc
structured_prompt.text_render[].sizebắt buộc
structured_prompt.text_render[].colorbắt buộc
structured_prompt.text_render[].fontbắt buộc
structured_prompt.text_render[].appearance_detailstùy chọn
structured_prompt.contextbắt buộc
structured_prompt.artistic_stylebắt buộc
structured_prompt.subject_emotionstùy chọn
image_urltùy chọn
image
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-lite/generate/structured_prompt",
"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": 8,
"usd": "0.008",
"charged": 8,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
},
"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",
"aesthetic_score": "string",
"preference_score": "string"
},
"photographic_characteristics": {
"depth_of_field": "string",
"focus": "string",
"camera_angle": "string",
"lens_focal_length": "string"
},
"style_medium": "string",
"text_render": [
{
"text": "string",
"location": "string",
"size": "string",
"color": "string",
"font": "string",
"appearance_details": "string"
}
],
"context": "string",
"artistic_style": "string",
"subject_emotions": "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
Các trường đầu ra
- short_description
- stringTổng quan ngắn gọn về nội dung hình ảnh, giới hạn ở 200 từ.
- 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}Danh sách các đối tượng đáng chú ý ở tiền cảnh hoặc trung cảnh.
- background_setting
- stringMô tả toàn bộ cảnh: địa điểm, môi trường xung quanh hoặc phông nền, cùng mọi đặc điểm hậu cảnh đáng lưu ý.
- lighting
- object {conditions, direction, shadows}Thông tin mô tả ánh sáng.
- aesthetics
- object {composition, color_scheme, mood_atmosphere, aesthetic_score, preference_score}Thông tin mô tả tính thẩm mỹ của hình ảnh.
- photographic_characteristics
- object {depth_of_field, focus, camera_angle, lens_focal_length} | nullThông tin mô tả các đặc tính nhiếp ảnh.
- style_medium
- string | nullChất liệu hoặc phong cách nghệ thuật được sử dụng.
- text_render
- array of object {text, location, size, color, font, appearance_details} | nullDanh sách các thành phần văn bản được hiển thị trong hình ảnh.
- context
- stringNgữ cảnh bổ sung hỗ trợ diễn giải hình ảnh.
- artistic_style
- stringCác đặc điểm nghệ thuật cụ thể, tối đa 3 từ.
- subject_emotions
- string | nullMô tả rõ các biểu cảm hoặc cảm xúc có thể nhìn thấy của chủ thể.
Các biến thể Fibo Lite 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-lite/generate/structured_prompt.md. Tất cả mô hình và hướng dẫn: https://doitong.com/developers/llms.txt