Create a recording from an upload session or a one-way Hugging Face Hub import
POST
/v1/projects/{projectId}/recordingscurl -X POST 'https://api.embodiflow.io/v1/projects/{projectId}/recordings' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"files": [
{
"role": "calibration",
"deviceMeta": {},
"originalFilename": "string",
"relativePath": "string",
"contentType": "string",
"sizeBytes": 0,
"checksumExpected": "string"
}
],
"name": "string",
"tags": [
"string"
],
"dataFormat": "string",
"sourceKind": "human",
"recordingShape": "continuous",
"vendorSchema": "string",
"taskId": "string",
"task": "string",
"durationS": 0,
"sourceEpisodes": [
{
"taskId": "string",
"label": "string",
"id": "string",
"startS": 0,
"endS": 0
}
],
"captureSessionId": "string",
"sourceTime": "string",
"collectionTaskId": "00000000-0000-0000-0000-000000000000",
"sceneId": "00000000-0000-0000-0000-000000000000",
"storageBucketId": "00000000-0000-0000-0000-000000000000",
"captureLabels": {
"tags": [
"string"
],
"scene": "string",
"taskDescription": "string"
},
"source": {
"type": "hugging_face",
"repoId": "lerobot/pusht",
"revision": "string",
"subPath": "string"
},
"accessToken": "string"
}'认证
每个请求都需要携带个人访问令牌(PAT)。
- Authorization: Bearer PAT
路径参数
- projectIdstring必填
请求头参数
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
请求体
Content-Typeapplication/json
- filesarray<CreateUploadSessionFileBodyDto>
- rolestring | null可选值calibrationmappingmedia
- deviceMetaobject | null
- originalFilenamestring必填
- relativePathstring必填
- contentTypestring | null
- sizeBytesnumber必填
- checksumExpectedstring | null
- namestring | null
- tagsarray<string>
- dataFormatstring | null
- sourceKindstring可选值humanrobotumi
- recordingShapestring可选值continuoussingle_taskpresegmented
- vendorSchemastring | null
- taskIdstring | null
- taskstring | null
Robot task text; wins over the project default task (FV-09).
- durationSnumber | null
- sourceEpisodesarray<ImportSourceEpisodeBodyDto>
- taskIdstring | null
- labelstring | null
- idstring必填
- startSnumber必填
- endSnumber必填
- captureSessionIdstring | null
- sourceTimestring | null
- collectionTaskIdstring (uuid) | null
Reserved; validated in W41.
- sceneIdstring (uuid) | null
Reserved; validated in W41.
- storageBucketIdstring (uuid) | null
- captureLabelsobject | null
Uploader labels (EGO-DATA P5). Shape and size are checked by the service with the named codes RECORDING_CAPTURE_LABELS_INVALID / _TOO_LARGE.
- tagsarray<string>必填
- scenestring | null必填
- taskDescriptionstring | null必填
- sourceobject
- typestring必填可选值hugging_face
- repoIdstring必填
- revisionstring
- subPathstring
- accessTokenstring
One-shot Hub token. Used once, not stored.
响应
Success
- dataobject必填
- recordingobject必填
- uploadBatchIdstring必填
- sessionsarray<UploadSessionSummaryDto>
响应示例
{
"data": {
"recording": {
"id": "string",
"projectId": "string",
"name": "string",
"tags": [
"string"
],
"sourceFormat": "string",
"source": "upload",
"huggingFace": {
"type": "hugging_face",
"repoId": "string",
"revision": "string",
"commitSha": "string",
"subPath": "string",
"licence": "string",
"gated": "none",
"sourceFormat": "lerobot-v3",
"progress": {
"filesDone": 0,
"filesTotal": 0,
"bytesDone": 0,
"bytesTotal": 0
},
"failureReason": "HF_REPO_NOT_FOUND"
},
"status": {
"lifecycle": "failed",
"quality": "warn",
"qualityCheckId": "string",
"qualityVerdict": "warning",
"stepId": "string",
"stepWaitReason": "string",
"noProgressSince": "string",
"failure": {
"code": "string",
"reason": "string",
"stepId": "string",
"stepName": "string",
"stepAlgorithm": {
"slug": "string",
"title": "string"
},
"stepRunId": "string",
"runId": "string",
"stepErrorCode": "string"
},
"runId": "string",
"processingRefused": {
"code": "string"
}
},
"segmentationState": {
"state": "not_segmented",
"episodeCount": 0
},
"privacyState": "pending",
"privacyRequirement": "required",
"privacyGate": "human",
"durationNs": 0,
"collector": null,
"posterUrl": "string",
"latestReadyProcessingResultId": "string",
"processedWith": {
"workflowName": "string",
"revision": 0
},
"rigProfile": {
"name": "string",
"revisionId": "string"
},
"captureLabels": {
"tags": [
"string"
],
"scene": "string",
"taskDescription": "string"
},
"rejectedSavedMinutes": 0,
"createdAt": "string",
"updatedAt": "string"
},
"uploadBatchId": "string",
"sessions": [
{
"id": "string",
"uploadBatchId": "string",
"storageBucketId": "string",
"objectKey": "string",
"originalFilename": "string",
"uploadMode": "single",
"status": "string",
"expiresAt": "string",
"putUrl": "string",
"providerUploadId": "string",
"completedAt": "string",
"storageObjectId": "string",
"error": {
"code": "string",
"message": "string"
},
"writeCredentials": {
"accessKeyId": "string",
"secretAccessKey": "string",
"sessionToken": "string",
"expiresAt": "string",
"bucketName": "string",
"region": "string",
"provider": "string",
"endpoint": "string",
"objectKey": "string",
"prefix": "string",
"forcePathStyle": false
},
"partSizeBytes": 0
}
]
}
}服务器https://api.embodiflow.io/v1https://api.embodiflow.dev/v1