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

Get Datasets

Request

Retrieve a list of all datasets. If there are no datasets, returns an empty array.

Headers
api_tokenstringrequired
curl -i -X GET \
  https://engine.prod.bria-api.com/v1/tailored-gen/datasets \
  -H 'api_token: string'

Responses

Successfully retrieved datasets

Bodyapplication/jsonArray [
idinteger

Unique identifier for the dataset

project_idinteger

Associated project ID

namestring

Dataset name

training_versionstring

The foundation model version this dataset targets (e.g., 'fibo', 'max').

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

Text prepended to captions.

  • For training_version = max/light/3.2/2.3: Required string.
  • For training_version = fibo: Null.
statusstring

Status of the dataset

Enum"draft""completed"
captions_update_statusstring

Status of captions update process, relevant for automatic captions generation.

Enum"empty""in_progress""completed"
upload_typestring

The upload type

Enum"basic""advanced"
captions_sourcestring

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'.

Enum"automatic""manual"
images_countinteger
created_atstring(date-time)

Timestamp when the dataset was created

updated_atstring(date-time)

Timestamp when the dataset was last updated

]
Response
application/json
[ { "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" } ]

Get Datasets by Project

Request

Retrieve all datasets for a specific project

Path
project_idstringrequired

Project ID

Query
include_modelsboolean

If true, a list of model objects using the dataset should be included in the response under the parameter 'models'

Default false
include_models_idsboolean

If true, a list of model ids using the dataset should be included in the response under the parameter 'model_ids'

Default false
Headers
api_tokenstringrequired
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'

Responses

Successfully retrieved datasets

Bodyapplication/jsonArray [
idinteger

Unique identifier for the dataset

project_idinteger

Associated project ID

namestring

Dataset name

training_versionstring

The foundation model version this dataset targets (e.g., 'fibo', 'max').

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

Text prepended to captions.

  • For training_version = max/light/3.2/2.3: Required string.
  • For training_version = fibo: Null.
upload_typestring

The upload type

Enum"basic""advanced"
captions_sourcestring

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'.

Enum"automatic""manual"
images_countinteger

Number of images in the dataset

statusstring

Status of the dataset

Enum"draft""completed"
captions_update_statusstring

Status of captions update process

Enum"empty""in_progress""completed"
modelsArray of objects

List of model objects using this dataset. Only included when include_models=true

model_idsArray of strings

List of model IDs using this dataset. Only included when include_models_ids=true

created_atstring(date-time)

Timestamp when the dataset was created

updated_atstring(date-time)

Timestamp when the dataset was last updated

]
Response
application/json
[ { "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" } ]

Get Dataset by ID

Request

Retrieve a specific dataset

Path
dataset_idintegerrequired

Dataset ID

Query
max_imagesinteger[ 1 .. 200 ]

The maximum number of images to retrieve. activate this parameter to make your calls more effective.

Default 200
Headers
api_tokenstringrequired
curl -i -X GET \
  'https://engine.prod.bria-api.com/v1/tailored-gen/datasets/{dataset_id}?max_images=200' \
  -H 'api_token: string'

Responses

Successfully retrieved dataset

Bodyapplication/json
idinteger

Unique identifier for the dataset

project_idinteger

Associated project ID

namestring

Dataset name

training_versionstring

The foundation model version this dataset targets (e.g., 'fibo', 'max').

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

Text prepended to captions.

  • For training_version = max/light/3.2/2.3: Required string.
  • For training_version = fibo: Null.
statusstring

Status of the dataset

Enum"draft""completed"
captions_update_statusstring

Status of captions update process

Enum"empty""in_progress""completed"
upload_typestring

The method used to upload images to the dataset. 'basic' is the default.

Enum"basic""advanced"
visual_schemastring

A string containing the JSON structure from /generate_visual_schema. Allowed only for fibo training version.

captions_sourcestring

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'.

Enum"automatic""manual"
images_countinteger

Number of images in the dataset

imagesArray of objects

Array of images in the dataset (up to 200, controlled by the max_images query)

images[].​idinteger

Unique identifier for the image

images[].​dataset_idinteger

ID of the dataset this image belongs to

images[].​captionstring

Once an image is uploaded, a caption is generated automatically. The caption is a natural continuation of the caption_prefix.

images[].​caption_sourcestring or null

Source of the caption. 'unknown' value only appears for images that were uploaded using an old version of Tailored Generation.

Enum"automatic""manual""unknown"
images[].​upload_source_urlstring or null

The original URL provided by the user for the image.

images[].​image_namestring

Name of the image

images[].​image_urlstring

URL of the original image file

images[].​thumbnail_urlstring

URL of the image thumbnail

images[].​created_atstring(date-time)

Timestamp when the image was created

images[].​updated_atstring(date-time)

Timestamp when the image was last updated

created_atstring(date-time)

Timestamp when the dataset was created

updated_atstring(date-time)

Timestamp when the dataset was last updated

Response
application/json
{ "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": "basic", "training_vesion": "3.2", "visual_schema": null, "captions_source": null, "images_count": 2, "images": [ { "id": 789, "dataset_id": 456, "caption": "standing in a confident pose wearing a blue dress", "caption_source": "automatic", "upload_source_url": null, "image_name": "lora_standing.png", "image_url": "https://api.example.com/files/lora_standing.png", "thumbnail_url": "https://api.example.com/files/lora_standing_thumb.png", "created_at": "2024-05-26T12:30:00Z", "updated_at": "2024-05-26T12:30:00Z" }, { "id": 790, "dataset_id": 456, "caption": "sitting on a chair with a gentle smile", "caption_source": "automatic", "upload_source_url": null, "image_name": "lora_sitting.png", "image_url": "https://api.example.com/files/lora_sitting.png", "thumbnail_url": "https://api.example.com/files/lora_sitting_thumb.png", "created_at": "2024-05-26T12:45:00Z", "updated_at": "2024-05-26T12:45:00Z" } ], "created_at": "2024-05-26T12:00:00Z", "updated_at": "2024-05-26T14:30:00Z" }

Model

Manage and train models

Operations

Image Generation V2

Generation using FIBO models

Operations

Image Generation (Legacy)

Generation using Legacy models

Operations

Video Generation

Image-to-Video capabilities

Operations