Import an exact Hugging Face dataset commit server-side
POST
/v1/datasets/import-hf
const url = 'https://example.com/v1/datasets/import-hf';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"idempotency_key":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","repo_id":"example","revision":"example","name":"example","source_format":"lerobot_v2_1","hf_token":"example"}'};
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/import-hf \ --header 'Content-Type: application/json' \ --data '{ "idempotency_key": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "repo_id": "example", "revision": "example", "name": "example", "source_format": "lerobot_v2_1", "hf_token": "example" }'Dispatch one pinned source acquisition under this account.
The Modal QDS ingest worker inventories Hugging Face and streams bodies directly to R2. This route carries only source coordinates and the initial optional token; gateway and pipeline-api never proxy dataset bytes.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” account_id
Act within this account (the dashboard’s active account).
string | null format: uuid
Act within this account (the dashboard’s active account).
Header Parameters
Section titled “Header Parameters ” x-api-key
string | null
Request Body required
Section titled “Request Body required ” Media type application/json
HuggingFaceImportBody
Server-side import of one exact public Hugging Face dataset commit.
object
idempotency_key
required
string format: uuid
repo_id
required
string
revision
required
string
name
required
string
source_format
required
string
hf_token
string | null
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": {} } ]}