> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Studio

> Studio Teams List All Teammates Invite Teammates Update Teammate Role List All Assignments Assign Teammates Unassign Teammate List Project Groups Create Project Group Update Project Group Studio Actions List Studio Batch

# Studio Teams

### List All Teammates

Retrieves basic information about all team members associate with your account.

```python theme={null}
import requests

url = "https://api.scale.com/v1/teams"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.get(url, headers=headers)

print(response.text)
```

```json theme={null}
[
  {
    "email": "lautaro.rangil@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "firstName": "lautaro",
    "lastName": "rangil",
    "company": "Scale Ai",
    "role": "admin"
  },
  {
    "email": "test_teammate+4dce2ca7e@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "test_teammate+f2c811262@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  }
]
```

### Invite Teammates

Invites one or multiple users by email to your team. team\_role can be either labeler, member, or manager. Returns information about all team members.

<ParamField path="Query Params" type="object">
  <ParamField path="emails" type="string" required>
    Array of emails of teammates you want to invite.

    ***
  </ParamField>

  <ParamField path="team_role" type="string" required>
    Role of invited teammate. Allowed values are: labeler (Studio only), member, or manager.

    ***
  </ParamField>
</ParamField>

```text theme={null}
import requests

url = "https://api.scale.com/v1/teams/invite"

payload = {
    "emails": ["luis.lopezcastaneda@scale.com"],
    "team_role": "labeler"
}
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

```json theme={null}
[
  {
    "email": "lautaro.rangil@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "firstName": "lautaro",
    "lastName": "rangil",
    "company": "Scale Ai",
    "role": "admin"
  },
  {
    "email": "test_teammate+4dce2ca7e@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "test_teammate+f2c811262@scale.com",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "luis.lopezcastaneda@scale.com",
    "expiry": "2023-08-09T16:12:38.072Z",
    "role": "invited",
    "isStudioLabeler": true
  }
]
```

### Update Teammate Role

Changes the role of non-admin team members. emails should be a list of emails of team members who are either labelers, members, managers, or disabled. team\_role should be one of labeler, member, or manager. Returns information about all members of your team.

<ParamField path="Query Params" type="object">
  <ParamField path="emails" type="string" required>
    Array of emails of teammates you want to invite.

    ***
  </ParamField>

  <ParamField path="team_role" type="string" required>
    Role of invited teammate. Allowed values are: labeler (Studio only), member, or manager.

    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/teams/set_role"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
[
  {
    "email": "string",
    "role": "string",
    "company": "string",
    "firstName": "string",
    "lastName": "string",
    "isStudioLabeler": true,
    "expiry": "string"
  }
]
```

### List All Assignments

Gets the current project assignments of all active users in your team (does not include “invited” or “disabled” team members).

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/assignments"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.get(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Assign Teammates

Gets the current project assignments of all active users in your team (does not include “invited” or “disabled” team members).

<ParamField path="Query Params" type="object">
  <ParamField path="emails" type="string" required>
    Array of emails of teammates.

    ***
  </ParamField>

  <ParamField path="projects" type="string" required>
    Array of projects to assign.

    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/assignments/add"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Unassign Teammate

Unassigns provided projects from specified team members. Returns all team members and their assignments.

<ParamField path="Query Params" type="object">
  <ParamField path="emails" type="string" required>
    Array of emails of teammates.

    ***
  </ParamField>

  <ParamField path="projects" type="string">
    Array of projects to unassign.

    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/assignments/remove"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
 {
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### List Project Groups

Returns all labeler groups for the project specified in URL.

<ParamField path="Query Params" type="object">
  <ParamField path="project" type="string" required>
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/projects/project_name/groups"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.get(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

Create Project Group

Creates a group with the provided name for the project specified in the URL and adds team members. Only returns information about that specific group. Team members must be assigned to the specified project to be added to a group in that project.

<ParamField path="Query Params" type="object">
  <ParamField path="project" type="string" required>
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/projects/project_name/groups"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Update Project Group

Adds or removes team members from specified labeler group. Only returns information about that specific group.

<ParamField path="Query Params" type="object">
  <ParamField path="project" type="string" required>
    ***
  </ParamField>

  <ParamField path="group" type="string" required>
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/projects/project_name/groups/group_name"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.put(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

# Studio Actions

### List Studio Batches

Returns basic information about all pending batches, in order of priority.

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/batches"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.get(url, headers=headers)

print(response.text)

```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Assign Batches

Sets (not adds to) labeler group assignment for the specified batch. You can add individual members as well by specifying their email as a group name. Returns information only about the specified batch.

<ParamField path="Query Params" type="object">
  <ParamField path="batch" type="string" required>
    List of group names

    ***
  </ParamField>
</ParamField>

<ParamField path="Body Params" type="object">
  <ParamField path="groups" type="string">
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/batches/batch_name"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.put(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Set Batches Priorities

Adds or removes team members from specified labeler group. Only returns information about that specific group.

<ParamField path="Query Params" type="object">
  <ParamField path="groups" type="string">
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/batches/set_priorities"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Reset Batches Priorities

Restores batch priority order to default order. Default order is sorted by calibration batches first, then by creation date. Returns all batches in new priority order.

<ParamField path="Query Params" type="object">
  <ParamField path="groups" type="string">
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/batches/reset_priorities"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### List Training Attempts

This API returns a list of training attempts matching the provided parameters and related data.

You must set one of quality\_task\_ids or labeler\_emails (or both) in the query parameters to use this endpoint.

<ParamField path="Query Params" type="object">
  <ParamField path="quality_task_ids" type="array of strings">
    ***
  </ParamField>

  <ParamField path="labeler_emails" type="array of strings">
    ***
  </ParamField>

  <ParamField path="next_token" type="string">
    ***
  </ParamField>

  <ParamField path="limit" type="int32">
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/quality/labelers"

headers = {
    "accept": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjJlMjhmNDc5MmFkYWQwMDFlZDA1MTBiOg=="
}

response = requests.get(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Send Tasks to Completion

Sends pending tasks with at least one attempt to completion. If you specify batches as an array of batch names but also provide all\_batches as true, all\_batches takes precedence.

<ParamField path="Path Params" type="object">
  <ParamField path="projectName" type="string" required>
    ***
  </ParamField>
</ParamField>

<ParamField path="Query Params" type="object">
  <ParamField path="all_batches" type="boolean">
    ***
  </ParamField>

  <ParamField path="batches" type="array of strings">
    ***
  </ParamField>
</ParamField>

```python theme={null}
import requests

url = "https://api.scale.com/v1/studio/projects/project_name/send_tasks_to_completed"

headers = {
    "content-type": "application/json",
    "authorization": "Basic c2NhbGVpbnRfZWMyMjU0MWQ2OWE1NDBlYWE0OTgyNWNlNjM2ODNiNDV8NjM0NzMwZDkwZTI2NDMwMDMxNTM0ZjFjOg=="
}

response = requests.post(url, headers=headers)

print(response.text)
```

```json theme={null}
{
  "id": "Nc6yKKMpcxiiFxp6",
  "message_id": "LoPsJaMcPBuFNjg1",
  "filename": "Invoice_room_service__Plaza_Hotel.pdf",
  "file_url": "https://assets.protocol.chat/attachments/Invoice_room_service__Plaza_Hotel.pdf",
  "file_type": "application/pdf",
  "file_size": 21352,
  "created_at": 692233200
}
```

### Update Project Config (Studio Only)

Studio projects only. This endpoint updates the pipeline config of your project. `**/projects/\{Name\}/updatePipelineConfig**` is also a valid endpoint option.

<ParamField path="Path Params" type="object">
  <ParamField path="name" type="string" required>
    ***
  </ParamField>
</ParamField>

<ParamField path="Body Params" type="object">
  <ParamField path="pipeline" type="string">
    Studio projects only. Specify the pipeline of the project. Must use either standard\_task or consensus\_task.

    ***
  </ParamField>

  <ParamField path="consensus_attempts" type="integer">
    Studio consensus projects only. Specify the number of attempts

    ***
  </ParamField>
</ParamField>
