Skip to main content

Create a project with python

This tutorial will show you how to create a new project using tator-py. The project metadata will be configured for video object detection, and our bounding boxes will only have one attribute: a string indicating the classification label. This project will be suitable for following most of the media management, custom metadata, and annotation tutorials.

First make sure you have installed tator-py:

pip install tator

Create an organization, then create a project under that organization:

import tator
api = tator.get_api(host='', token=MY_TOKEN)

# Create the organization.
organization = {'name': 'My Company'}
response = api.create_organization(organization_spec=organization)
organization_id =

# Create the project.
project = {'name': 'Demo Project',
'summary': 'A project created with tator-py.',
response = api.create_project(project_spec=project)
project_id =

Now we will create a video type. This will allow us to upload videos to the project:

media_type = {'name': 'Demo Videos',
'description': 'A video type created with tator-py.',
'dtype': 'video'}
response = api.create_media_type(project_id, media_type_spec=media_type)
media_type_id =

Finally we will create a box type. This will allow us to draw boxes in the annotation view and set classification labels.

localization_type = {'name': 'Demo Boxes',
'description': 'A box type created with tator-py.',
'dtype': 'box',
'media_types': [media_type_id],
'attribute_types': [
'name': 'Label',
'dtype': 'string',
'order': 0,
response = api.create_localization_type(project_id, localization_type_spec=localization_type)
localization_type_id =

Now if you log in to the web interface you will see the project you just created.