Studio Teams

List All Teammates

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

Request

GET/v1/teams
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)

Response

[
  {
    "email": "[email protected]",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "firstName": "lautaro",
    "lastName": "rangil",
    "company": "Scale Ai",
    "role": "admin"
  },
  {
    "email": "[email protected]",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "[email protected]",
    "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.

Query Params

emailsstringrequired

Array of emails of teammates you want to invite.

team_rolestringrequired

Role of invited teammate. Allowed values are: labeler (Studio only), member, or manager.

Request

POST/v1/teams/invite
import requests

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

payload = {
    "emails": ["[email protected]"],
    "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)

Response

[
  {
    "email": "[email protected]",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "firstName": "lautaro",
    "lastName": "rangil",
    "company": "Scale Ai",
    "role": "admin"
  },
  {
    "email": "[email protected]",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "[email protected]",
    "disableRapidEmails": false,
    "isStudioLabeler": false,
    "role": "member"
  },
  {
    "email": "[email protected]",
    "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.

Query Params

emailsstringrequired

Array of emails of teammates you want to invite.

team_rolestringrequired

Role of invited teammate. Allowed values are: labeler (Studio only), member, or manager.

Request

POST/v1/teams/set_role
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)

Response

[
  {
    "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).

Request

GET/v1/studio/assignments
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)

Response

{
  "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).

Query Params

emailsstringrequired

Array of emails of teammates.

projectsstringrequired

Array of projects to assign.

Request

POST/v1/studio/assignments/add
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)

Response

{
  "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.

Query Params

emailsstringrequired

Array of emails of teammates.

projectsstring

Array of projects to unassign.

Request

POST/v1/studio/assignments/remove
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)

Response

 {
  "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.

Query Params

projectstringrequired

Request

GET/v1/studio/projects/{project}/groups
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)

Response

{
  "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.

Query Params

projectstringrequired

Request

POST/v1/studio/projects/{project}/groups
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)

Response

{
  "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.

Query Params

projectstringrequired

groupstringrequired

Request

POST/v1/studio/projects/{project}/groups/{group}
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)

Response

{
  "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.

Request

GET/v1/studio/batches
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)

Response

{
  "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.

Query Params

batchstringrequired

List of group names

Body Params

groupsstring

Request

POST/v1/studio/batches/{batch}
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)

Response

{
  "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.

Query Params

groupsstring

Request

POST/v1/studio/batches/set_priorities
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)

Response

{
  "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.

Query Params

groupsstring

Request

POST/v1/studio/batches/reset_priorities
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)

Response

{
  "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.

Query Params

quality_task_idsarray of strings

labeler_emailsarray of strings

next_tokenstring

limitint32

Request

GET/v1/quality/labelers
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)

Response

{
  "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.

Path Params

projectNamestringrequired

Query Params

all_batchesboolean

batchesarray of strings

Request

GET/v1/studio/projects/{projectName}/send_tasks_to_completed
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)

Response

{
  "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.

Path Params

namestringrequired

Body Params

pipelinestring

Studio projects only. Specify the pipeline of the project. Must use either standard_task or consensus_task.

consensus_attemptsinteger

Studio consensus projects only. Specify the number of attempts

Updated about 1 month ago