vgl について
vglは、BriaのFiboモデル向けに画像生成や編集の指示を構造化JSONで記述するスキルです。視覚要素を明示的に制御したいユーザー向けに、生成、編集、キャプション、プロンプトの調整モードを備えています。
主な機能
- 01構造化されたビジュアルJSONプロンプト
- 02生成と編集のモード
- 03マスク領域の編集指示
- 04画像キャプションモード
- 05プロンプトの調整
- 06カメラと照明の明示的な制御
活用シーン
- 01再現可能な画像構図の指定
- 02参照画像への編集内容の記述
- 03選択したマスク領域の補完
- 04既存のビジュアルプロンプトの調整
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ bria-ai/ bria-skill --skill vglインストール後、Claude Code で/vglを入力して読み込まれたか確認します。
同梱ファイルreferences/schema-reference.md
詳細
Bria VGL — 画像生成を自在にコントロール
自然言語で意図が正しく伝わることを期待するのではなく、視覚的な属性をすべて構造化 JSON で定義します。VGL(Visual Generation Language)を使えば、Bria の Fibo モデルでオブジェクト、ライティング、カメラ設定、構図、スタイルを明示的かつ決定論的に制御できます。
関連スキル:Bria API 経由でこれらの VGL プロンプトを実行するには、bria-ai を使用します。VGL は構造化された制御形式を定義し、bria-ai は生成、編集、背景除去を処理します。
基本概念
VGL は、曖昧な自然言語プロンプトを、視覚的な属性(オブジェクト、ライティング、カメラ設定、構図、スタイル)をすべて明示的に宣言する決定論的な JSON に置き換えます。これにより、再現性があり、制御可能な画像生成が実現します。
操作モード
| モード | 入力 | 出力 | 使用例 |
|---|---|---|---|
| Generate | テキストプロンプト | VGL JSON | 説明から新しい画像を作成 |
| Edit | 画像 + 指示 | VGL JSON | 参照画像を変更 |
| Edit_with_Mask | マスク画像 + 指示 | VGL JSON | 灰色のマスク領域を塗りつぶす |
| Caption | 画像のみ | VGL JSON | 既存の画像を説明 |
| Refine | 既存の JSON + 編集 | 更新された VGL JSON | 既存のプロンプトを変更 |
JSON スキーマ
次の必須キーを含む、有効な JSON オブジェクトを 1 つ出力します。
1. short_description(文字列)
画像の内容を簡潔に要約します。最大 200 語です。主要な被写体、動作、設定、雰囲気を含めます。
2. objects(配列、最大 5 項目)
各オブジェクトには次の項目が必要です。
{
"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."
}
人物の被写体には、次を追加します。
{
"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"
}
オブジェクトの集合には、次を追加します。
{
"number_of_objects": 3
}
サイズの指針:人物が主要な被写体の場合は、"medium-to-large" または "large within frame" を使用します。
3. background_setting(文字列)
objects に含まれない、環境、設定、背景要素全体を記述します。
4. lighting(オブジェクト)
{
"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(オブジェクト)
{
"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(オブジェクト)
{
"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(文字列)
"photograph" | "oil painting" | "watercolor" | "3D render" | "digital illustration" | "pencil sketch"
明示的な指定がない限り、"photograph" をデフォルトにします。
8. artistic_style(文字列)
写真でない場合は、特徴を最大 3 語で記述します:"impressionistic, vibrant, textured"
写真の場合は、"realistic" または同様の語を使用します。
9. context(文字列)
画像の種類や用途を記述します。
"High-fashion editorial photograph for magazine spread""Concept art for fantasy video game""Commercial product photography for e-commerce"
10. text_render(配列)
デフォルト:空の配列 []
ユーザーが正確なテキスト内容を明示的に指定した場合のみ設定します。
{
"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(文字列)
編集または生成の内容を示す、命令形の文を 1 つ指定します。
編集指示の形式
標準編集(マスクなし)の場合
動作を表す動詞から始め、変更内容を記述します。「元の画像」には言及しないでください。
| カテゴリ | 書き換えた指示 |
|---|---|
| スタイルの変更 | 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. |
マスク領域の編集の場合
対象として「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. |
忠実度のルール
標準編集モード
指示で明示的に変更する場合を除き、すべての視覚的特性を維持します。
- 被写体のアイデンティティ、ポーズ、外見
- オブジェクトの有無、位置、サイズ、向き
- 構図、カメラアングル、レンズの特性
- スタイル/媒体
編集に厳密に必要なものだけを変更します。
マスク編集モード
- 表示されている(マスクされていない)部分をすべて正確に維持します
- グレーのマスク領域を、マスクされていない領域とシームレスになじむように塗りつぶします
- 既存のスタイル、照明、被写体に合わせます
- グレーのマスクについては決して説明せず、マスクを埋める内容を説明します
出力例
{
"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."
}
よくある問題
- テキストを創作しない - ユーザーが正確なテキストを指定しない限り、
text_renderは空のままにします - 説明しすぎない - オブジェクトは最大5つとし、重要なものを優先します
- モードに合わせる - マスク編集と標準編集で正しい
edit_instruction形式を使用します - 忠実度を維持する - 明示的に要求された内容だけを変更します
- 具体的にする - 曖昧な表現(「良いカメラ」)ではなく、具体的な値(「85mm のポートレートレンズ」)を使います
- 該当しない場合は null - 人物に関するフィールドは、人間以外のオブジェクトでは
nullにします
curl の例
curl -X POST "https://engine.prod.bria-api.com/v2/image/generate" \
-H "api_token: $BRIA_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: BriaSkills/1.4.0" \
-d '{
"structured_prompt": "{\"short_description\": \"...\", ...}",
"prompt": "Generate this scene",
"aspect_ratio": "16:9"
}'
参考資料
- スキーマリファレンス - すべてのパラメーター値を含む完全な JSON スキーマ
- bria-ai - VGL プロンプトを実行するための API クライアントおよびエンドポイントのドキュメント