# Upload Image files 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: - . use images/bulk for advanced dataset upload - 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. Endpoint: POST /tailored-gen/datasets/{dataset_id}/images ## Path parameters: - `dataset_id` (string, required) Dataset ID ## Header parameters: - `api_token` (string, required) ## Request fields (application/json): - `file` (string) Image file to upload (required if image_url not provided) - `image_url` (string) URL of image to upload (required if file not provided) - `image_name` (string) Custom name for the image (optional) - `increase_resolution` (boolean) When enabled (default: true), input images smaller than 1024x1024 pixels but larger than 256x256 pixels will be automatically upscaled to meet the minimum requirement. - If true: Images must be at least 256x256 pixels. Upscaling is applied. - If false: Images must be at least 1024x1024 pixels. No upscaling is applied. - `content_moderation` (boolean) When enabled, applies content moderation to input visuals. For input images: - Processing stops at the first image that fails moderation - Returns a 422 error with details about which parameter failed ## Response 201 fields (application/json): - `id` (integer) Unique identifier for the image - `dataset_id` (integer) ID of the dataset this image belongs to - `caption` (string) Once an image is uploaded, a caption is generated automatically. The caption is a natural continuation of the caption_prefix. - `caption_source` (string) Source of the caption Enum: "automatic", "manual" - `image_name` (string) Name of the image - `file` (string) file of the original image file in base64 format. Either file or image_url should be provided, not both. - `image_url` (string) URL of the original image file. - `thumbnail_url` (string) URL of the image thumbnail - `created_at` (string) Timestamp when the image was created - `updated_at` (string) Timestamp when the image was last updated