Datasets

Copy or move images to a dataset

Changed on

Copies hosted images as content-addressed references without moving bytes. Omit release and classMapping for unlabeled train images. Set release to false (copy) or true (move), or supply classMapping, to preserve annotations, metadata, depth targets, and splits from editable sources; classes match by name. Other readable sources remain unlabeled train images. Moves delete only inserted source rows in the same transaction. Existing images are skipped.

post/api/datasets/{owner}/{dataset}/images/adopt

Request

  • Base URL
    https://platform.ultralytics.com
  • Auth
    HTTP bearer

Path parameters

ownerstring required
Example:ultralytics

Dataset owner

datasetstring required
Example:coco8

Dataset name

Request body

imageIdsstring[] required
releaseboolean

Set false to copy editable-source annotations, metadata, depth targets, and splits; true also deletes source rows atomically. Omit both release and classMapping to adopt unlabeled train images.

classMappingobject

Mapping from source class names to this dataset

Example request

{
  "imageIds": [
    "507f1f77bcf86cd799439011"
  ]
}

Response

Images added

adoptedinteger required

Images inserted; duplicates already held are skipped

Changes