> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> API reference for Scale AI: every `scaleai.api.*` operation with input and output types.

Every `scaleai.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Audits

### getFixlessAudits

`audits.getFixlessAudits`

Retrieve fixless audits by task id or audit id

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.audits.getFixlessAudits({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | No | — |
| `id` | `string` | No | — |

**Output:** `any`

***

## Batches

### createBatch

`batches.createBatch`

Create a new batch within a project

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.batches.createBatch({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `callback` | `string` | No | — |
| `calibration_batch` | `boolean` | No | — |
| `self_label_batch` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `project` | `string` | No | — |
| `status` | `string` | No | — |
| `created_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `callback` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |

***

### finalizeBatch

`batches.finalizeBatch`

Finalize a batch so its tasks can be worked on

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.batches.finalizeBatch({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batchName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `project` | `string` | No | — |
| `status` | `string` | No | — |
| `created_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `callback` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |

***

### getBatch

`batches.getBatch`

Retrieve a batch by name

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.batches.getBatch({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batchName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `project` | `string` | No | — |
| `status` | `string` | No | — |
| `created_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `callback` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |

***

### getBatchStatus

`batches.getBatchStatus`

Retrieve a batch status with task completion counts

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.batches.getBatchStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batchName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `tasks_pending` | `number` | No | — |
| `tasks_completed` | `number` | No | — |
| `tasks_error` | `number` | No | — |
| `tasks_canceled` | `number` | No | — |

***

### listBatches

`batches.listBatches`

List batches newest-first with pagination

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.batches.listBatches({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `status` | `string` | No | — |
| `start_time` | `string` | No | — |
| `end_time` | `string` | No | — |
| `exclude_archived` | `boolean` | No | — |
| `detailed` | `boolean` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `docs` | `object[]` | Yes | — |
| `totalDocs` | `number` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `has_more` | `boolean` | No | — |

> [accordion] docs full type
>
> ```ts theme={null}
> {
>   name: string,
>   project?: string,
>   status?: string,
>   created_at?: string,
>   completed_at?: string,
>   callback?: string,
>   metadata?: Record<string, any>
> }[]
> ```

***

## Files

### getAssets

`files.getAssets`

List file assets filtered by project and metadata (paginated)

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.files.getAssets({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `limit` | `number` | No | — |
| `next_token` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `docs` | `object[]` | Yes | — |
| `has_more` | `boolean` | No | — |
| `next_token` | `string \| null` | No | — |
| `total` | `number` | No | — |

> [accordion] docs full type
>
> ```ts theme={null}
> {
>   id?: string,
>   attachment_url?: string,
>   created_at?: string
> }[]
> ```

***

### importFile

`files.importFile`

Import a file into Scale from a remote URL

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.files.importFile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_url` | `string` | Yes | — |
| `project_name` | `string` | No | — |
| `reference_id` | `string` | No | — |
| `attachment_type` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `attachment_url` | `string` | No | — |
| `created_at` | `string` | No | — |

***

### uploadFile

`files.uploadFile`

Upload a local file (base64) to Scale, max 80 MB

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.files.uploadFile({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file_base64` | `string` | Yes | — |
| `file_name` | `string` | Yes | — |
| `mime_type` | `string` | No | — |
| `project_name` | `string` | No | — |
| `reference_id` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `attachment_url` | `string` | No | — |
| `created_at` | `string` | No | — |

***

## Projects

### getProject

`projects.getProject`

Retrieve a project by name

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.projects.getProject({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string` | No | — |
| `name` | `string` | Yes | — |
| `param_history` | `Record<string, any>[]` | No | — |
| `created_at` | `string` | No | — |
| `archived` | `boolean` | No | — |

***

### listProjects

`projects.listProjects`

List all projects, optionally filtered by archived state

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.projects.listProjects({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `archived` | `boolean` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   type?: string,
>   name: string,
>   param_history?: Record<string, any>[],
>   created_at?: string,
>   archived?: boolean
> }[]
> ```

***

### setProjectOntology

`projects.setProjectOntology`

Set the ontology (label classes) for a project

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.projects.setProjectOntology({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | — |
| `ontology` | `any[] \| Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string` | No | — |
| `name` | `string` | Yes | — |
| `param_history` | `Record<string, any>[]` | No | — |
| `created_at` | `string` | No | — |
| `archived` | `boolean` | No | — |

***

### setProjectParams

`projects.setProjectParams`

Set default task parameters for a project

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.projects.setProjectParams({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | Yes | — |
| `patch` | `boolean` | No | — |
| `instruction` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string` | No | — |
| `name` | `string` | Yes | — |
| `param_history` | `Record<string, any>[]` | No | — |
| `created_at` | `string` | No | — |
| `archived` | `boolean` | No | — |

***

## Quality

### getQualityLabelers

`quality.getQualityLabelers`

Retrieve labeler training attempts by quality task id or email

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.quality.getQualityLabelers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `quality_task_ids` | `string[]` | No | — |
| `labeler_emails` | `string[]` | No | — |

**Output:** `any`

***

## Studio

### addStudioAssignments

`studio.addStudioAssignments`

Assign projects to Studio team members by email

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.studio.addStudioAssignments({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | — |
| `projects` | `string[]` | Yes | — |

**Output:** `Record<string, any>`

***

### getStudioAssignments

`studio.getStudioAssignments`

Retrieve current Studio project assignments per active user

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.studio.getStudioAssignments({});
```

**Input:** *empty object*

**Output:** `Record<string, any>`

***

### getStudioBatches

`studio.getStudioBatches`

List pending Studio batches ordered by priority

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.studio.getStudioBatches({});
```

**Input:** *empty object*

**Output:** `Record<string, any>[]`

***

### removeStudioAssignments

`studio.removeStudioAssignments`

Unassign projects from Studio team members by email

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.studio.removeStudioAssignments({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | — |
| `projects` | `string[]` | Yes | — |

**Output:** `Record<string, any>`

***

### resetBatchPriorities

`studio.resetBatchPriorities`

Reset Studio batch priority order to the default

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.studio.resetBatchPriorities({});
```

**Input:** *empty object*

**Output:** `Record<string, any>[]`

***

### setBatchPriorities

`studio.setBatchPriorities`

Set the priority order of pending Studio batches

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.studio.setBatchPriorities({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `batch_names` | `string[]` | Yes | — |

**Output:** `Record<string, any>[]`

***

## Tasks

### addTaskTags

`tasks.addTaskTags`

Add tags to a task (duplicates ignored)

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.addTaskTags({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |
| `tags` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createDocumentTranscriptionTask

`tasks.createDocumentTranscriptionTask`

Create a document transcription / annotation task

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createDocumentTranscriptionTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachment` | `string` | No | — |
| `attachments` | `string[]` | No | — |
| `attachment_type` | `string` | No | — |
| `fields` | `Record<string, any>[] \| Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createImageAnnotationTask

`tasks.createImageAnnotationTask`

Create an image annotation task (boxes, polygons, points, etc.)

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createImageAnnotationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachment` | `string` | Yes | — |
| `attachment_type` | `string` | No | — |
| `geometries` | `Record<string, any>` | Yes | — |
| `annotation_attributes` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createLidarAnnotationTask

`tasks.createLidarAnnotationTask`

Create a LiDAR 3D cuboid annotation task

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createLidarAnnotationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachments` | `string[]` | No | — |
| `attachment` | `string` | No | — |
| `labels` | `(string \| Record<string, any>)[]` | No | — |
| `annotation_attributes` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createLidarSegmentationTask

`tasks.createLidarSegmentationTask`

Create a LiDAR point cloud semantic segmentation task

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createLidarSegmentationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachments` | `string[]` | No | — |
| `attachment` | `string` | No | — |
| `labels` | `(string \| Record<string, any>)[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createNamedEntityRecognitionTask

`tasks.createNamedEntityRecognitionTask`

Create a named entity recognition task over text

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createNamedEntityRecognitionTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `text` | `string` | No | — |
| `attachments` | `(string \| Record<string, any>)[]` | No | — |
| `labels` | `(string \| Record<string, any>)[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createSegmentationAnnotationTask

`tasks.createSegmentationAnnotationTask`

Create a semantic segmentation task classifying image pixels

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createSegmentationAnnotationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachment` | `string` | Yes | — |
| `labels` | `(string \| Record<string, any>)[]` | Yes | — |
| `allow_unlabeled` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createTextCollectionTask

`tasks.createTextCollectionTask`

Create a text collection task gathering structured field data

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createTextCollectionTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachments` | `Record<string, any>[]` | No | — |
| `fields` | `Record<string, any>[] \| Record<string, any>` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createVideoAnnotationTask

`tasks.createVideoAnnotationTask`

Create a video annotation task across frames or video files

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createVideoAnnotationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachment` | `string` | No | — |
| `attachments` | `string[]` | No | — |
| `attachment_type` | `string` | No | — |
| `geometries` | `Record<string, any>` | Yes | — |
| `annotation_attributes` | `Record<string, any>` | No | — |
| `events_to_annotate` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### createVideoPlaybackAnnotationTask

`tasks.createVideoPlaybackAnnotationTask`

Create a video playback annotation task for object tracking

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.createVideoPlaybackAnnotationTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `callback_url` | `string` | No | — |
| `instruction` | `string` | No | — |
| `unique_id` | `string` | No | — |
| `clear_unique_id_on_error` | `boolean` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `priority` | `number` | No | — |
| `tags` | `string[]` | No | — |
| `attachment` | `string` | Yes | — |
| `attachments` | `string[]` | No | — |
| `geometries` | `Record<string, any>` | Yes | — |
| `annotation_attributes` | `Record<string, any>` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### deleteTaskTags

`tasks.deleteTaskTags`

Remove tags from a task

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.deleteTaskTags({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |
| `tags` | `string[]` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### deleteTaskUniqueId

`tasks.deleteTaskUniqueId`

Remove a task's unique\_id

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.deleteTaskUniqueId({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### getTask

`tasks.getTask`

Retrieve a task by id including status, response and metadata

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.tasks.getTask({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### getTaskResponseUrl

`tasks.getTaskResponseUrl`

Fetch secure authenticated task response data for a task

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.tasks.getTaskResponseUrl({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |
| `uuid` | `string` | Yes | — |

**Output:** `any`

***

### listTasks

`tasks.listTasks`

List tasks with filtering and cursor pagination

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.tasks.listTasks({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `type` | `imageannotation \| segmentannotation \| videoannotation \| videoplaybackannotation \| lidarannotation \| lidarsegmentation \| lidartopdown \| namedentityrecognition \| textcollection \| documenttranscription \| categorization \| transcription \| comparison` | No | — |
| `status` | `pending \| completed \| canceled \| error` | No | — |
| `customer_review_status` | `accepted \| fixed \| commented \| rejected \| pending \| (accepted \| fixed \| commented \| rejected \| pending)[]` | No | — |
| `unique_id` | `string \| string[]` | No | — |
| `tags` | `string \| string[]` | No | — |
| `start_time` | `string` | No | — |
| `end_time` | `string` | No | — |
| `completed_after` | `string` | No | — |
| `completed_before` | `string` | No | — |
| `updated_after` | `string` | No | — |
| `updated_before` | `string` | No | — |
| `include_attachment_url` | `boolean` | No | — |
| `limited_response` | `boolean` | No | — |
| `limit` | `number` | No | — |
| `next_token` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `docs` | `object[]` | Yes | — |
| `total` | `number` | No | — |
| `count` | `number` | No | — |
| `limit` | `number` | No | — |
| `offset` | `number` | No | — |
| `has_more` | `boolean` | No | — |
| `next_token` | `string \| null` | No | — |

> [accordion] docs full type
>
> ```ts theme={null}
> {
>   task_id: string,
>   created_at?: string,
>   updated_at?: string,
>   completed_at?: string,
>   type?: string,
>   status?: string,
>   instruction?: string,
>   params?: Record<string, any>,
>   callback_url?: string,
>   callback_completed?: boolean,
>   project?: string,
>   batch?: string,
>   metadata?: Record<string, any>,
>   response?: Record<string, any>,
>   audits?: Record<string, any>[],
>   tags?: string[],
>   unique_id?: string | null
> }[]
> ```

***

### sendTaskCallback

`tasks.sendTaskCallback`

Re-send the callback for a completed or errored task

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.sendTaskCallback({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean` | No | — |

***

### setTaskMetadata

`tasks.setTaskMetadata`

Set the metadata object on a task (idempotent)

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.setTaskMetadata({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |
| `metadata` | `Record<string, any>` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

### updateTaskUniqueId

`tasks.updateTaskUniqueId`

Set or update a task's unique\_id

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.tasks.updateTaskUniqueId({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `taskId` | `string` | Yes | — |
| `unique_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task_id` | `string` | Yes | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `completed_at` | `string` | No | — |
| `type` | `string` | No | — |
| `status` | `string` | No | — |
| `instruction` | `string` | No | — |
| `params` | `Record<string, any>` | No | — |
| `callback_url` | `string` | No | — |
| `callback_completed` | `boolean` | No | — |
| `project` | `string` | No | — |
| `batch` | `string` | No | — |
| `metadata` | `Record<string, any>` | No | — |
| `response` | `Record<string, any>` | No | — |
| `audits` | `Record<string, any>[]` | No | — |
| `tags` | `string[]` | No | — |
| `unique_id` | `string \| null` | No | — |

***

## Teams

### getTeams

`teams.getTeams`

List all team members with roles and notification preferences

**Risk:** `read`

```ts theme={null}
await corsair.scaleai.api.teams.getTeams({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   _id?: string,
>   id?: string,
>   email?: string,
>   role?: string,
>   disableRapidEmails?: boolean,
>   isStudioLabeler?: boolean
> }[]
> ```

***

### inviteTeamMember

`teams.inviteTeamMember`

Invite users by email to the team with a role

**Risk:** `write`

```ts theme={null}
await corsair.scaleai.api.teams.inviteTeamMember({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `emails` | `string[]` | Yes | — |
| `role` | `labeler \| member \| manager` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   _id?: string,
>   id?: string,
>   email?: string,
>   role?: string,
>   disableRapidEmails?: boolean,
>   isStudioLabeler?: boolean
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.