POST /v1/task/datacollectionv2, authenticated with your Scale API key. The body is JSON, and upload_type determines which attachment fields are required and which are allowed. Any top-level field that is not part of the upload type’s schema is rejected.
On success, the endpoint returns 200 with the task object and starts the task’s processing pipeline.
Upload types
All URL fields accept
s3://, gs://, and https:// URLs.
Video item
Each entry invideo_attachment requires all of the following fields:
sfs-annotation tasks require the project to be configured with the right processing steps. If it is not, the request returns 400 with Project is not set up for upload_type. Ask your Scale contact to set this up.Request parameters
These fields are shared by both upload types, in addition to the attachment fields above.One of
video-annotation or sfs-annotation. See Upload types.The project name (not its ID). It must be a
datacollectionv2 project owned by the account of the API key.Free-form metadata stored on the task.
metadata.id is used as the recording ID for deduplication.Example
GET /v1/task/:id. Store its task_id and check its status.
Errors
- Invalid payload: the payload is validated before the task is saved. A bad payload returns
400and no task is created. When required fields are missing, the error lists them; otherwise it reports only the first problem. - Pipeline failure: if the task’s processing pipeline fails to start, the request still returns
200, but the task’sstatusiserror.
Duplicates and retries
metadata.id(ormetadata.recordingId) is the recording ID. A second request for the same recording in the same project returns the existing task instead of creating a new one.- If a request for the same recording is still in progress, the call fails with
Another process is creating a task for this recording, please retry. Retry after a short wait; a stuck request expires after 2 minutes.