Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

API, SDK & CLI

Connect AI assistants with Unitlab MCP, or build data annotation automations with the Python SDK, CLI, and authenticated HTTP API.

Choose the integration surface by runtime and operating model. These surfaces provide access to Unitlab resources through their respective authentication and permission models.

Outcome: Connect an AI assistant through MCP, or build production Unitlab automations with the Python SDK, CLI, and authenticated HTTP API.

The Python SDK and CLI help you upload data, organize datasets, and automate annotation workflows. The upload guides below use Unitlab 3.1.6 and include file preparation, grouping rules, annotation imports, and processing checks.

Choose a surface

Need
Recommended surface

Conversational AI workflows

Python application or notebook

Terminal or shell script

Another programming language

Connect an AI assistant with MCP

Unitlab MCP lets a compatible AI assistant work in one selected workspace: create projects, upload data, annotate supported modalities, manage workflow tasks, check quality, and export releases.

The hosted MCP server is https://api.unitlab.ai/mcp. Sign in with OAuth, choose a workspace, select Read only or Read and write, and limit permissions if needed. This connection does not require a Unitlab API key. The assistant remains bounded by your current workspace role and connection permissions.

Start with Connect your AI assistant or the image-folder quickstart. Then explore the MCP tool reference and workflow automation guide.

Upload data and existing annotations

What you want to do
Start here

Upload a file or folder; automate a local file list

Add reusable files to the Asset library

Import local annotation JSON, COCO, or supported exported labels

Group files using filename rules and a saved layout

Check accepted source data formats

Annotation imports use a separate SDK workflow with a preview before commit. There is no annotation-import CLI command in version 3.1.6. A JSON file containing a list of paths is also distinct from annotation JSON; see the project upload guide for a Python loop that reads a local file list.

Follow one complete example

Start with two local images in the Python quickstart or CLI quickstart. Once the images are processed, follow Pre-labels, review, and export to import model labels, review them, and retrieve a release.

The guides distinguish three JSON inputs:

File
Purpose
Where it is used

A local list of media paths

Input to your own upload loop

COCO or supported Unitlab annotation JSON

Labels that reference media

grouping-config.json

Rules and layout for files already in Assets

Coverage

Projects, Data Units, Batch Queues, Assets, folders, cloud storage, grouping, datasets and versions, embedding spaces, ontologies, workflow stages and tasks, releases, errors, and production automation patterns.

Keep the result of each step

Step
Save and check

Upload media

Project or folder ID, Batch Queue ID, accepted files, and processing failures

Import labels

Import ID, preview matches and conflicts, then the commit report

Group files

Estimate, generated grouped-folder ID, and the resulting groups/layout

Review and export

Workflow decisions, release scope and status, then the downloaded labels

After a timeout, inspect the existing operation before repeating a create, upload, or commit request. For specific errors, use the recovery section in the guide for that operation.


Explore related Unitlab capabilities: enterprise data annotation workflows and Unitlab MCP for AI assistants.