Description This route allows you to generate images using a Tailored Model. Tailored models are trained on a visual IP (illustrations, photos, vectors) to faithfully reproduce specific IP elements or guidelines. You can train an engine through our Console or implement training on your platform via API.
Project Management: Create and manage projects which define the IP characteristics:
/projects
endpoints to create a new project or retrieve existing projects that belong to your organization./projects/{id}
endpoints to update or delete specific projects.Dataset Management: Create and manage datasets within your projects. You can:
/datasets
endpoints to create new datasets or retrieve existing ones./datasets/{dataset_id}/images
endpoints to upload images and manage their captions.Model Management: Create and train models based on your datasets:
/models
endpoints to create new models or list existing ones.To train a tailored model:
Create a Project: Use the /projects
endpoint to create a project and define your IP type and medium.
Create a Dataset: Use the /datasets
endpoint to create a dataset within your project.
Upload Images: Upload images to your dataset using the /datasets/{dataset_id}/images
endpoint. Images must be 1024x1024px minimum.
Prepare Dataset: Review auto-generated captions and use the /datasets/{id}
endpoint to set status to 'completed'.
Create Model: Use the /models
endpoint to create a model, selecting light or max training version.
Start Training: Initiate training using the /models/{id}/start_training
endpoint. Training takes 1-3 hours.
Monitor Progress: Check training status using the /models/{id}
endpoint until status shows 'Completed'.
Generate Images: Once trained, your model can be used in multiple ways:
/text-to-image/tailored/{model_id}
endpoint for text-to-image generation/text-to-vector/tailored/{model_id}
endpoint for generating illustrative vector graphics/reimagine/tailored/{model_id}
endpoint for generating using a structure reference imagesAlternatively, you can use the Bria platform to manage and train your tailored models through a user-friendly interface. Access the Bria platform here.
This API supports various guidance methods to provide greater control over text-to-image generation. These methods condition the model on additional inputs derived from user-provided images.
ControlNets:
A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation.
Using ControlNets
You can specify up to four ControlNet guidance methods in a single request. Each method requires an accompanying image and a scale parameter to determine its impact on the generation inference. The table below provides detailed information about each guidance method, with an example os use:
Guidance Method | Prompt | Scale | Input Image | Guidance Image | Output Image |
---|---|---|---|---|---|
ControlNet Canny | An exotic colorful shell on the beach | 1.0 | |||
ControlNet Depth | A dog, exploring an alien planet | 0.8 | |||
ControlNet Recoloring | A vibrant photo of a woman | 1.00 | |||
ControlNet Color Grid | A dynamic fantasy illustration of an erupting volcano | 0.7 |
To use ControlNets guidance method, include the following parameters in your request:
guidance_method_X
: Specify the guidance method (where X is 1, 2). If the paramter guidance_method_2 is used, so does guidance_method_1 has to be used, and so on. If you would like to use only one method, use the paratmer guidance_method_1guidance_method_X_scale
: Set the impact of the guidance (0.0 to 1.0)guidance_method_X_image_file
: Provide the base64-encoded input imageIP_adapter:
Guides the model based on the input image and its associated style. This method offers two modes:
Using IP-Adapter
Guidance Method | Prompt | Mode | Scale | Guidance Image | Output Image |
---|---|---|---|---|---|
IP-adapter | A drawing of a lion laid on a table. | regular | 0.85 | ||
IP-adapter | A drawing of a bird. | style | 1 |
Successful operation.
Bad request.
Method not allowed.
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error.
Description
This route allows you to generate vector graphics using a Tailored Model. Tailored Models are trained on your visual IP (illustrations, photos, vectors) to preserve and faithfully reproduce specific IP elements or guidelines, ensuring consistency across all generated outputs. To see a detailed description of the tailored models' functionalities, please refer to the /text-to-image/tailored/{model_id} route documentation. *Text-to-vector is compatible with tailored models in the illustrative domain.
This API supports various guidance methods to provide greater control over text-to-image generation. These methods condition the model on additional inputs derived from user-provided images.
ControlNets:
A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation.
Using ControlNets
You can specify up to four ControlNet guidance methods in a single request. Each method requires an accompanying image and a scale parameter to determine its impact on the generation inference. The table below provides detailed information about each guidance method, with an example os use:
Guidance Method | Prompt | Scale | Input Image | Guidance Image | Output Image |
---|---|---|---|---|---|
ControlNet Canny | An exotic colorful shell on the beach | 1.0 | |||
ControlNet Depth | A dog, exploring an alien planet | 0.8 | |||
ControlNet Recoloring | A vibrant photo of a woman | 1.00 | |||
ControlNet Color Grid | A dynamic fantasy illustration of an erupting volcano | 0.7 |
To use ControlNets guidance method, include the following parameters in your request:
guidance_method_X
: Specify the guidance method (where X is 1, 2). If the paramter guidance_method_2 is used, so does guidance_method_1 has to be used, and so on. If you would like to use only one method, use the paratmer guidance_method_1guidance_method_X_scale
: Set the impact of the guidance (0.0 to 1.0)guidance_method_X_image_file
: Provide the base64-encoded input imageIP_adapter:
Guides the model based on the input image and its associated style. This method offers two modes:
Using IP-Adapter
Guidance Method | Prompt | Mode | Scale | Guidance Image | Output Image |
---|---|---|---|---|---|
IP-adapter | A drawing of a lion laid on a table. | regular | 0.85 | ||
IP-adapter | A drawing of a bird. | style | 1 |
Successful operation.
Bad request.
Forbidden. Insufficient permissions to access the image URL..
Method not allowed.
Unsupported Media Type. Invalid file type. Supported file types are jpeg, jpg, png, webp.
Unprocessable Entity. The URL does not point to a valid image or is inaccessible.
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error.
Create a new project within the organization. A project encompasses all models trained and datasets created for the IP defined in the project.
The following IP types are supported:
Multi-Object Set A collection of different objects sharing a common style, design language, or color scheme. Objects are typically isolated on solid backgrounds.
Object Variants Multiple variations of the same object type, maintaining consistent style and structure while showing different interpretations. Objects are typically isolated on solid backgrounds.
Icons A collection of cohesive, small-scale illustrations or symbols designed to represent concepts, actions, or objects in interfaces and applications. Maintains consistent visual style across the set.
Defined Character A specific character that maintains consistent identity and unique traits while being reproduced in different poses, situations, and actions.
Character Variants Multiple characters sharing the same fundamental structure, style, and color palette, allowing creation of new characters that fit within the established design system.
Stylized Scene Complete environments or scenes created with a consistent visual style, look, and feel.
Project successfully created
Bad request - validation error
Unauthorized
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 123,
- "project_name": "Branded Character",
- "project_description": "",
- "ip_name": "Lora",
- "ip_description": "A female character with purple hair",
- "ip_medium": "illustration",
- "ip_type": "defined_character",
- "status": "active",
- "created_at": "2024-05-26T12:00:00Z"
}
Retrieve all projects within the organization. If there are no projects, returns an empty array.
Successfully retrieved projects
Unauthorized
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "id": 123,
- "project_name": "Branded Character",
- "project_description": "",
- "ip_name": "Lora",
- "ip_description": "A female character with purple hair",
- "ip_medium": "illustration",
- "ip_type": "defined_character",
- "status": "active",
- "created_at": "2024-05-26T12:00:00Z",
- "updated_at": "2024-05-26T14:30:00Z"
}, - {
- "id": 124,
- "project_name": "Branded icons",
- "project_description": "",
- "ip_name": "",
- "ip_description": "",
- "ip_medium": "illustration",
- "ip_type": "icons",
- "status": "active",
- "created_at": "2024-05-27T09:00:00Z",
- "updated_at": "2024-05-27T10:15:00Z"
}
]
Retrieve full project information including project name and description, IP name and description, IP medium (photography/illustration), IP type, status, and timestamps.
Successfully retrieved project
Unauthorized
Project not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 123,
- "project_name": "Branded Character",
- "project_description": "",
- "ip_name": "Lora",
- "ip_description": "A female character with purple hair",
- "ip_medium": "illustration",
- "ip_type": "defined_character",
- "status": "active",
- "created_at": "2024-05-26T12:00:00Z"
}
Update a specific project
Project successfully updated
Unauthorized
Project not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 123,
- "project_name": "Branded Character",
- "project_description": "",
- "ip_name": "Lora",
- "ip_description": "A girl with purple hair",
- "ip_medium": "illustration",
- "ip_type": "defined_character",
- "status": "active",
- "created_at": "2024-05-26T12:00:00Z"
}
Permanently delete a project and all its associated resources, including all datasets, images, and models. This action cannot be undone. Training models must be stopped before deletion.
Project successfully deleted
Unauthorized
Project not found
Cannot delete project while models are in training
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
Create a new dataset.
Constraints:
Dataset successfully created
Bad request - validation error
Unauthorized
Project not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "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",
- "created_at": "2024-05-26T12:00:00Z",
- "updated_at": "2024-05-26T12:00:00Z"
}
Retrieve a list of all datasets. If there are no datasets, returns an empty array.
Successfully retrieved datasets
Unauthorized
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "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",
- "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",
- "created_at": "2024-05-27T09:00:00Z",
- "updated_at": "2024-05-27T09:00:00Z"
}
]
Retrieve all datasets for a specific project
Successfully retrieved datasets
Unauthorized
Project not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "id": 456,
- "project_id": 123,
- "name": "dataset v1",
- "caption_prefix": "An illustration of a character named Lora, a female character with purple hair,",
- "images_count": 15,
- "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,",
- "images_count": 8,
- "status": "draft",
- "captions_update_status": "empty",
- "created_at": "2024-05-27T09:00:00Z",
- "updated_at": "2024-05-27T09:00:00Z"
}
]
Retrieve a specific dataset
Successfully retrieved dataset
Unauthorized
Dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "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",
- "images_count": 2,
- "images": [
- {
- "id": 789,
- "dataset_id": 456,
- "caption": "standing in a confident pose wearing a blue dress",
- "caption_source": "automatic",
- "image_name": "lora_standing.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",
- "image_name": "lora_sitting.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"
}
Update a dataset.
In order to use a dataset in a model training, its status must be set to completed.
Once a dataset status is changed to completed:
It is recommended to use the route Clone Dataset As Draft in order to create a new version of a dataset.
Constraints:
Dataset successfully updated
Bad request - validation error
Unauthorized
Dataset not found
Conflict error
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "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",
- "created_at": "2024-05-26T12:00:00Z",
- "updated_at": "2024-05-26T15:30:00Z"
}
Delete a specific dataset. Deletes all associated images.
Dataset successfully deleted
Unauthorized
Dataset not found
Cannot delete a dataset that is used by a model that is in training
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
Create a new draft dataset based on existing one. This is useful when you would like to use the same dataset again for another training, but with some modification (create a variation).
Dataset successfully cloned
Unauthorized
Dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 457,
- "project_id": 123,
- "name": "Copy of dataset v1 - modified version",
- "caption_prefix": "An illustration of a character named Lora, a female character with purple hair,",
- "status": "draft",
- "captions_update_status": "empty",
- "images_count": 2,
- "images": [
- {
- "id": 791,
- "dataset_id": 457,
- "caption": "standing in a confident pose wearing a blue dress",
- "caption_source": "automatic",
- "image_name": "lora_standing.png",
- "created_at": "2024-05-26T15:30:00Z",
- "updated_at": "2024-05-26T15:30:00Z"
}, - {
- "id": 792,
- "dataset_id": 457,
- "caption": "sitting on a chair with a gentle smile",
- "caption_source": "automatic",
- "image_name": "lora_sitting.png",
- "created_at": "2024-05-26T15:30:00Z",
- "updated_at": "2024-05-26T15:30:00Z"
}
], - "created_at": "2024-05-26T15:30:00Z",
- "updated_at": "2024-05-26T15:30:00Z"
}
Upload new image to a dataset.
Image Requirements:
Dataset Guidelines:
For optimal training (especially for characters/objects):
Captions and Generation:
Constraints:
Image successfully uploaded
Bad request
Unauthorized
Dataset not found
Conflict error
Precondition Failed.
Unsupported Media Type.
Unprocessable Entity.
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "dataset_id": 456,
- "caption": "standing in a confident pose wearing a blue dress",
- "caption_source": "automatic",
- "image_name": "lora_standing.png",
- "created_at": "2024-05-26T12:30:00Z",
- "updated_at": "2024-05-26T12:30:00Z"
}
Retrieve all images in a specific dataset. If there are no images, returns an empty array.
Successfully retrieved images
Unauthorized
Dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "id": 789,
- "dataset_id": 456,
- "caption": "standing in a confident pose wearing a blue dress",
- "caption_source": "automatic",
- "image_name": "lora_standing.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": "manual",
- "image_name": "lora_sitting.png",
- "created_at": "2024-05-26T12:45:00Z",
- "updated_at": "2024-05-26T13:15:00Z"
}
]
Regenerate captions for all images in dataset. This action is crucial after the user updates the caption_prefix, and then it's recommended to regenerate all the captions of all images, to have full compatibility with the new caption_prefix.
This is an asynchronous operation. Once this endpoint is called, Get Dataset by ID should be sampled until the captions_update_status changes to 'completed'.
Caption regeneration process started
Unauthorized
Dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "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": "in_progress",
- "created_at": "2024-05-26T12:00:00Z",
- "updated_at": "2024-05-26T15:45:00Z"
}
Retrieve full image information including caption (which naturally continues the dataset's caption_prefix), caption source (automatic/manual/unknown), image name, URL and thumbnail URL, dataset ID, and timestamps.
Successfully retrieved image
Unauthorized
Image or dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "dataset_id": 456,
- "caption": "standing in a confident pose wearing a blue dress",
- "caption_source": "automatic",
- "image_name": "lora_standing.png",
- "created_at": "2024-05-26T12:30:00Z",
- "updated_at": "2024-05-26T12:30:00Z"
}
Update the caption of a specific image. There are two mutually exclusive ways to update a caption:
Provide a new caption text:
caption
parametercaption_source
to "manual"Request automatic caption regeneration:
regenerate_caption
to truecaption_source
to "automatic"Note: You cannot provide both parameters simultaneously as they represent different update approaches.
Constraints:
Caption successfully updated
Bad request - Both caption and regenerate_caption provided
Unauthorized
Image or dataset not found
Cannot update caption in a completed dataset
Dataset deleted
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "dataset_id": 456,
- "caption": "standing confidently in a defensive pose wearing armor",
- "caption_source": "manual",
- "image_name": "lora_standing.png",
- "created_at": "2024-05-26T12:30:00Z",
- "updated_at": "2024-05-26T15:45:00Z"
}
Permanently remove an image from a dataset. This will also delete the image files and associated thumbnails.
Constraints:
Image successfully deleted
Unauthorized
Image or dataset not found
Cannot delete an image from a completed dataset
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "message": "Cannot delete an image from a completed dataset"
}
Create new model. A dataset can be used to train multiple models with different training versions (e.g., one light and one max). The model will belong to the same project as its dataset.
Model successfully created
Bad request - validation error
Unauthorized
Dataset not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "name": "Lora Character Model",
- "description": "A model trained on Lora character illustrations",
- "status": "created",
- "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"
}
Retrieve a list of models. If there are no models, an empty array is returned.
Successfully retrieved models
Unauthorized
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "id": 789,
- "name": "Lora Character Model",
- "description": "A 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"
}, - {
- "id": 790,
- "name": "Max Character Model",
- "description": "A model trained for faster generation",
- "status": "InProgress",
- "training_version": "max",
- "generation_prefix": "An illustration of a character named Max, a male character with spiky black hair,",
- "project_id": 123,
- "dataset_id": 457,
- "created_at": "2024-05-27T09:00:00Z"
}
]
Retrieve all models for a project. If there are no models, an empty array is returned.
Successfully retrieved models
Unauthorized
Project not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
[- {
- "id": 789,
- "name": "Lora Character Model",
- "description": "A 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",
- "updated_at": "2024-05-26T14:30:00Z"
}, - {
- "id": 790,
- "name": "Max Character Model",
- "description": "A model trained for faster generation",
- "status": "InProgress",
- "training_version": "max",
- "generation_prefix": "An illustration of a character named Max, a male character with spiky black hair,",
- "project_id": 123,
- "dataset_id": 457,
- "created_at": "2024-05-27T09:00:00Z",
- "updated_at": "2024-05-27T09:00:00Z"
}
]
Retrieve full model information including name, description, status (Created/InProgress/Completed/Failed/Stopping/Stopped), training version (Light/Max), generation prefix, project ID, dataset ID, and timestamps.
Successfully retrieved model
Unauthorized
Model not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "name": "Lora Character Model",
- "description": "A 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"
}
Update a model's name and description. Other model attributes such as training version and dataset cannot be modified after creation.
Model successfully updated
Unauthorized
Model not found
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "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 a specific model. Changes status to Deleted.
Model successfully deleted
Unauthorized
Model not found
Cannot delete a model that is currently in training
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "message": "Cannot delete model while it is in training"
}
Start model training (1-3 hours duration). The associated dataset must have status 'completed' before training can begin.
Constraints:
Training successfully started
Unauthorized
Model not found
Training already started/cannot be resumed
Dataset status must be 'completed' to start training
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error
{- "id": 789,
- "status": "InProgress"
}
Stop an ongoing model training process. Once stopped, training cannot be resumed - a new model would need to be created and trained.
Training job successfully stopped
Unauthorized
Model not found
Training already stopped/not in training
Request limit exceeded. Your account has reached its maximum allowed requests. Please upgrade your plan or try again later.
Internal server error