Manage your projects
Overview
Tailored Generation provides capabilities to generate visuals (photos, illustrations, vectors) that preserve and faithfully reproduce specific IP elements or guidelines, ensuring consistency across all generated outputs.
The Tailored Generation APIs allow you to manage and train tailored models that maintain the integrity of your visual IP. You can train models through our Console or implement training directly via API. Explore the Console here.
Fully Automated Training Mode Bria supports users in training high-quality finetuned models without the guesswork. Based on the selected IP type & dataset, Bria automatically selects the right training parameters. This means that the user only needs to spend time curating their dataset.
Advanced Customization and Access: Bria offers 2 types of advanced training customization: Expert training mode and source-code & weights.
- Expert training mode is for LoRa Finetune experts and provides the ability to finetune training parameters and upload larger training datasets.
- Source-code & Weights is for developers seeking deeper customization and access to Bria’s source-available GenAI models via Hugging Face.
All methods allow full control over fine-tuning, pipeline creation, and integration into proprietary workflows—empowering AI teams to develop and optimize their own generative AI solutions.
The Tailored Generation Training API provides a set of endpoints to manage the entire lifecycle of a tailored generation project:
- Project Management: Create and manage projects that define IP characteristics:
- Create and Retrieve Projects: Use the
/projectsendpoints to create a new project or retrieve existing projects that belong to your organization. - Define IP Type: Specify the IP type (e.g., multi_object_set, defined_character, stylized_scene) and medium.
- Manage Project Details: Use the
/projects/{id}endpoints to update or delete specific projects.
- Dataset Management: Organize and refine datasets within your projects:
- Create and Retrieve Datasets: Use the
/datasetsendpoints to create new datasets or retrieve existing ones. - Generate a Visual Schema (FIBO Models)
- Required for
fibotraining versions - Use
/tailored-gen/generate_visual_schemato create a structured visual schema using 5-10 sample images.
- Required for
- Generate Caption Prefix (Legacy Models)
- Use
/tailored-gen/generate_prefixto create a text-based prefix for legacy training versions.
- Use
- Refine Structured Data
- Use
/tailored-gen/refine_structured_promptto iterate on your Visual Schema or Image Captions using natural language instructions. - Example: You can send your generated schema with the instruction "Character's name is Lucy" to improve the training metadata programmatically.
- Use
- Upload and Manage Images:
- Basic upload: Use
/datasets/{dataset_id}/imagesto upload up to 200 images individually. - Bulk upload: Use
/datasets/{dataset_id}/images/bulkto upload zip files with >200 high-quality images (Advanced).
- Basic upload: Use
- Clone Datasets: Create variations of existing datasets using the clone functionality.
- Model Management: Train and optimize tailored models based on your datasets:
- Create and Retrieve Models: Use the
/modelsendpoints to create new models or list existing ones. - Choose training mode: Select between Fully automated mode (automatic training based on Bria's recipes) and Expert mode (for training parameter tweaking).
- Choose Training version: Select "Fibo" for best results.
- Monitor and Control: Manage the model lifecycle, including training start/stop, status monitoring, and version control over the training parameters.
- Generation Capabilities:
- Image Generation: Use
v2/image/generate/tailored(FIBO) orv1/text-to-image/tailored(Legacy). - Structured Prompting: Use
v2/structured_prompt/generate/tailoredto create structured prompts via VLM before generation. - Video Generation: Use
/video/generate/tailored/image-to-videoto animate tailored images.
To train a tailored model:
- Create a Project: Use the
/projectsendpoint to define your IP type and medium. - Create a Dataset: Use the
/datasetsendpoint to create a dataset within your project. - Define Visual Identity:
- Step A (Generate): Call
/tailored-gen/generate_visual_schema, sampling 5-10 images from your input set. - Step B (Refine - Optional): Call
/tailored-gen/refine_structured_promptwith the generated schema and instructions to tweak the definitions (e.g., "Remove references to blue background"). - Step C (Apply): Update the dataset with the final schema using
/datasets/{dataset_id}.
- Step A (Generate): Call
- Upload Images: Upload images using the
/datasets/{dataset_id}/imagesor/datasets/{dataset_id}/images/bulkendpoints (minimum resolution: 1024x1024px). - Prepare Dataset: Review auto-generated captions (you can also use
refine_structured_promptto fix specific image captions) and update the dataset status to 'completed'. - Create Model: Use the
/modelsendpoint to create a model, which requires a training mode and version. - Start Training: Initiate training via the
/models/{id}/start_trainingendpoint. Training typically takes 4-6 hours. - Monitor Progress: Check the training status using the
/models/{id}endpoint until training is 'Completed'. - Generate Images:
- Use
v2/image/generate/tailoredfor text-to-image generation.
Alternatively, manage and train tailored models through Bria's user-friendly Console.
Get started here.
Request
Create a new dataset.
Training Version: The training_version parameter determines the dataset's compatibility and structure:
- Legacy (
max,light,3.2,2.3): Uses text captions andcaption_prefix. Compatible with each other. - FIBO (
fibo): Uses JSON structured data (visual_schema).caption_prefixis null.
Defaults & constraints:
training_versiondefaults tomax(will change tofiboin future updates).training_versionis immutable after creation.
Project Compatibility & Automatic Assignment: When creating a dataset, the system validates compatibility with the parent Project:
Automatic Assignment: If the Project's
training_versionisnull, it will automatically inherit thetraining_versionof this new dataset. The Project will then be locked to this version family.Validation: If the Project already has a
training_versionset:- FIBO Projects: Can only contain
fibodatasets. - Legacy Projects: Can contain any legacy dataset (
max,light,3.2,2.3). - Mixing Forbidden: You cannot create a
fibodataset in a legacy project, or vice versa.
- FIBO Projects: Can only contain
Completion Requirements:
- Legacy: Minimum 1 image required to mark as completed.
- FIBO: Minimum 5 images required to mark as complete
Upload types:
- Basic upload type: Supports up to 200 images, uploading image files
- Advanced upload type: Supports up to 5000 images, uploading a zip file
Specifies the foundation model version this dataset is intended for.
fibo: Uses JSON structured data (visual_schema). Requires generating a schema before uploading images.max(default),light,3.2,2.3: Legacy versions using text captions andcaption_prefix.
- https://engine.prod.bria-api.com/v1/tailored-gen/datasets
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://engine.prod.bria-api.com/v1/tailored-gen/datasets \
-H 'Content-Type: application/json' \
-H 'api_token: string' \
-d '{
"project_id": 123,
"name": "dataset v1",
"upload_type": "advanced"
}'Dataset successfully created
The foundation model version this dataset targets (e.g., 'fibo', 'max').
Text prepended to captions.
- For
training_version=max/light/3.2/2.3: Required string. - For
training_version=fibo: Null.
A string containing the JSON structure representing the visual backbone.
- For
training_version=fibo: Required string (must be generated via/generate_visual_schema). - For
training_version=max/light/3.2/2.3: Null.
The source of the captions. For 'basic' datasets, this is a null. For 'advanced' datasets, this indicates if captions were generated 'automatic' or provided 'manual'. this value is determined during bulk-upload
{ "id": 456, "project_id": 123, "name": "dataset v1", "caption_prefix": "An illustration of a character named Lora, a female character with purple hair,", "status": "draft", "captions_update_status": "empty", "training_version": "3.2", "upload_type": "advanced", "visual_schema": null, "created_at": "2024-05-26T12:00:00Z", "updated_at": "2024-05-26T12:00:00Z", "captions_source": null }
- https://engine.prod.bria-api.com/v1/tailored-gen/datasets
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://engine.prod.bria-api.com/v1/tailored-gen/datasets \
-H 'api_token: string'Successfully retrieved datasets
The foundation model version this dataset targets (e.g., 'fibo', 'max').
Text prepended to captions.
- For
training_version=max/light/3.2/2.3: Required string. - For
training_version=fibo: Null.
Status of captions update process, relevant for automatic captions generation.
The source of the captions. For 'basic' datasets, this is a null. For 'advanced' datasets, this indicates if captions were generated 'automatic' or provided 'manual'.
[ { "id": 456, "project_id": 123, "name": "dataset v1", "caption_prefix": "An illustration of a character named Lora, a female character with purple hair,", "status": "completed", "captions_update_status": "empty", "upload_type": "advanced", "training_vesion": "3.2", "visual_schema": null, "captions_source": "manual", "images_count": 2800, "created_at": "2024-05-26T12:00:00Z", "updated_at": "2024-05-26T14:30:00Z" }, { "id": 457, "project_id": 124, "name": "dataset v2", "caption_prefix": "An illustration of a character named Max, a male character with spiky black hair,", "status": "draft", "captions_update_status": "empty", "upload_type": "basic", "training_vesion": "3.2", "visual_schema": null, "captions_source": null, "images_count": 34, "created_at": "2024-05-27T09:00:00Z", "updated_at": "2024-05-27T09:00:00Z" } ]
- https://engine.prod.bria-api.com/v1/tailored-gen/projects/{project_id}/datasets
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://engine.prod.bria-api.com/v1/tailored-gen/projects/{project_id}/datasets?include_models=false&include_models_ids=false' \
-H 'api_token: string'Successfully retrieved datasets
The foundation model version this dataset targets (e.g., 'fibo', 'max').
Text prepended to captions.
- For
training_version=max/light/3.2/2.3: Required string. - For
training_version=fibo: Null.
The source of the captions. For 'basic' datasets, this is a null. For 'advanced' datasets, this indicates if captions were generated 'automatic' or provided 'manual'.
List of model objects using this dataset. Only included when include_models=true
List of model IDs using this dataset. Only included when include_models_ids=true
[ { "id": 456, "project_id": 123, "name": "dataset v1", "caption_prefix": "An illustration of a character named Lora, a female character with purple hair,", "upload_type": "advanced", "training_vesion": "3.2", "visual_schema": null, "captions_source": "automatic", "images_count": 1500, "status": "completed", "captions_update_status": "empty", "created_at": "2024-05-26T12:00:00Z", "updated_at": "2024-05-26T14:30:00Z" }, { "id": 457, "project_id": 123, "name": "dataset v2", "caption_prefix": "An illustration of a character named Max, a male character with spiky black hair,", "upload_type": "basic", "training_vesion": "3.2", "visual_schema": null, "captions_source": null, "images_count": 8, "status": "draft", "captions_update_status": "empty", "created_at": "2024-05-27T09:00:00Z", "updated_at": "2024-05-27T09:00:00Z" } ]