Skip to content

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:

  1. Project Management: Create and manage projects that define IP characteristics:
  • Create and Retrieve Projects: Use the /projects endpoints 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.
  1. Dataset Management: Organize and refine datasets within your projects:
  • Create and Retrieve Datasets: Use the /datasets endpoints to create new datasets or retrieve existing ones.
  • Generate a Visual Schema (FIBO Models)
    • Required for fibo training versions
    • Use /tailored-gen/generate_visual_schema to create a structured visual schema using 5-10 sample images.
  • Generate Caption Prefix (Legacy Models)
    • Use /tailored-gen/generate_prefix to create a text-based prefix for legacy training versions.
  • Refine Structured Data
    • Use /tailored-gen/refine_structured_prompt to 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.
  • Upload and Manage Images:
    • Basic upload: Use /datasets/{dataset_id}/images to upload up to 200 images individually.
    • Bulk upload: Use /datasets/{dataset_id}/images/bulk to upload zip files with >200 high-quality images (Advanced).
  • Clone Datasets: Create variations of existing datasets using the clone functionality.
  1. Model Management: Train and optimize tailored models based on your datasets:
  • Create and Retrieve Models: Use the /models endpoints 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.
  1. Generation Capabilities:
  • Image Generation: Use v2/image/generate/tailored (FIBO) or v1/text-to-image/tailored (Legacy).
  • Structured Prompting: Use v2/structured_prompt/generate/tailored to create structured prompts via VLM before generation.
  • Video Generation: Use /video/generate/tailored/image-to-video to animate tailored images.

Training Process

To train a tailored model:

  1. Create a Project: Use the /projects endpoint to define your IP type and medium.
  2. Create a Dataset: Use the /datasets endpoint to create a dataset within your project.
  3. 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_prompt with 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}.
  4. Upload Images: Upload images using the /datasets/{dataset_id}/images or /datasets/{dataset_id}/images/bulk endpoints (minimum resolution: 1024x1024px).
  5. Prepare Dataset: Review auto-generated captions (you can also use refine_structured_prompt to fix specific image captions) and update the dataset status to 'completed'.
  6. Create Model: Use the /models endpoint to create a model, which requires a training mode and version.
  7. Start Training: Initiate training via the /models/{id}/start_training endpoint. Training typically takes 4-6 hours.
  8. Monitor Progress: Check the training status using the /models/{id} endpoint until training is 'Completed'.
  9. Generate Images:
  • Use v2/image/generate/tailored for text-to-image generation.

Alternatively, manage and train tailored models through Bria's user-friendly Console.
Get started here.

Languages
Servers
https://engine.prod.bria-api.com/v2
https://engine.prod.bria-api.com/v1

Project

Manage your projects

Operations

Dataset

Manage training datasets

Operations

Model

Manage and train models

Operations

Update Model

Request

Update a model's name and description. Other model attributes such as training version and dataset cannot be modified after creation.

Path
model_idintegerrequired

Model ID

Headers
api_tokenstringrequired
Bodyapplication/jsonrequired
namestring

New model name (optional)

descriptionstring

New model description (optional)

curl -i -X PUT \
  'https://engine.prod.bria-api.com/v1/tailored-gen/models/{model_id}' \
  -H 'Content-Type: application/json' \
  -H 'api_token: string' \
  -d '{
    "name": "Updated Lora Character Model",
    "description": "An updated model trained on Lora character illustrations"
  }'

Responses

Model successfully updated

Bodyapplication/json
idinteger

Unique identifier for the model

namestring

Name of the model

descriptionstring

Description of the model

statusstring

Status of the model

Enum"Created""InProgress""Completed""Failed""Stopping""Stopped"
training_versionstring

Training version

Enum"fibo""3.2""2.3""light""max"
generation_prefixstring or null

Text automatically prepended to prompts.

  • For fibo models: Null.
  • For legacy models: String matching the dataset's caption_prefix.
project_idinteger

ID of the project this model belongs to

dataset_idinteger

ID of the dataset used for training

created_atstring(date-time)

Timestamp when the model was created

Response
application/json
{ "id": 789, "name": "Updated Lora Character Model", "description": "An updated model trained on Lora character illustrations", "status": "Completed", "training_version": "max", "generation_prefix": "An illustration of a character named Lora, a female character with purple hair,", "project_id": 123, "dataset_id": 456, "created_at": "2024-05-26T12:00:00Z" }

Delete Model

Request

Delete a specific model. Changes status to Deleted.

Path
model_idintegerrequired

Model ID

Headers
api_tokenstringrequired
curl -i -X DELETE \
  'https://engine.prod.bria-api.com/v1/tailored-gen/models/{model_id}' \
  -H 'api_token: string'

Responses

Model successfully deleted

Response
No content

Start Training

Request

Start model training. Training duration is typically 2-4 hours. The associated dataset must have a status of 'completed' before training can begin.

Defaults by Training Version: If parameters are not provided, default values are automatically selected based on the model's training_version:

  • FIBO (fibo):

    • rank: 128
    • learning_rate: 0.0001
    • lr_scheduler: "constant_with_warmup"
    • total_training_steps: 750
    • checkpoint_interval: 500
  • Legacy (max, light, 3.2, 2.3):

    • rank: 128
    • learning_rate: 0.0001
    • lr_scheduler: "constant"
    • total_training_steps: 1500
    • checkpoint_interval: 500

Constraints:

  • Advanced training parameters are only supported when the model's training_mode is set to 'expert'.
Path
model_idintegerrequired

Model ID

Headers
api_tokenstringrequired
Bodyapplication/jsonrequired
lr_schedulerstring

The learning rate scheduler used to adjust the learning rate throughout the training process.

  • Default for FIBO: constant_with_warmup
  • Default for Legacy: constant
Enum"linear""cosine""cosine_with_restarts""polynomial""constant""constant_with_warmup"
learning_ratenumber(float)[ 0.000001 .. 0.001 ]

The initial learning rate. Default is 0.0001.

total_training_stepsinteger[ 1 .. 5000 ]

The total number of training optimization steps.

  • Default for FIBO: 750
  • Default for Legacy: 1500
rankinteger[ 4 .. 256 ]

The rank (latent dimension). Default is 128.

checkpoint_intervalinteger>= 100

The interval (in steps) at which model checkpoints are saved. Default is 500.

lr_warmup_stepsinteger[ 0 .. 1000 ]

Number of warmup steps for the learning rate scheduler.

  • Relevant only when lr_scheduler is set to constant_with_warmup.
  • Applies to all training versions.
Default 100
curl -i -X POST \
  'https://engine.prod.bria-api.com/v1/tailored-gen/models/{model_id}/start_training' \
  -H 'Content-Type: application/json' \
  -H 'api_token: string' \
  -d '{
    "lr_scheduler": "linear",
    "learning_rate": 0.000001,
    "total_training_steps": 1,
    "rank": 4,
    "checkpoint_interval": 100,
    "lr_warmup_steps": 100
  }'

Responses

Training successfully started

Bodyapplication/json
idinteger

Unique identifier for the model.

namestring

Name of the model.

descriptionstring

Description of the model.

statusstring

Status of the model.

Value"InProgress"
dataset_idinteger

ID of the dataset used for training.

training_versionstring

The training version of the model.

training_modestring

The training mode of the model.

generation_prefixstring or null

Text automatically prepended to prompts.

  • For fibo models: Null.
  • For legacy models: String matching the dataset's caption_prefix.
project_idinteger

ID of the project this model belongs to.

created_atstring(date-time)

Timestamp when the model was created.

updated_atstring(date-time)

Timestamp when the model was last updated.

custom_metadatastring

Custom metadata associated with the model.

active_model_versionstring

The active version of the model.

training_parametersobject

The training parameters used for the model.

training_parameters.​learning_ratenumber(float)
training_parameters.​lr_schedulerstring
training_parameters.​rankinteger
training_parameters.​total_training_stepsinteger
training_parameters.​checkpoint_intervalinteger
training_parameters.​lr_warmup_stepsinteger or null

Number of warmup steps. Returns null if lr_scheduler is NOT constant_with_warmup.

checkpoint_stepsArray of strings

A list of checkpoint steps for the model.

Response
application/json
{ "id": 12242, "name": "Test Model", "description": "Test description", "status": "InProgress", "dataset_id": 13749, "training_version": "bria-2.3", "training_mode": "expert", "generation_prefix": "An illustration of ", "project_id": 12429, "created_at": "2025-08-20T09:51:58.080018", "updated_at": "2025-08-20T09:51:58.080020", "custom_metadata": "", "active_model_version": "default", "training_parameters": { "learning_rate": 0.0001, "lr_scheduler": "constant", "rank": 44, "total_training_steps": 100, "checkpoint_interval": 100 }, "checkpoint_steps": [] }

Image Generation V2

Generation using FIBO models

Operations

Image Generation (Legacy)

Generation using Legacy models

Operations

Video Generation

Image-to-Video capabilities

Operations