latestOpenAPI 3.0.02026-08-10380208.8 KB

806c6d31631b

Dataset

Upload Image Files

Upload a 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 (increase_resolution=true)
    • To strictly enforce the 1024x1024 minimum, set increase_resolution=false
  • Supported formats: jpg, jpeg, png, webp
  • Preferably use original high-quality assets

Dataset Guidelines:

  • Recommended: 5-50 images for optimal results
  • Maximum supported: 200 images
  • Ensure consistency in style, structure, and visual elements
  • Balance diversity in content while maintaining consistency in key elements

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

Constraints:

  • Can only be used by "basic" upload type datasets. Use images/bulk for advanced datasets.
  • Dataset must have at least 5 images
  • Dataset cannot exceed 200 images
  • Cannot upload to a completed dataset

This API endpoint supports content moderation via an optional parameter.

post/tailored-gen/datasets/{dataset_id}/images

Path parameters

dataset_idinteger required

Headers

api_tokenstring required

Request body

filestring binary

Image file to upload (required if image_url not provided)

image_urlstring

URL of image to upload (required if file not provided)

image_namestring

Custom name for the image (optional)

increase_resolutionboolean

When enabled (default), input images smaller than 1024x1024 but larger than 256x256 will be automatically upscaled. If false, images must be at least 1024x1024 pixels.

content_moderationboolean

Response

Image successfully uploaded

idinteger
dataset_idinteger
captionstring nullable

The generated caption. Null if uploaded without a visual schema.

caption_source'automatic' | 'manual' | 'pending' nullable
image_namestring
image_urlstring
thumbnail_urlstring
created_atstring date-time
updated_atstring date-time