API datasets and resumable uploads
A dataset is an account-owned collection of source files for training. Its states are uploading, validating and ready. Register and transfer every file before starting validation.
Input and manifest
Create a dataset with POST /datasets and a JSON body containing name and input_type. Supported input types are images, videos, mixed, 360-image, 360-video and dataset.
| Input | Important requirements |
|---|---|
| images / videos / mixed | Regular capture media. At least 25 images or sufficient video coverage; do not include INSV in regular video. |
| 360-image / 360-video | Landscape 2:1 panoramic media; Balanced or above. INSV is accepted only as 360-video. |
| dataset | Extracted reconstructed dataset with matching images and supported camera/point metadata. |
Register files using POST /datasets/ID/uploads. Each manifest entry uses its actual byte size and matching MIME type:
{
"files": [
{
"path": "frame-001.jpg",
"content_type": "image/jpeg",
"size_bytes": 123456
}
]
}The example byte count is illustrative: compute it from your file. Use safe relative names; no leading slash, backslash, hidden path segment or traversal. Only reconstructed dataset input accepts nested paths. A reconstructed dataset is uploaded as individual files, not ZIP.
API image validation includes JPEG, PNG, WebP, TIFF, HEIC/HEIF and BMP; this is broader than the current Create file chooser. Match the exact content type accepted by the implementation and preserve dataset image references.
Direct upload
The response contains uploads with file_id, path, upload_url and expires_at. File bytes go directly to the returned storage URL. The API receives metadata, not a multipart media body.
Send a PUT with the file’s Content-Type and a Content-Range describing the supplied bytes. A completed transfer normally returns 200 or 201; 308 indicates an incomplete resumable transfer. The Python and Node.js examples handle chunking and recovery.
Resume a transfer
PUT UPLOAD_URL
Content-Length: 0
Content-Range: bytes */TOTAL_BYTESQuery the current offset with an empty PUT. On 308, read the returned Range; the next byte is one beyond its last byte. If there is no Range, start at zero. Send the remaining chunks with their correct byte ranges. Do not assume that a disconnected response means no bytes were stored.
Sessions advertise an expiry. If allocation must be recovered, replay the original uploads request with its original Idempotency-Key. Do not allocate the same path with a new key. Keep files unchanged during a run and retain the example’s state file to resume.
Finalize the dataset
- Finish uploading all registered files.
- POST an empty JSON object to
/datasets/ID/completewith an Idempotency-Key. - Read
statusandvalidated_files. - If status is validating, call complete again with a new key for the next validation batch. Retry an uncertain request with the same key.
- Start training only after status is ready.
Validation and limits
Current API ceilings are 50 manifest files per allocation request, 10,000 files per dataset, 16,000,000,000 bytes per file and 65,536 bytes per JSON request. Account entitlements can impose lower aggregate file counts or size limits. Read current capabilities when building an integration.
Finalization checks stored length, MIME type, file signatures and supported metadata. MP4/MOV duration and dimensions are checked from container metadata. Some fragmented files or oversized metadata can fail with media_metadata_unavailable; other video formats may defer decoding checks to processing. Header validation is not proof that every frame will decode.
For regular MP4/MOV, coverage uses duration × 30 estimated frames and requires at least 250 unless at least 25 images are supplied. Panoramic files need the correct 360 input type. Continue with training jobs or error handling.