vgl

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Bria VGL Prompt Writing

Bria VGL提示词编写

Generate structured JSON prompts for Bria's FIBO models using Visual Generation Language (VGL).
Related Skill: Use bria-ai to execute these VGL prompts via the Bria API. VGL defines the structured prompt format; bria-ai handles generation, editing, and background removal.
使用视觉生成语言(VGL)为Bria的FIBO模型生成结构化JSON提示词。
相关技能:使用**bria-ai**通过Bria API执行这些VGL提示词。VGL定义了结构化提示词格式;bria-ai负责处理生成、编辑和背景移除操作。

Core Concept

核心概念

VGL replaces ambiguous natural language prompts with deterministic JSON that explicitly declares every visual attribute: objects, lighting, camera settings, composition, and style. This ensures reproducible, controllable image generation.
VGL用确定性的JSON替代模糊的自然语言提示词,明确声明每一个视觉属性:物体、光线、相机设置、构图和风格。这确保了图像生成的可重复性和可控性。

Operation Modes

操作模式

ModeInputOutputUse Case
GenerateText promptVGL JSONCreate new image from description
EditImage + instructionVGL JSONModify reference image
Edit_with_MaskMasked image + instructionVGL JSONFill grey masked regions
CaptionImage onlyVGL JSONDescribe existing image
RefineExisting JSON + editUpdated VGL JSONModify existing prompt
模式输入输出使用场景
生成文本提示词VGL JSON根据描述创建新图像
编辑图像+指令VGL JSON修改参考图像
带蒙版编辑带蒙版的图像+指令VGL JSON填充灰色蒙版区域
标注仅图像VGL JSON描述现有图像
优化现有JSON+编辑需求更新后的VGL JSON修改现有提示词

JSON Schema

JSON Schema

Output a single valid JSON object with these required keys:
输出单个有效的JSON对象,包含以下必填字段:

1.
short_description
(String)

1.
short_description
(字符串)

Concise summary of image content, max 200 words. Include key subjects, actions, setting, and mood.
图像内容的简洁摘要,最多200词。包含核心主体、动作、场景和氛围。

2.
objects
(Array, max 5 items)

2.
objects
(数组,最多5个元素)

Each object requires:
json
{
  "description": "Detailed description, max 100 words",
  "location": "center | top-left | bottom-right foreground | etc.",
  "relative_size": "small | medium | large within frame",
  "shape_and_color": "Basic shape and dominant color",
  "texture": "smooth | rough | metallic | furry | fabric | etc.",
  "appearance_details": "Notable visual details",
  "relationship": "Relationship to other objects",
  "orientation": "upright | tilted 45 degrees | facing left | horizontal | etc."
}
Human subjects add:
json
{
  "pose": "Body position description",
  "expression": "winking | joyful | serious | surprised | calm",
  "clothing": "Attire description",
  "action": "What the person is doing",
  "gender": "Gender description",
  "skin_tone_and_texture": "Skin appearance"
}
Object clusters add:
json
{
  "number_of_objects": 3
}
Size guidance: If a person is the main subject, use
"medium-to-large"
or
"large within frame"
.
每个物体需要包含:
json
{
  "description": "详细描述,最多100词",
  "location": "center | top-left | bottom-right foreground | etc.",
  "relative_size": "small | medium | large within frame",
  "shape_and_color": "基础形状和主色调",
  "texture": "smooth | rough | metallic | furry | fabric | etc.",
  "appearance_details": "显著视觉细节",
  "relationship": "与其他物体的关系",
  "orientation": "upright | tilted 45 degrees | facing left | horizontal | etc."
}
人物主体需额外添加:
json
{
  "pose": "身体姿态描述",
  "expression": "winking | joyful | serious | surprised | calm",
  "clothing": "着装描述",
  "action": "人物正在进行的动作",
  "gender": "性别描述",
  "skin_tone_and_texture": "皮肤外观"
}
物体组需额外添加:
json
{
  "number_of_objects": 3
}
尺寸指南:如果人物是主体,使用
"medium-to-large"
"large within frame"

3.
background_setting
(String)

3.
background_setting
(字符串)

Overall environment, setting, and background elements not in
objects
.
整体环境、场景以及未包含在
objects
中的背景元素。

4.
lighting
(Object)

4.
lighting
(对象)

json
{
  "conditions": "bright daylight | dim indoor | studio lighting | golden hour | blue hour | overcast",
  "direction": "front-lit | backlit | side-lit from left | top-down",
  "shadows": "long, soft shadows | sharp, defined shadows | minimal shadows"
}
json
{
  "conditions": "bright daylight | dim indoor | studio lighting | golden hour | blue hour | overcast",
  "direction": "front-lit | backlit | side-lit from left | top-down",
  "shadows": "long, soft shadows | sharp, defined shadows | minimal shadows"
}

5.
aesthetics
(Object)

5.
aesthetics
(对象)

json
{
  "composition": "rule of thirds | symmetrical | centered | leading lines | medium shot | close-up",
  "color_scheme": "monochromatic blue | warm complementary | high contrast | pastel",
  "mood_atmosphere": "serene | energetic | mysterious | joyful | dramatic | peaceful"
}
For people as main subject, specify shot type in composition:
"medium shot"
,
"close-up"
,
"portrait composition"
.
json
{
  "composition": "rule of thirds | symmetrical | centered | leading lines | medium shot | close-up",
  "color_scheme": "monochromatic blue | warm complementary | high contrast | pastel",
  "mood_atmosphere": "serene | energetic | mysterious | joyful | dramatic | peaceful"
}
如果人物是主体,需在构图中指定镜头类型:
"medium shot"
"close-up"
"portrait composition"

6.
photographic_characteristics
(Object)

6.
photographic_characteristics
(对象)

json
{
  "depth_of_field": "shallow | deep | bokeh background",
  "focus": "sharp focus on subject | soft focus | motion blur",
  "camera_angle": "eye-level | low angle | high angle | dutch angle | bird's-eye",
  "lens_focal_length": "wide-angle | 50mm standard | 85mm portrait | telephoto | macro"
}
For people: Prefer
"standard lens (35mm-50mm)"
or
"portrait lens (50mm-85mm)"
. Avoid wide-angle unless specified.
json
{
  "depth_of_field": "shallow | deep | bokeh background",
  "focus": "sharp focus on subject | soft focus | motion blur",
  "camera_angle": "eye-level | low angle | high angle | dutch angle | bird's-eye",
  "lens_focal_length": "wide-angle | 50mm standard | 85mm portrait | telephoto | macro"
}
人物相关:优先使用
"standard lens (35mm-50mm)"
"portrait lens (50mm-85mm)"
,除非特别要求,否则避免使用广角镜头。

7.
style_medium
(String)

7.
style_medium
(字符串)

"photograph"
|
"oil painting"
|
"watercolor"
|
"3D render"
|
"digital illustration"
|
"pencil sketch"
Default to
"photograph"
unless explicitly requested otherwise.
"photograph"
|
"oil painting"
|
"watercolor"
|
"3D render"
|
"digital illustration"
|
"pencil sketch"
除非明确要求,默认使用
"photograph"

8.
artistic_style
(String)

8.
artistic_style
(字符串)

If not photograph, describe characteristics in max 3 words:
"impressionistic, vibrant, textured"
For photographs, use
"realistic"
or similar.
如果不是照片,用最多3个词描述风格特征:
"impressionistic, vibrant, textured"
如果是照片,使用
"realistic"
或类似词汇。

9.
context
(String)

9.
context
(字符串)

Describe the image type/purpose:
  • "High-fashion editorial photograph for magazine spread"
  • "Concept art for fantasy video game"
  • "Commercial product photography for e-commerce"
描述图像类型/用途:
  • "High-fashion editorial photograph for magazine spread"
  • "Concept art for fantasy video game"
  • "Commercial product photography for e-commerce"

10.
text_render
(Array)

10.
text_render
(数组)

Default: empty array
[]
Only populate if user explicitly provides exact text content:
json
{
  "text": "Exact text from user (never placeholder)",
  "location": "center | top-left | bottom",
  "size": "small | medium | large",
  "color": "white | red | blue",
  "font": "serif typeface | sans-serif | handwritten | bold impact",
  "appearance_details": "Metallic finish | 3D effect | etc."
}
Exception: Universal text integral to objects (e.g., "STOP" on stop sign).
默认值:空数组
[]
仅当用户明确提供确切文本内容时才填充:
json
{
  "text": "Exact text from user (never placeholder)",
  "location": "center | top-left | bottom",
  "size": "small | medium | large",
  "color": "white | red | blue",
  "font": "serif typeface | sans-serif | handwritten | bold impact",
  "appearance_details": "Metallic finish | 3D effect | etc."
}
例外情况:物体本身自带的通用文本(例如,停止标志上的"STOP")。

11.
edit_instruction
(String)

11.
edit_instruction
(字符串)

Single imperative command describing the edit/generation.
单个祈使句,描述编辑/生成需求。

Edit Instruction Formats

编辑指令格式

For Standard Edits (no mask)

标准编辑模式(无蒙版)

Start with action verb, describe changes, never reference "original image":
CategoryRewritten Instruction
Style change
Turn the image into the cartoon style.
Object attribute
Change the dog's color to black and white.
Add element
Add a wide-brimmed felt hat to the subject.
Remove object
Remove the book from the subject's hands.
Replace object
Change the rose to a bright yellow sunflower.
Lighting
Change the lighting from dark and moody to bright and vibrant.
Composition
Change the perspective to a wider shot.
Text change
Change the text "Happy Anniversary" to "Hello".
Quality
Refine the image to obtain increased clarity and sharpness.
以动作动词开头,描述更改内容,切勿提及“原始图像”:
类别改写后的指令
风格更改
Turn the image into the cartoon style.
对象属性
Change the dog's color to black and white.
添加元素
Add a wide-brimmed felt hat to the subject.
删除对象
Remove the book from the subject's hands.
替换对象
Change the rose to a bright yellow sunflower.
光线调整
Change the lighting from dark and moody to bright and vibrant.
构图调整
Change the perspective to a wider shot.
文本更改
Change the text "Happy Anniversary" to "Hello".
质量优化
Refine the image to obtain increased clarity and sharpness.

For Masked Region Edits

蒙版区域编辑模式

Reference "masked regions" or "masked area" as target:
IntentRewritten Instruction
Object generation
Generate a white rose with a blue center in the masked region.
Extension
Extend the image into the masked region to create a scene featuring...
Background fill
Create the following background in the masked region: A vast ocean extending to horizon.
Atmospheric fill
Fill the background masked area with a clear, bright blue sky with wispy clouds.
Subject restoration
Restore the area in the mask with a young woman.
Environment infill
Create inside the masked area: a greenhouse with rows of plants under glass ceiling.
以“masked regions”或“masked area”作为目标:
意图改写后的指令
对象生成
Generate a white rose with a blue center in the masked region.
图像扩展
Extend the image into the masked region to create a scene featuring...
背景填充
Create the following background in the masked region: A vast ocean extending to horizon.
氛围填充
Fill the background masked area with a clear, bright blue sky with wispy clouds.
主体修复
Restore the area in the mask with a young woman.
环境填充
Create inside the masked area: a greenhouse with rows of plants under glass ceiling.

Fidelity Rules

保真规则

Standard Edit Mode

标准编辑模式

Preserve ALL visual properties unless explicitly changed by instruction:
  • Subject identity, pose, appearance
  • Object existence, location, size, orientation
  • Composition, camera angle, lens characteristics
  • Style/medium
Only change what the edit strictly requires.
除非指令明确要求更改,否则保留所有视觉属性:
  • 主体身份、姿态、外观
  • 对象存在性、位置、尺寸、方向
  • 构图、相机角度、镜头参数
  • 风格/媒介
仅更改指令严格要求的内容。

Masked Edit Mode

蒙版编辑模式

  • Preserve all visible (non-masked) portions exactly
  • Fill grey masked regions to blend seamlessly with unmasked areas
  • Match existing style, lighting, and subject matter
  • Never describe grey masks—describe content that fills them
  • 完全保留所有可见(非蒙版)部分
  • 填充灰色蒙版区域,使其与非蒙版区域无缝融合
  • 匹配现有风格、光线和主题
  • 切勿描述灰色蒙版,而是描述填充蒙版的内容

Example Output

示例输出

json
{
  "short_description": "A professional businesswoman in a navy blazer stands confidently in a modern glass office, holding a tablet. Natural daylight streams through floor-to-ceiling windows, creating a warm, productive atmosphere.",
  "objects": [
    {
      "description": "A confident businesswoman in her 30s with shoulder-length dark hair, wearing a tailored navy blazer over a white blouse. She holds a tablet in her left hand while gesturing naturally with her right.",
      "location": "center-right",
      "relative_size": "large within frame",
      "shape_and_color": "Human figure, navy and white clothing",
      "texture": "smooth fabric, professional attire",
      "appearance_details": "Minimal jewelry, well-groomed professional appearance",
      "relationship": "Main subject, interacting with tablet",
      "orientation": "facing slightly left, three-quarter view",
      "pose": "Standing upright, relaxed professional stance",
      "expression": "confident, approachable smile",
      "clothing": "Tailored navy blazer, white silk blouse, dark trousers",
      "action": "Presenting or reviewing information on tablet",
      "gender": "female",
      "skin_tone_and_texture": "Medium warm skin tone, healthy smooth complexion"
    },
    {
      "description": "A modern tablet device with a bright display showing charts and graphs",
      "location": "center, held by subject",
      "relative_size": "small",
      "shape_and_color": "Rectangular, silver frame with illuminated screen",
      "texture": "smooth glass and metal",
      "appearance_details": "Thin profile, business application visible on screen",
      "relationship": "Held by businesswoman, focus of her attention",
      "orientation": "vertical, screen facing viewer at slight angle",
      "pose": null,
      "expression": null,
      "clothing": null,
      "action": null,
      "gender": null,
      "skin_tone_and_texture": null,
      "number_of_objects": null
    }
  ],
  "background_setting": "Modern corporate office interior with floor-to-ceiling windows overlooking a city skyline. Minimalist furniture in neutral tones, potted plants adding touches of green.",
  "lighting": {
    "conditions": "bright natural daylight",
    "direction": "side-lit from left through windows",
    "shadows": "soft, natural shadows"
  },
  "aesthetics": {
    "composition": "rule of thirds, medium shot",
    "color_scheme": "professional blues and neutral whites with warm accents",
    "mood_atmosphere": "confident, professional, welcoming"
  },
  "photographic_characteristics": {
    "depth_of_field": "shallow, background slightly soft",
    "focus": "sharp focus on subject's face and upper body",
    "camera_angle": "eye-level",
    "lens_focal_length": "portrait lens (85mm)"
  },
  "style_medium": "photograph",
  "artistic_style": "realistic",
  "context": "Corporate portrait photography for company website or LinkedIn professional profile.",
  "text_render": [],
  "edit_instruction": "Generate a professional businesswoman in a modern office environment holding a tablet."
}
json
{
  "short_description": "A professional businesswoman in a navy blazer stands confidently in a modern glass office, holding a tablet. Natural daylight streams through floor-to-ceiling windows, creating a warm, productive atmosphere.",
  "objects": [
    {
      "description": "A confident businesswoman in her 30s with shoulder-length dark hair, wearing a tailored navy blazer over a white blouse. She holds a tablet in her left hand while gesturing naturally with her right.",
      "location": "center-right",
      "relative_size": "large within frame",
      "shape_and_color": "Human figure, navy and white clothing",
      "texture": "smooth fabric, professional attire",
      "appearance_details": "Minimal jewelry, well-groomed professional appearance",
      "relationship": "Main subject, interacting with tablet",
      "orientation": "facing slightly left, three-quarter view",
      "pose": "Standing upright, relaxed professional stance",
      "expression": "confident, approachable smile",
      "clothing": "Tailored navy blazer, white silk blouse, dark trousers",
      "action": "Presenting or reviewing information on tablet",
      "gender": "female",
      "skin_tone_and_texture": "Medium warm skin tone, healthy smooth complexion"
    },
    {
      "description": "A modern tablet device with a bright display showing charts and graphs",
      "location": "center, held by subject",
      "relative_size": "small",
      "shape_and_color": "Rectangular, silver frame with illuminated screen",
      "texture": "smooth glass and metal",
      "appearance_details": "Thin profile, business application visible on screen",
      "relationship": "Held by businesswoman, focus of her attention",
      "orientation": "vertical, screen facing viewer at slight angle",
      "pose": null,
      "expression": null,
      "clothing": null,
      "action": null,
      "gender": null,
      "skin_tone_and_texture": null,
      "number_of_objects": null
    }
  ],
  "background_setting": "Modern corporate office interior with floor-to-ceiling windows overlooking a city skyline. Minimalist furniture in neutral tones, potted plants adding touches of green.",
  "lighting": {
    "conditions": "bright natural daylight",
    "direction": "side-lit from left through windows",
    "shadows": "soft, natural shadows"
  },
  "aesthetics": {
    "composition": "rule of thirds, medium shot",
    "color_scheme": "professional blues and neutral whites with warm accents",
    "mood_atmosphere": "confident, professional, welcoming"
  },
  "photographic_characteristics": {
    "depth_of_field": "shallow, background slightly soft",
    "focus": "sharp focus on subject's face and upper body",
    "camera_angle": "eye-level",
    "lens_focal_length": "portrait lens (85mm)"
  },
  "style_medium": "photograph",
  "artistic_style": "realistic",
  "context": "Corporate portrait photography for company website or LinkedIn professional profile.",
  "text_render": [],
  "edit_instruction": "Generate a professional businesswoman in a modern office environment holding a tablet."
}

Common Pitfalls

常见误区

  1. Don't invent text - Keep
    text_render
    empty unless user provides exact text
  2. Don't over-describe - Max 5 objects, prioritize most important
  3. Match the mode - Use correct
    edit_instruction
    format for masked vs standard edits
  4. Preserve fidelity - Only change what's explicitly requested
  5. Be specific - Use concrete values ("85mm portrait lens") not vague terms ("nice camera")
  6. Null for irrelevant - Human-specific fields should be
    null
    for non-human objects
  1. 不要编造文本 - 除非用户提供确切文本,否则保持
    text_render
    为空
  2. 不要过度描述 - 最多5个对象,优先描述最重要的
  3. 匹配操作模式 - 针对蒙版编辑和标准编辑使用正确的
    edit_instruction
    格式
  4. 保持保真度 - 仅更改明确要求的内容
  5. 具体明确 - 使用具体值(如"85mm portrait lens")而非模糊词汇(如"nice camera")
  6. 无关字段设为Null - 非人物对象的人物专属字段应设为
    null

curl Example

curl示例

bash
curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
  -H "api_token: $BRIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "structured_prompt": "{\"short_description\": \"...\", ...}",
    "prompt": "Generate this scene",
    "aspect_ratio": "16:9"
  }'

bash
curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
  -H "api_token: $BRIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "structured_prompt": "{\"short_description\": \"...\", ...}",
    "prompt": "Generate this scene",
    "aspect_ratio": "16:9"
  }'

References

参考资料

  • Schema Reference - Complete JSON schema with all parameter values
  • bria-ai - API client and endpoint documentation for executing VGL prompts
  • Schema Reference - 包含所有参数值的完整JSON schema
  • bria-ai - 用于执行VGL提示词的API客户端和端点文档