Prepare one complete, format-aware dataset tree
POST
/v1/datasets/upload/prepare
const url = 'https://example.com/v1/datasets/upload/prepare';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"repo_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","operation_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","source_format":"lerobot_v2_1","expected":{"generation":1,"git_hash_algorithm":"sha1","git_oid":"example","commit_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pack_digest":"example"},"entries":[{"path":"example","manifest_id":"example","mode":33188}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/datasets/upload/prepare \ --header 'Content-Type: application/json' \ --data '{ "repo_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "operation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source_format": "lerobot_v2_1", "expected": { "generation": 1, "git_hash_algorithm": "sha1", "git_oid": "example", "commit_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pack_digest": "example" }, "entries": [ { "path": "example", "manifest_id": "example", "mode": 33188 } ] }'Validate and stage all trusted artifacts before the sole visibility call.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” x-api-key
string | null
Request Body required
Section titled “Request Body required ” Media type application/json
PrepareDatasetPublicationBody
object
repo_id
required
string format: uuid
name
required
string
operation_id
required
string format: uuid
source_format
required
string
expected
object
generation
required
integer
git_hash_algorithm
required
string
git_oid
required
string
commit_id
required
string format: uuid
pack_digest
required
string
entries
required
Array<object>
PublicationEntryobject
path
required
string
manifest_id
required
string
mode
integer
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationErrorobject
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}