### Overview of Guidance Methods in Bria AI Tailored APIs Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/upload-model Explains the concept of guidance methods for AI generation, allowing visual control in addition to text prompts. Lists the Bria AI APIs that support these methods. ```APIDOC Supported APIs for Guidance Methods: - /text-to-image/tailored - /text-to-vector/tailored Guidance methods enable to guide the generation using not only a textual prompt, but also visuals. ``` -------------------------------- ### cURL Example: GET Request to Get Presenter Info API Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/image-to-psd Demonstrates how to make a GET request to the Bria-AI Person/Info API using cURL. This example retrieves information about people in a specific image by providing its visual ID in the path. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### API Guidance Methods: ControlNets and Image Prompt Adapter Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/create-model Comprehensive documentation for guidance methods used in AI generation APIs like /text-to-image/tailored and /text-to-vector/tailored. This includes details on ControlNets for structural and color guidance, and Image Prompt Adapter for content and style influence, along with their respective parameters and usage constraints. ```APIDOC Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored ControlNets: Description: A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation. Available ControlNet Methods: - controlnet_canny: Uses edge information from the input image to guide generation based on structural outlines. - controlnet_depth: Derives depth information to influence spatial arrangement in the generated image. - controlnet_recoloring: Uses a grayscale version of the input image to guide recoloring while preserving geometry. - controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image. Usage: - Up to two ControlNet guidance methods can be specified in a single request. - Each method requires an accompanying image and a scale parameter. - When using multiple ControlNets, all input images must have the same aspect ratio, which determines the aspect ratio of the generated results. Parameters: - guidance_method_X (string): Specifies the guidance method (where X is 1 or 2). If guidance_method_2 is used, guidance_method_1 must also be used. Use guidance_method_1 for a single method. - guidance_method_X_scale (float): Sets the impact of the guidance (range: 0.0 to 1.0). - guidance_method_X_image_file (string): Provides the base64-encoded input image. Image Prompt Adapter: Description: Offers two modes to guide generation using an image’s content, style elements, and color palette. Available Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Usage: - Include the following parameters in your request to use Image Prompt Adapter as guidance. Parameters: - image_prompt_mode (string): Specifies how the input image influences the generation (values: 'regular', 'style_only'). - image_prompt_scale (float): Sets the impact of the provided image on the generated result (range: 0.0 to 1.0). - image_prompt_file (string): Provides the base64-encoded image file to be used as guidance. - image_prompt_urls (array of strings): Provides a list of URLs pointing to publicly accessible images to be used as guidance. ``` -------------------------------- ### cURL Example: Get Dataset Images Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/upload-image Example cURL command to make a GET request to retrieve images from a specified dataset using an API token. This command includes the necessary headers and path parameters. ```curl curl -i -X GET \ 'https://engine.prod.bria-api.com/v1/tailored-gen/datasets/{dataset_id}/images' \ -H 'api_token: string' ``` -------------------------------- ### Curl Example: Get Person Information Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/crop Demonstrates how to make a GET request to the `/{visual_id}/person/info` endpoint using `curl`, specifying the `visual_id` in the path and including the `api_token` header. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### API Guidance Methods: ControlNets and Image Prompt Adapter Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-generation/endpoints/reimagine-structure-reference Comprehensive documentation for Bria AI's visual guidance methods, including ControlNets for detailed structural and color control, and Image Prompt Adapter for influencing content and style. These methods enhance generation capabilities for text-to-image and text-to-vector APIs. ```APIDOC Supported APIs for Guidance Methods: - /text-to-image/base - /text-to-image/fast - /text-to-vector/base - /text-to-vector/fast ControlNets: Description: A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation. Up to two ControlNet guidance methods can be specified per request. All input images must have the same aspect ratio when using multiple ControlNets. Methods: controlnet_canny: Description: Uses edge information from the input image to guide generation based on structural outlines. controlnet_depth: Description: Derives depth information to influence spatial arrangement in the generated image. controlnet_recoloring: Description: Uses a grayscale version of the input image to guide recoloring while preserving geometry. controlnet_color_grid: Description: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image. Parameters for ControlNets: guidance_method_X: Description: Specify the guidance method (where X is 1 or 2). If guidance_method_2 is used, guidance_method_1 must also be used. Use guidance_method_1 for a single method. Type: string (e.g., "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid") Constraints: X must be 1 or 2. guidance_method_X_scale: Description: Set the impact of the guidance. Type: float Range: 0.0 to 1.0 guidance_method_X_image_file: Description: Provide the base64-encoded input image. Type: string (base64-encoded image data) Image Prompt Adapter: Description: This method offers two modes to guide generation using an image's content, style elements, and color palette. Modes: regular: Description: Uses the image’s content, style elements, and color palette to guide generation. style_only: Description: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters for Image Prompt Adapter: image_prompt_mode: Description: Specify how the input image influences the generation. Type: string Allowed Values: "regular", "style_only" image_prompt_scale: Description: Set the impact of the provided image on the generated result. Type: float Range: 0.0 to 1.0 image_prompt_file: Description: Provide the base64-encoded image file to be used as guidance. Type: string (base64-encoded image data) image_prompt_urls: Description: Provide a list of URLs pointing to publicly accessible images to be used as guidance. Type: array of strings (URLs) ``` -------------------------------- ### cURL Example for Starting Model Training Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/delete-model Provides a cURL command example to demonstrate how to make a POST request to the /start_training endpoint, including necessary headers and a sample JSON request body for initiating model training. ```curl 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.1, "gradient_accumulation_steps": 1, "max_train_steps": 1 }' ``` -------------------------------- ### Bria AI API Guidance Methods Overview Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/generation-endpoints/text-to-image-tailored Introduces guidance methods for Bria AI's generation APIs, allowing visual control over generation. These methods enable guiding generation using visuals in addition to textual prompts. ```APIDOC Guidance Methods Overview: Some Bria AI APIs support various guidance methods to provide greater control over generation, enabling guidance using visuals in addition to textual prompts. Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored ``` -------------------------------- ### API Guidance Methods: ControlNets and Image Prompt Adapter Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/delete-dataset Comprehensive documentation for guidance methods applicable to `/text-to-image/tailored` and `/text-to-vector/tailored` APIs. This includes ControlNets for structural and color guidance, and Image Prompt Adapter for content and style influence. Users can specify parameters like `guidance_method_X`, `guidance_method_X_scale`, `guidance_method_X_image_file` for ControlNets, and `image_prompt_mode`, `image_prompt_scale`, `image_prompt_file`, or `image_prompt_urls` for Image Prompt Adapter. ```APIDOC Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored ControlNets: Description: A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation. Up to two ControlNet guidance methods can be specified per request. When using multiple, all input images must have the same aspect ratio. Available ControlNet Types: - controlnet_canny: Uses edge information from the input image to guide generation based on structural outlines. - controlnet_depth: Derives depth information to influence spatial arrangement in the generated image. - controlnet_recoloring: Uses a grayscale version of the input image to guide recoloring while preserving geometry. - controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image. Parameters for ControlNets: - guidance_method_X: (string, required) Specifies the guidance method. X can be 1 or 2. If guidance_method_2 is used, guidance_method_1 must also be used. Use guidance_method_1 for a single method. - Example Values: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid" - guidance_method_X_scale: (float, required) Sets the impact of the guidance. - Range: 0.0 to 1.0 - guidance_method_X_image_file: (string, required) Provides the base64-encoded input image for the guidance. Image Prompt Adapter: Description: This method offers two modes to guide generation using an image's content, style elements, and color palette. Available Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters for Image Prompt Adapter: - image_prompt_mode: (string, required) Specifies how the input image influences the generation. - Example Values: "regular", "style_only" - image_prompt_scale: (float, required) Sets the impact of the provided image on the generated result. - Range: 0.0 to 1.0 - image_prompt_file: (string, optional) Provides the base64-encoded image file to be used as guidance. - image_prompt_urls: (array of strings, optional) Provides a list of URLs pointing to publicly accessible images to be used as guidance. (Mutually exclusive with image_prompt_file) ``` -------------------------------- ### JSON Response Example: Get Dataset Images Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/upload-image An example of the successful JSON response body returned when retrieving images from a dataset, illustrating the structure and typical data for multiple image entries. ```json [ { "id": 789, "dataset_id": 456, "caption": "standing in a confident pose wearing a blue dress", "caption_source": "automatic", "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": "manual", "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-26T13:15:00Z" } ] ``` -------------------------------- ### Example Bria AI API Request Payload Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/image-expansion An example JSON payload demonstrating the structure for an API request. It includes a unique identifier (`id`) and action parameters such as `age`, `diversity`, and `expression` to guide the AI's output. ```JSON { "id": "c6bbe1cd719300c11e5c581889e9383245a0c1d923f210a3445e8ea5a25500e0", "actions": { "age": "mid-60", "diversity": "france", "expression": "happy" } } ``` -------------------------------- ### Image Prompt Adapter Guidance Method for Bria AI Generation APIs Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/section/training-process Explains the Image Prompt Adapter guidance method, which uses an input image's content, style, or color palette to influence AI generation. It describes the two modes ('regular' and 'style_only') and the required parameters for specifying the image source (base64-encoded file or public URLs) and its impact scale. ```APIDOC Image Prompt Adapter Guidance Method: Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored Description: This method offers two modes to guide generation using an input image's content, style elements, and/or color palette. Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Request Parameters: - image_prompt_mode: (string) Specifies how the input image influences the generation. - Valid values: "regular", "style_only" - image_prompt_scale: (float) Sets the impact of the provided image on the generated result. Range: 0.0 to 1.0. - image_prompt_file: (string, optional) Provides the base64-encoded image file to be used as guidance. - image_prompt_urls: (array of strings, optional) Provides a list of URLs pointing to publicly accessible images to be used as guidance. - Note: Either image_prompt_file or image_prompt_urls must be provided. ``` -------------------------------- ### cURL Example: Retrieve Person Information Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/person-info Example cURL command to send a GET request to the `/{visual_id}/person/info` endpoint, using a specific `visual_id` to retrieve information about people in the image. This demonstrates how to include the `api_token` header and the `visual_id` in the URL path. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### Bria AI Generation Guidance Methods: ControlNets and Image Prompt Adapter Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/start-training This documentation details the guidance methods available for Bria AI's generation APIs, such as `/text-to-image/tailored` and `/text-to-vector/tailored`. These methods allow users to control AI generation using visual inputs in addition to textual prompts, offering fine-grained control over output characteristics like structure, depth, color, and style. Two primary methods are described: ControlNets for structural and color guidance, and Image Prompt Adapter for content and style influence. ```APIDOC Bria AI Guidance Methods: Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored ControlNets: Description: A set of methods for conditioning the model on additional inputs, providing detailed control over image generation. Up to two ControlNet guidance methods can be specified per request. All input images must have the same aspect ratio. Types: - controlnet_canny: Uses edge information from the input image to guide generation based on structural outlines. - controlnet_depth: Derives depth information to influence spatial arrangement in the generated image. - controlnet_recoloring: Uses a grayscale version of the input image to guide recoloring while preserving geometry. - controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image. Parameters: - guidance_method_X: (string, required) Specify the guidance method (where X is 1 or 2). If guidance_method_2 is used, guidance_method_1 must also be used. Use guidance_method_1 for a single method. Valid values: controlnet_canny, controlnet_depth, controlnet_recoloring, controlnet_color_grid - guidance_method_X_scale: (float, required) Set the impact of the guidance (range: 0.0 to 1.0). - guidance_method_X_image_file: (string, required) Provide the base64-encoded input image. Image Prompt Adapter: Description: This method offers two modes to influence generation based on an input image. Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters: - image_prompt_mode: (string, required) Specify how the input image influences the generation. Valid values: regular, style_only - image_prompt_scale: (float, required) Set the impact of the provided image on the generated result (range: 0.0 to 1.0). - image_prompt_file: (string, optional) Provide the base64-encoded image file to be used as guidance. - image_prompt_urls: (array of strings, optional) Provide a list of URLs pointing to publicly accessible images to be used as guidance. (Note: Either image_prompt_file or image_prompt_urls should be provided). ``` -------------------------------- ### Bria AI Text-to-Image API Endpoint and Parameters Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-generation/endpoints/reimagine-structure-reference Comprehensive documentation for the Bria AI text-to-image generation API, detailing the POST endpoint, its various input parameters for guidance and image prompting, and the expected error handling behavior for both synchronous and asynchronous requests. ```APIDOC POST /text-to-image/base/{model_version} Endpoint: https://engine.prod.bria-api.com/v1/text-to-image/base/{model_version} Error Handling: - If all generated images fail moderation, returns a 422 error. - If some images pass and others fail, returns a 200 response with successful generations and "blocked" objects for failed ones. Asynchronous Requests (sync=false): - Failed images are replaced with zero-byte files at their placeholder URLs. - Successful images are stored at their original placeholder URLs. Parameters: - ip_signal: boolean Description: Flags prompts with potential IP content. If detected, a warning will be included in the response. Default: false - guidance_method_1: string Description: Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. Support is currently available only when model_version="2.3". This parameter is optional. Enum: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid" - guidance_method_1_scale: number (float) [0 .. 1] Description: The impact of the guidance. Default: 1 - guidance_method_1_image_file: string (base64) Description: The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more than one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided. - guidance_method_2: string Description: Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. Support is currently available only when model_version="2.3". This parameter is optional. Enum: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid" - guidance_method_2_scale: number (float) [0 .. 1] Description: The impact of the guidance. Default: 1 - guidance_method_2_image_file: string (base64) Description: The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more than one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided. - image_prompt_mode: string Description: - `regular`: Uses the image’s content, style elements, and color palette to guide generation. - `style_only`: Uses the image’s high-level style elements and color palette to influence the generated output. Support for image prompt is currently available only when model_version="2.3". Default: "regular" Enum: "regular", "style_only" - image_prompt_file: string (base64) Description: The image file to be used as guidance, in base64 format. Accepted formats are jpeg, jpg, png, webp. Support for image prompt is currently available only when model_version="2.3". Maximum file size 12MB. This image can be of any aspect ratio, even when it's not aligned with the one defined in the parameter 'aspect_ratio' or by visuals provided to the ControlNets. - image_prompt_urls: Array of strings (uri) Description: A list of URLs of images that should be used as guidance. The images can be of different aspect ratios. Accepted formats are jpeg, jpg, png, webp. The URLs should point to accessible, publicly available images. Support for image prompt is currently available only when model_version="2.3". - image_prompt_scale: number (float) [0 .. 1] Description: The impact of the provided image on the generated results. A value between 0.0 (no impact) and 1.0 (full impact). Default: 1 ``` -------------------------------- ### Curl Example: Get Person Information by Visual ID Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/background-replace Demonstrates how to call the `GET /{visual_id}/person/info` endpoint using `curl` to retrieve information about people in a specific image. The image is identified by its `visual_id`, which must be obtained from a prior `/upload` or `/register` operation. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### Curl Example: Create Visual API Request Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/image-to-psd An example of how to make a POST request to the /create endpoint using curl, demonstrating the basic structure for sending a JSON payload with image modification requests. Note that the provided snippet is incomplete and serves as a starting point. ```curl curl -i -X POST \ https://engine.prod.bria-api.com/v1/8487fb411f3c6716/create \ -H 'Content-Type: application/json' \ -H 'api_token: string' \ -d '{ "changes": [ { ``` -------------------------------- ### Image Prompt Adapter Guidance Method for Bria AI Generation Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/get-model Describes the Image Prompt Adapter method, which uses an image's content, style, or color palette to guide generation. It outlines the two available modes and the required parameters for API requests. ```APIDOC Image Prompt Adapter Guidance Method: Description: This method offers two modes to guide generation using an input image. Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters for API Request: - image_prompt_mode: (string, required) Specify how the input image influences the generation. Allowed values: "regular", "style_only" - image_prompt_scale: (float, required) Set the impact of the provided image on the generated result (range: 0.0 to 1.0). - image_prompt_file: (string, optional) Provide the base64-encoded image file to be used as guidance. - image_prompt_urls: (array of strings, optional) Provide a list of URLs pointing to publicly accessible images to be used as guidance. Note: Either image_prompt_file or image_prompt_urls must be provided. ``` -------------------------------- ### Image Prompt Adapter Guidance Method for AI Generation Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/download-tailored-model The Image Prompt Adapter offers two modes, 'regular' and 'style_only', to guide AI generation using an image's content, style, or color palette. It requires specifying a mode, a scale, and either a base64-encoded image file or a list of publicly accessible image URLs. ```APIDOC Image Prompt Adapter: Description: This method offers two modes to guide generation using an image’s content, style elements, and color palette. Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters: - image_prompt_mode: Type: string Description: Specifies how the input image influences the generation. Allowed Values: regular, style_only - image_prompt_scale: Type: float Description: Sets the impact of the provided image on the generated result. Range: 0.0 to 1.0 - image_prompt_file: Type: string (base64-encoded image) Description: Provides the base64-encoded image file to be used as guidance. - image_prompt_urls: Type: array of strings (URLs) Description: Provides a list of URLs pointing to publicly accessible images to be used as guidance. (Alternative to image_prompt_file) ``` -------------------------------- ### Curl Example: Retrieve Datasets by Project Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/get-datasets A command-line example using curl to demonstrate how to make a GET request to the BRIA AI API to retrieve datasets for a specified project. It includes the base URL, path and query parameters, and the necessary API token header for authentication. ```curl 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' ``` -------------------------------- ### Image Prompt Adapter Guidance Method for Image Generation APIs Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/update-model The Image Prompt Adapter method offers two modes ('regular' and 'style_only') to guide generation using an image's content, style elements, and color palette. It allows providing the guidance image either as a base64-encoded file or via publicly accessible URLs. ```APIDOC Image Prompt Adapter Guidance Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Request Parameters for Image Prompt Adapter: - image_prompt_mode: string - Description: Specifies how the input image influences the generation. - Constraints: Must be 'regular' or 'style_only'. - image_prompt_scale: float - Description: Sets the impact of the provided image on the generated result. - Constraints: Range from 0.0 to 1.0. - image_prompt_file: string (Optional, mutually exclusive with image_prompt_urls) - Description: Provides the base64-encoded image file to be used as guidance. - Constraints: Base64 encoded image data. - image_prompt_urls: array of strings (Optional, mutually exclusive with image_prompt_file) - Description: Provides a list of URLs pointing to publicly accessible images to be used as guidance. - Constraints: Array of valid image URLs. ``` -------------------------------- ### Retrieve All Tailored Generation Projects using cURL Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/get-projects Example cURL command to retrieve all tailored generation projects by sending a GET request with the API token. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/tailored-gen/projects \ -H 'api_token: string' ``` -------------------------------- ### Retrieve Datasets using cURL Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/create-dataset Example cURL command to retrieve a list of all datasets by sending a GET request to the /tailored-gen/datasets endpoint. This command includes the necessary 'api_token' header for authentication. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/tailored-gen/datasets \ -H 'api_token: string' ``` -------------------------------- ### API Guidance Methods: ControlNets and Image Prompt Adapter Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/section/guidance-methods This section describes the available guidance methods for AI generation APIs, including ControlNets for structural and color guidance, and Image Prompt Adapter for content and style influence. It outlines their parameters, usage, and constraints. ```APIDOC Guidance Methods for AI Generation APIs: Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored These APIs support various guidance methods to provide greater control over generation, enabling guidance using not only a textual prompt but also visuals. ControlNets: A set of methods that allow conditioning the model on additional inputs, providing detailed control over image generation. Up to two ControlNet guidance methods can be specified in a single request. Each method requires an accompanying image and a scale parameter. When using multiple ControlNets, all input images must have the same aspect ratio, which determines the aspect ratio of the generated results. Available ControlNet Methods: - controlnet_canny: Uses edge information from the input image to guide generation based on structural outlines. - controlnet_depth: Derives depth information to influence spatial arrangement in the generated image. - controlnet_recoloring: Uses a grayscale version of the input image to guide recoloring while preserving geometry. - controlnet_color_grid: Extracts a 16x16 color grid from the input image to guide the color scheme of the generated image. Parameters for ControlNets: - guidance_method_X: string (where X is 1 or 2) Description: Specify the guidance method (e.g., "controlnet_canny"). Constraint: If guidance_method_2 is used, guidance_method_1 must also be used. To use only one method, use guidance_method_1. - guidance_method_X_scale: float Description: Set the impact of the guidance. Range: 0.0 to 1.0 - guidance_method_X_image_file: string (base64-encoded) Description: Provide the base64-encoded input image for the guidance method. Image Prompt Adapter: This method offers two modes for guiding generation using an image's content, style elements, and color palette. Available Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters for Image Prompt Adapter: - image_prompt_mode: string Description: Specify how the input image influences the generation. Allowed values: "regular", "style_only" - image_prompt_scale: float Description: Set the impact of the provided image on the generated result. Range: 0.0 to 1.0 - image_prompt_file: string (base64-encoded) Description: Provide the base64-encoded image file to be used as guidance. Note: Use this OR image_prompt_urls. - image_prompt_urls: array of strings (URLs) Description: Provide a list of URLs pointing to publicly accessible images to be used as guidance. Note: Use this OR image_prompt_file. ``` -------------------------------- ### Curl Example for Bria AI Person/Info API Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/background-remove Demonstrates how to make a GET request to the Bria AI Person/Info API using curl, specifying the `visual_id` in the URL path and including the `api_token` header. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### Bria AI Text-to-Image Generation Input Parameters Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-generation/endpoints/text-to-image-hd Comprehensive list of parameters available for customizing text-to-image generation, including guidance methods, image prompting options, and content flagging. ```APIDOC ip_signal: boolean Description: Flags prompts with potential IP content. If detected, a warning will be included in the response. Default: false guidance_method_1: string Description: Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. Support available only when model_version="2.3". This parameter is optional. Enum: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid" guidance_method_1_scale: number (float) Range: [0 .. 1] Description: The impact of the guidance. Default: 1 guidance_method_1_image_file: string (base64) Description: The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more than one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided. guidance_method_2: string Description: Which guidance type you would like to include in the generation. Up to 2 guidance methods can be combined during a single inference. Support available only when model_version="2.3". This parameter is optional. Enum: "controlnet_canny", "controlnet_depth", "controlnet_recoloring", "controlnet_color_grid" guidance_method_2_scale: number (float) Range: [0 .. 1] Description: The impact of the guidance. Default: 1 guidance_method_2_image_file: string (base64) Description: The image that should be used as guidance, in base64 format, with the method defined in guidance_method_2. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more than one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_2 is selected, an image must be provided. image_prompt_mode: string Description: - `regular`: Uses the image’s content, style elements, and color palette to guide generation. - `style_only`: Uses the image’s high-level style elements and color palette to influence the generated output. Support available only when model_version="2.3". Default: "regular" Enum: "regular", "style_only" image_prompt_file: string (base64) Description: The image file to be used as guidance, in base64 format. Accepted formats are jpeg, jpg, png, webp. Support available only when model_version="2.3". Maximum file size 12MB. This image can be of any aspect ratio, even when it's not aligned with the one defined in the parameter 'aspect_ratio' or by visuals provided to the ControlNets. image_prompt_urls: Array of strings (uri) Description: A list of URLs of images that should be used as guidance. The images can be of different aspect ratios. Accepted formats are jpeg, jpg, png, webp. The URLs should point to accessible, publicly available images. Support available only when model_version="2.3". image_prompt_scale: number (float) Range: [0 .. 1] Description: The impact of the provided image on the generated results. A value between 0.0 (no impact) and 1.0 (full impact). Default: 1 ``` -------------------------------- ### Image Prompt Adapter Guidance for Bria AI Generation Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/generate-prefix Describes the Image Prompt Adapter method, which uses an input image's content, style, and color palette to guide AI generation. It offers two modes: 'regular' for comprehensive content/style/color guidance and 'style_only' for high-level style/color influence. Explains the required parameters (`image_prompt_mode`, `image_prompt_scale`, and either `image_prompt_file` for base64-encoded images or `image_prompt_urls` for publicly accessible image URLs). This method is supported by `/text-to-image/tailored` and `/text-to-vector/tailored` APIs. ```APIDOC Image Prompt Adapter Guidance Method: Description: This method offers two modes to guide generation using an input image's content, style elements, and color palette. Supported APIs: - /text-to-image/tailored - /text-to-vector/tailored Available Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Request Parameters: - image_prompt_mode: string - Description: Specifies how the input image influences the generation. - Example Values: "regular", "style_only" - image_prompt_scale: float (0.0 to 1.0) - Description: Sets the impact of the provided image on the generated result. - image_prompt_file: string (base64-encoded image) - Description: Provides the base64-encoded image file to be used as guidance. (Mutually exclusive with image_prompt_urls) - image_prompt_urls: array of strings (URLs) - Description: Provides a list of URLs pointing to publicly accessible images to be used as guidance. (Mutually exclusive with image_prompt_file) ``` -------------------------------- ### Retrieve Presenter Info with cURL Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-editing/endpoints/create Example cURL command to send a GET request to the `/{visual_id}/person/info` endpoint, using a specific `visual_id` to retrieve information about people in the image. This operation requires an `api_token` header for authentication. ```curl curl -i -X GET \ https://engine.prod.bria-api.com/v1/f49943971e3039c7/person/info \ -H 'api_token: string' ``` -------------------------------- ### Image Prompt Adapter Guidance Method for AI Generation Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/upload-model Explains the Image Prompt Adapter guidance method, which uses an input image's content, style, or color palette to influence AI generation. Describes its two modes and required parameters. ```APIDOC Image Prompt Adapter: Description: This method uses an input image's content, style elements, or color palette to guide generation. Modes: - regular: Uses the image’s content, style elements, and color palette to guide generation. - style_only: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters: - image_prompt_mode (string): Specifies how the input image influences the generation ('regular' or 'style_only'). - image_prompt_scale (float): Sets the impact of the provided image on the generated result (range: 0.0 to 1.0). - image_prompt_file (string, base64-encoded): Provides the base64-encoded image file to be used as guidance. OR - image_prompt_urls (array of strings, URLs): Provides a list of URLs pointing to publicly accessible images to be used as guidance. ``` -------------------------------- ### Tailored Generation API: End-to-End Training Workflow Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/update-dataset A step-by-step guide detailing the sequence of API calls required to train a tailored model, from initial project setup and dataset preparation to model training and readiness for generation. ```APIDOC 1. Create a Project: - Call: POST /projects - Purpose: Define your IP type and medium. 2. Create a Dataset: - Call: POST /datasets - Purpose: Create a dataset within your project. 3. Generate an Advanced Caption Prefix (Optional, for 'stylized_scene', 'defined_character', and 'object_variants' IP types): - Call: POST /tailored-gen/generate_prefix - Purpose: Sample 1-6 images to generate a structured caption prefix. - Then: Update the dataset with the generated prefix using PUT /datasets/{dataset_id}. 4. Upload Images: - Call: POST /datasets/{dataset_id}/images - Purpose: Upload images to the dataset. - Constraint: Minimum resolution: 1024x1024px. 5. Prepare Dataset: - Action: Review auto-generated captions and update the dataset status to 'completed' (typically via PUT /datasets/{dataset_id}). 6. Create Model: - Call: POST /models - Purpose: Create a model, selecting either the "light" or "max" training version. 7. Start Training: - Call: POST /models/{id}/start_training - Purpose: Initiate the training process. 8. Monitor Progress: - Call: GET /models/{id} - Purpose: Check the training status until it is 'Completed'. 9. Generate Images (Post-Training): - Call: POST /text-to-image/tailored/{model_id} - Call: POST /text-to-vector/tailored/{model_id} - Call: POST /reimagine/tailored/{model_id} - Purpose: Utilize the trained model for various generation tasks. ``` -------------------------------- ### Retrieve Single Tailored Generation Project by ID using cURL Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/tailored-generation/training-endpoints/get-projects Example cURL command to retrieve a specific tailored generation project by its ID, sending a GET request with the project ID in the path and the API token. ```curl curl -i -X GET \ 'https://engine.prod.bria-api.com/v1/tailored-gen/projects/{project_id}' \ -H 'api_token: string' ``` -------------------------------- ### Bria AI Image Prompt Adapter Guidance Method Source: https://docs.bria.ai/tailored-generation/section/guidance-methods/image-generation/section/guidance-methods The Image Prompt Adapter method offers two modes ('regular' and 'style_only') to guide AI generation using an input image's content, style elements, or color palette. It allows influencing the generated output based on visual cues from a provided image, either via a base64-encoded file or a public URL. ```APIDOC Image Prompt Adapter Guidance Method: Modes: regular: - Description: Uses the image’s content, style elements, and color palette to guide generation. style_only: - Description: Uses the image’s high-level style elements and color palette to influence the generated output. Parameters for Image Prompt Adapter: image_prompt_mode: string - Description: Specify how the input image influences the generation. - Allowed values: "regular", "style_only" image_prompt_scale: float - Description: Set the impact of the provided image on the generated result. - Range: 0.0 to 1.0 image_prompt_file: string (base64-encoded) - Description: Provide the base64-encoded image file to be used as guidance. image_prompt_urls: array of strings (URLs) - Description: Provide a list of URLs pointing to publicly accessible images to be used as guidance. - Note: Use either image_prompt_file or image_prompt_urls, not both. ```