With Lightly, you can export selected images effortlessly to the Labelbox format:

import json
from lightly.api import ApiWorkflowClient

# Create the Lightly client to connect to the API.
client = ApiWorkflowClient(token="MY_LIGHTLY_TOKEN", dataset_id="MY_DATASET_ID")

label_box_data_rows = client.export_label_box_data_rows_by_tag_name(
    tag_name="initial-tag"  # name of the tag in the dataset
with open("label_box_data_rows.json", "w") as f:
    json.dump(label_box_data_rows, f, indent=4)

The resulting file should look similar to this:

        "externalId": "your-image.png",
        "imageUrl": "https://api.lightly.ai/your-image-url.png"

Now, you can import the Labelbox data rows and start labeling your data.