Exporting labels from video

Dear LabelBox community:

I have been using the LabelBox web-app to annotate a mp4 video, creating both frame classifications and bounding boxes. When, using the app interface, I export the labels to a JSON I only see under labels a field with a weblink:

frames “https://api.labelbox.com/v1/frames/ckhf4fzk300023h645dhxj08r

When I try access the link, I get the following error message:

{“status”:“error”,“message”:“An authentication token is required to complete this operation. The Authorization header must contain your API key.”}

Is there a way to fetch the labels from the app without extensive coding?


1 Like

Here is a script for getting the Label contents!

import json
import os
import requests
API_KEY = ‘’
headers = {‘Authorization’: f"Bearer {API_KEY}"}
response = requests.get(FRAMES_URL, headers=headers, stream=True)
for frame_line in response.iter_lines():
if frame_line:
# frame is a dict with annotations for each frame
frame = json.loads(frame_line.decode(‘utf-8’))
# process the file
# or
print(json.dumps(frame, indent=2))