Initiate a batch upload
POST/api/v1/datasets/upload/initiate-batch
Initiate a batch upload. A batch must be homogeneous: either all document formats (pdf, docx, pptx, xlsx, html, zip) or all tabular formats (csv, json, jsonl, parquet). Mixed batches are rejected. TXT files are permissive and may be included in either kind of batch (or alone, in which case the dataset is tabular); their contents are converted during complete-batch.
Initiate a batch upload
curl https://api.prod.adaptionlabs.ai/api/v1/datasets/upload/initiate-batch \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ADAPTION_API_KEY" \
-d '{
"name": "my-document-dataset",
"files": [
{
"file_name": "report.pdf",
"file_format": "pdf",
"file_size_bytes": 1048576
}
]
}'{
"dataset_id": "dataset_id",
"uploads": [
{
"file_name": "file_name",
"upload_url": "upload_url",
"s3_key": "s3_key"
}
]
}Returns Examples
{
"dataset_id": "dataset_id",
"uploads": [
{
"file_name": "file_name",
"upload_url": "upload_url",
"s3_key": "s3_key"
}
]
}