# Training Endpoints ## Create Project - [POST /tailored-gen/projects](https://docs.bria.ai/tailored-generation/training-endpoints/create-project.md): 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: A specific character that maintains consistent identity and unique traits while being reproduced in different poses, situations, and actions. Medium: Photography Medium: Illustration Complete environments or scenes created with a consistent visual style, look, and feel. Medium: Photography Medium: Illustration A collection of different objects sharing a common style, design language, or color scheme. Objects are typically isolated on solid backgrounds. Multiple variations of the same object type, maintaining consistent style and structure while showing different interpretations. Objects are typically isolated on solid backgrounds. 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. Multiple characters sharing the same fundamental structure, style, and color palette, allowing creation of new characters that fit within the established design system. ## Get Projects - [GET /tailored-gen/projects](https://docs.bria.ai/tailored-generation/training-endpoints/get-projects.md): Retrieve all projects within the organization. If there are no projects, returns an empty array. ## Get Project by ID - [GET /tailored-gen/projects/{project_id}](https://docs.bria.ai/tailored-generation/training-endpoints/get-project-by-id.md): Retrieve full project information including project name and description, IP name and description, IP medium (photography/illustration), IP type, status, and timestamps. ## Update Project - [PUT /tailored-gen/projects/{project_id}](https://docs.bria.ai/tailored-generation/training-endpoints/update-project.md): Update a specific project ## Delete Project - [DELETE /tailored-gen/projects/{project_id}](https://docs.bria.ai/tailored-generation/training-endpoints/delete-project.md): 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. ## Generate Caption Prefix - [POST /tailored-gen/generate_prefix](https://docs.bria.ai/tailored-generation/training-endpoints/generate-prefix.md): Generates a caption prefix based on the provided images. This is currently supported only when is , 'defined_character' or 'object_variants' IP types. ##### Usage Scenarios: 1. - This use case applies when creating a new dataset. - In the first step, you can while calling this endpoint. - Randomly . If there are , provide exactly for the best results. - Once you receive the prefix, update the dataset using the endpoint. - Then, proceed with uploading images to the dataset. 2. - This allows users to select the prefix they prefer. - Randomly . If there are , provide exactly for the best results. - Update the dataset with the new prefix. - Then, use the endpoint to ensure all images in the dataset get updated captions. If any image fails validation, the request will fail. This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content - the first blocked input image will fail the entire request. ## Create Dataset - [POST /tailored-gen/datasets](https://docs.bria.ai/tailored-generation/training-endpoints/create-dataset.md): Create a new dataset. Constraints: * Dataset must have at least 1 image to be completed * Maximum of 200 images per dataset When creating a dataset, a defoult caption prefix is created in all cases. When creating a dataset with , 'defined_character' or 'object_variants' IP types, it is to generate an advanced caption prefix before uploading images. To do this, use the endpoint, send up to 6 images, and update the dataset with the received prefix using the endpoint. Once the prefix is updated, proceed with uploading images. Uploaded images will be automatically resized so that the shortest side is 1024 pixels while maintaining the aspect ratio. Then, a centered 1024x1024 crop will be applied. The final cropped image will be saved for training. ## Get Datasets - [GET /tailored-gen/datasets](https://docs.bria.ai/tailored-generation/training-endpoints/get-datasets.md): Retrieve a list of all datasets. If there are no datasets, returns an empty array. ## Get Datasets by Project - [GET /tailored-gen/projects/{project_id}/datasets](https://docs.bria.ai/tailored-generation/training-endpoints/get-datasets-by-project.md): Retrieve all datasets for a specific project ## Get Dataset by ID - [GET /tailored-gen/datasets/{dataset_id}](https://docs.bria.ai/tailored-generation/training-endpoints/get-dataset-by-id.md): Retrieve a specific dataset ## Update Dataset - [PUT /tailored-gen/datasets/{dataset_id}](https://docs.bria.ai/tailored-generation/training-endpoints/update-dataset.md): 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: * Images cannot be added or removed * Image captions cannot be edited * Caption prefix cannot be modified If the caption prefix needs to be changed, update it here first, then use the endpoint to refresh all captions with the new prefix. If you want to generate an advanced , use the endpoint before updating the dataset. It is recommended to use the route Clone Dataset As Draft in order to create a new version of a dataset. Constraints: * Cannot update caption_prefix if dataset status is completed * Dataset must have at least 1 image to be marked as completed ## Delete Dataset - [DELETE /tailored-gen/datasets/{dataset_id}](https://docs.bria.ai/tailored-generation/training-endpoints/delete-dataset.md): Delete a specific dataset. Deletes all associated images. ## Clone Dataset As Draft - [POST /tailored-gen/datasets/{dataset_id}/clone](https://docs.bria.ai/tailored-generation/training-endpoints/clone-dataset.md): 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). ## Upload Image - [POST /tailored-gen/datasets/{dataset_id}/images](https://docs.bria.ai/tailored-generation/training-endpoints/upload-image.md): Upload new image to a dataset. Image Requirements: - Recommended minimum resolution: 1024x1024 pixels for best quality - By default, smaller images (down to 256x256) will be automatically upscaled to meet this threshold () - To strictly enforce the 1024x1024 minimum, set - Supported formats: jpg, jpeg, png, webp - Preferably use original high-quality assets - For best results, use 1:1 aspect ratio or ensure main content is centered Dataset Guidelines: - Recommended: 5-50 images for optimal results when using Max training version, 15-100 for optimal results when using Light training version - Maximum supported: 200 images - Ensure consistency in style, structure, and visual elements - Balance diversity in content (poses, scenes, objects) while maintaining consistency in key elements (style, colors, theme) - Note: Larger datasets may introduce more variety, which can reduce overall consistency For optimal training (especially for characters/objects): - Subject should occupy most of the image area - Minimize unnecessary margins around the subject - Transparent backgrounds will be converted to black - For character datasets: include diverse poses, environments, attires, and interactions Captions and Generation: - Each image receives an automatic caption that continues from the dataset's caption prefix - Default caption prefix is recommended for initial training - Captions can be modified to include domain-specific terms - Both captions and prefix influence training and future generations - Focus on essential elements rather than extensive details Constraints: - Dataset must have at least 1 image - Dataset cannot exceed 200 images - Cannot upload to a completed dataset This API endpoint supports content moderation via an optional parameter that can prevent processing if input images contain inappropriate content - the first blocked input image will fail the entire request. ## Get Images - [GET /tailored-gen/datasets/{dataset_id}/images](https://docs.bria.ai/tailored-generation/training-endpoints/get-images.md): Retrieve all images in a specific dataset. If there are no images, returns an empty array. ## Regenerate All Captions - [PUT /tailored-gen/datasets/{dataset_id}/images](https://docs.bria.ai/tailored-generation/training-endpoints/regenerate-all-captions.md): 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'. ## Get Image by ID - [GET /tailored-gen/datasets/{dataset_id}/images/{image_id}](https://docs.bria.ai/tailored-generation/training-endpoints/get-image.md): 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. ## Update Image Caption - [PUT /tailored-gen/datasets/{dataset_id}/images/{image_id}](https://docs.bria.ai/tailored-generation/training-endpoints/update-image-caption.md): Update the caption of a specific image. There are two mutually exclusive ways to update a caption: 1. Provide a new caption text: * Use the parameter * This will set to "manual" * Reflects a human-written caption 2. Request automatic caption regeneration: * Set to true * This will set to "automatic" * A new caption will be generated automatically based on the image and caption_prefix * For the same caption_prefix, regenerate_caption will always return the same caption * Useful for resetting captions or regenerating them after changing the caption_prefix Note: You cannot provide both parameters simultaneously as they represent different update approaches. Constraints: * Cannot update captions in a completed dataset * Cannot provide both caption and regenerate_caption in the same request ## Delete Image - [DELETE /tailored-gen/datasets/{dataset_id}/images/{image_id}](https://docs.bria.ai/tailored-generation/training-endpoints/delete-image.md): Permanently remove an image from a dataset. This will also delete the image files and associated thumbnails. Constraints: * Cannot delete images from completed datasets ## Create Model - [POST /tailored-gen/models](https://docs.bria.ai/tailored-generation/training-endpoints/create-model.md): 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. ## Get Models - [GET /tailored-gen/models](https://docs.bria.ai/tailored-generation/training-endpoints/get-models.md): Retrieve a list of models. If there are no models, an empty array is returned. ## Upload Model - [POST /tailored-gen/models/upload_model](https://docs.bria.ai/tailored-generation/training-endpoints/upload-model.md): This API allows users to upload a pre-trained tailored model to Bria’s infrastructure, and run them within Bria’s ecosystem. Model has to be in .safetensors format. Maximum model size supported is 3GB. You can find out the model's status by using the route. Potential statuses are: "syncing" or "completed". ## Get Models by Project - [GET /tailored-gen/projects/{project_id}/models](https://docs.bria.ai/tailored-generation/training-endpoints/get-models-by-project.md): Retrieve all models for a project. If there are no models, an empty array is returned. ## Get Model by ID - [GET /tailored-gen/models/{model_id}](https://docs.bria.ai/tailored-generation/training-endpoints/get-model.md): 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. ## Update Model - [PUT /tailored-gen/models/{model_id}](https://docs.bria.ai/tailored-generation/training-endpoints/update-model.md): Update a model's name and description. Other model attributes such as training version and dataset cannot be modified after creation. ## Delete Model - [DELETE /tailored-gen/models/{model_id}](https://docs.bria.ai/tailored-generation/training-endpoints/delete-model.md): Delete a specific model. Changes status to Deleted. ## Start Training - [POST /tailored-gen/models/{model_id}/start_training](https://docs.bria.ai/tailored-generation/training-endpoints/start-training.md): Start model training (1-3 hours duration). The associated dataset must have status 'completed' before training can begin. Constraints: * Dataset must be in 'completed' status ## Stop Training - [POST /tailored-gen/models/{model_id}/stop_training](https://docs.bria.ai/tailored-generation/training-endpoints/stop-training.md): Stop an ongoing model training process. Once stopped, training cannot be resumed - a new model would need to be created and trained. ## Download Tailored Model - [GET /tailored-gen/models/{model_id}/download](https://docs.bria.ai/tailored-generation/training-endpoints/download-tailored-model.md): Enables users to download a trained tailored generation model after completing the training process. The response includes a pre-signed URL for downloading the model, details about the base model used, and the prompt prefix applied during training. To use the tailored model source code, access to the base model source code is required. The base model source code is exclusively available through Bria's product. For more information or to gain access, contact us at .