# Scale AI

> Read and manage data labeling projects, batches and tasks in Scale AI.

App · 8 actions. Web page: https://docs.lodol.com/docs/integrations/scale-ai

## Actions

### Cancel pending task

Cancel a task that is still pending.

**Inputs**

- Task (`task_id`, text, required): Task ID.
- Clear unique ID (`clear_unique_id`, true/false): Clear unique ID.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "instruction": "example",
    "metadata": {},
    "params": {},
    "response": {},
    "status": "example",
    "task_id": "example",
    "type": "example"
  }
}
```

### Get batch

Read a labeling batch by name.

**Inputs**

- Batch name (`batch_name`, text, required): Batch name.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "completed_at": "example",
    "created_at": "example",
    "metadata": {},
    "name": "example",
    "project": "example",
    "status": "example"
  }
}
```

### Get batch status

Read a labeling batch’s status and its task counts.

**Inputs**

- Batch name (`batch_name`, text, required): Batch name.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "status": "example",
    "tasks_completed": 1,
    "tasks_pending": 1
  }
}
```

### Get project

Read a Scale AI project and its annotation settings.

**Inputs**

- Project name (`project_name`, text, required): Project name.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "name": "example",
    "param_history": [
      {}
    ],
    "type": "example"
  }
}
```

### Get task

Read a task’s instructions, status and available results.

**Inputs**

- Task (`task_id`, text, required): Task ID.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "instruction": "example",
    "metadata": {},
    "params": {},
    "response": {},
    "status": "example",
    "task_id": "example",
    "type": "example"
  }
}
```

### List batches

Read a page of labeling batches, with an optional project and date range.

**Inputs**

- Project (`project`, text): Project.
- Status (`status`, text): Status. One of: `staging`, `in_progress` (In progress), `completed`.
- Detailed (`detailed`, true/false): Detailed.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- Limit (`limit`, number): Limit. From 1 to 100.
- Offset (`offset`, number): Offset. At least 0.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "docs": [
      {
        "completed_at": "example",
        "created_at": "example",
        "metadata": {},
        "name": "example",
        "project": "example",
        "status": "example"
      }
    ],
    "has_more": true,
    "limit": 1,
    "offset": 1,
    "totalDocs": 1
  }
}
```

### List projects

List Scale AI projects and their annotation types.

**Inputs**

- Archived (`archived`, true/false): Archived.

**Outputs**

- `data` (list): The response from Scale AI.

**Example output**

```json
{
  "data": [
    {
      "created_at": "example",
      "name": "example",
      "param_history": [
        {}
      ],
      "type": "example"
    }
  ]
}
```

### List tasks

Read a page of labeling tasks with optional status, project and batch filters.

**Inputs**

- Status (`status`, list): Status. One or more of: `completed`, `pending`, `canceled`.
- Project (`project`, text): Project.
- Batch (`batch`, text): Batch.
- Tags (`tags`, list): Tags.
- Include attachment URL (`include_attachment_url`, true/false): Include attachment URL.
- Limit (`limit`, number): Limit. From 1 to 100.
- Next token (`next_token`, text): Next token.

**Outputs**

- `data` (object): The response from Scale AI.

**Example output**

```json
{
  "data": {
    "docs": [
      {
        "created_at": "example",
        "instruction": "example",
        "metadata": {},
        "params": {},
        "response": {},
        "status": "example",
        "task_id": "example",
        "type": "example"
      }
    ],
    "has_more": true,
    "limit": 1,
    "next_token": "example",
    "total": 1
  }
}
```
