---
updatedAt: 2025-06-17T21:19:19.000Z
agentTools:
  projectIndex: https://documentation.picsellia.com/llms.txt
---

# Create Annotation Campaign

```python Python
from picsellia.types.enums import CampaignStepType
from picsellia import Client

api_token = ""
client = Client(api_token)

dataset = client.get_dataset("sample")
first_annotator = dataset.find_worker("john-doe")
second_annotator = dataset.find_worker("max-duncan")
reviewer = dataset.find_worker("emma-li")

dataset_version = dataset.get_version("initial")

instructions_file_path = "instructions.pdf"
campaign = dataset_version.create_campaign("test-campaign", instructions_file_path=instructions_file_path)

annotation_step = campaign.add_step(
    "annotation-1",
    type=CampaignStepType.ANNOTATION,
    assignees=[(first_annotator, 1), (second_annotator, 1)]
)
review_step = campaign.add_step(
    "review",
    type=CampaignStepType.REVIEW,
    assignees=[(reviewer, 1)]
)
campaign.launch(existing_annotations_step_id=annotation_step["id"])

```

```json Response Example
{"success":true}
```

# Initialize Picsellia Client

<!-- python@1-5 -->



# Retrieve workers

<!-- python@7-10 -->

You first have to retrieve the Dataset (which contains your DatasetVersion) because that's where the workers lies.
The goal here will be to assign them to the campaign so they will receive tasks automatically

# Retrieve the Dataset Version

<!-- python@12 -->

Get the Dataset Version where you want to create your Annotation Campaign

# Initialize the Campaign

<!-- python@14-15 -->

Here you will create an empty campaign with just a name and optionally an instructions file attached.
If you add an instructions file, the annotators will be able to see it in the tool when labeling

# Add Campaign Steps

<!-- python@17-26 -->

As we want to create an annotation Workflow, we need to add some steps to our campaign.
They can be of two type, Annotation or Review.
Here we will create an Annotation step where the task will be evenly distributed among our two annotators.
The integer in the assignee tuple represent the weight of the worker in this step.
We then create a Review step where only one person will be assigned to the tasks coming from the previous step.

# Launch the Campaign

<!-- python@27 -->

Here we will launch the campaign which means that the tasks linked to your Dataset Version Assets will be created in the first step.
The existing_annotation_step_id parameter specifies what to do with existing annotation in your Dataset Version.
Here, the annotators will be able to work directly on those annotations in the first step, instead of starting from scratch.