vgl
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBria 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
操作模式
| Mode | Input | Output | Use Case |
|---|---|---|---|
| Generate | Text prompt | VGL JSON | Create new image from description |
| Edit | Image + instruction | VGL JSON | Modify reference image |
| Edit_with_Mask | Masked image + instruction | VGL JSON | Fill grey masked regions |
| Caption | Image only | VGL JSON | Describe existing image |
| Refine | Existing JSON + edit | Updated VGL JSON | Modify 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)
short_description1. short_description
(字符串)
short_descriptionConcise summary of image content, max 200 words. Include key subjects, actions, setting, and mood.
图像内容的简洁摘要,最多200词。包含核心主体、动作、场景和氛围。
2. objects
(Array, max 5 items)
objects2. objects
(数组,最多5个元素)
objectsEach 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 or .
"medium-to-large""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)
background_setting3. background_setting
(字符串)
background_settingOverall environment, setting, and background elements not in .
objects整体环境、场景以及未包含在中的背景元素。
objects4. lighting
(Object)
lighting4. lighting
(对象)
lightingjson
{
"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)
aesthetics5. aesthetics
(对象)
aestheticsjson
{
"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)
photographic_characteristics6. photographic_characteristics
(对象)
photographic_characteristicsjson
{
"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 or . Avoid wide-angle unless specified.
"standard lens (35mm-50mm)""portrait lens (50mm-85mm)"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)
style_medium7. style_medium
(字符串)
style_medium"photograph""oil painting""watercolor""3D render""digital illustration""pencil sketch"Default to unless explicitly requested otherwise.
"photograph""photograph""oil painting""watercolor""3D render""digital illustration""pencil sketch"除非明确要求,默认使用。
"photograph"8. artistic_style
(String)
artistic_style8. artistic_style
(字符串)
artistic_styleIf not photograph, describe characteristics in max 3 words:
"impressionistic, vibrant, textured"For photographs, use or similar.
"realistic"如果不是照片,用最多3个词描述风格特征:
"impressionistic, vibrant, textured"如果是照片,使用或类似词汇。
"realistic"9. context
(String)
context9. context
(字符串)
contextDescribe 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)
text_render10. text_render
(数组)
text_renderDefault: 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)
edit_instruction11. edit_instruction
(字符串)
edit_instructionSingle imperative command describing the edit/generation.
单个祈使句,描述编辑/生成需求。
Edit Instruction Formats
编辑指令格式
For Standard Edits (no mask)
标准编辑模式(无蒙版)
Start with action verb, describe changes, never reference "original image":
| Category | Rewritten Instruction |
|---|---|
| Style change | |
| Object attribute | |
| Add element | |
| Remove object | |
| Replace object | |
| Lighting | |
| Composition | |
| Text change | |
| Quality | |
以动作动词开头,描述更改内容,切勿提及“原始图像”:
| 类别 | 改写后的指令 |
|---|---|
| 风格更改 | |
| 对象属性 | |
| 添加元素 | |
| 删除对象 | |
| 替换对象 | |
| 光线调整 | |
| 构图调整 | |
| 文本更改 | |
| 质量优化 | |
For Masked Region Edits
蒙版区域编辑模式
Reference "masked regions" or "masked area" as target:
| Intent | Rewritten Instruction |
|---|---|
| Object generation | |
| Extension | |
| Background fill | |
| Atmospheric fill | |
| Subject restoration | |
| Environment infill | |
以“masked regions”或“masked area”作为目标:
| 意图 | 改写后的指令 |
|---|---|
| 对象生成 | |
| 图像扩展 | |
| 背景填充 | |
| 氛围填充 | |
| 主体修复 | |
| 环境填充 | |
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
常见误区
- Don't invent text - Keep empty unless user provides exact text
text_render - Don't over-describe - Max 5 objects, prioritize most important
- Match the mode - Use correct format for masked vs standard edits
edit_instruction - Preserve fidelity - Only change what's explicitly requested
- Be specific - Use concrete values ("85mm portrait lens") not vague terms ("nice camera")
- Null for irrelevant - Human-specific fields should be for non-human objects
null
- 不要编造文本 - 除非用户提供确切文本,否则保持为空
text_render - 不要过度描述 - 最多5个对象,优先描述最重要的
- 匹配操作模式 - 针对蒙版编辑和标准编辑使用正确的格式
edit_instruction - 保持保真度 - 仅更改明确要求的内容
- 具体明确 - 使用具体值(如"85mm portrait lens")而非模糊词汇(如"nice camera")
- 无关字段设为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客户端和端点文档