Introduction
Hybrid & On-prem
Hybrid cloud
Cloud data overview
Restrict data access by IP range
How to generate signed URLs
How to generate non-expiring signed URLs
On-prem
App
Overview
Ontology management
Projects
Data import
Labeling guides
Label export
Members
Workforce
Quality assurance
Automation
Model-assisted labeling
MAL import formats
Webhooks setup
Queue system
Real-time human-in-the-loop labeling
Custom label interface
Images
Videos
Text
Geospatial data
Python SDK
Getting started
Creating your first project
Project setup script
Projects
Datasets
Data Rows
Import annotations
Labels
General concepts
Python SDK FAQ
API reference
Model-assisted labeling Python script
GraphQL API
Intro to the GraphQL API
Getting started
Data types overview
Ontologies
Datasets
Data Rows
Bulk import requests
Labeling parameters
Labels
Members
Attachments
Review queue
Webhooks
Legacy editor
Migration guide
Legacy vs new editor ontology
Legacy vs new editor JSON exports
Legacy vs new editor hotkeys
Model predictions (legacy)
Multistep labeling
Release notes
Release definitions
January 6, 2021
December 7, 2020
November 4, 2020
October 9, 2020
September 25, 2020
August 21, 2020
August 6, 2020
July 6, 2020
June 22, 2020
June 2, 2020
May 19, 2020
April 14, 2020
April 1, 2020
March 3, 2020
February 18, 2020
February 5, 2020
January 17, 2020
Terms of use
Table of Contents
- All Categories
- GraphQL API
- Getting started
Getting started
Updated
by Alex Cota
Root endpoint
https://api.labelbox.com/graphql
Create API key
- Log in to app.labelbox.com.
- Click “Account” from the upper-right dropdown menu.
- From the API tab, click “Create API Key”.
- Copy the API key to your clipboard by clicking the blue icon. The API key will be hidden once you leave this page so make sure to save your API Key somewhere else.
Authentication
Authentication tokens (API Keys) are accepted by our GraphQL API in one of two ways.
- Provide as an authorization header [RECOMMENDED]:
# Pass API key as a header to make a graphql query
curl 'https://api.labelbox.com/graphql' \
-H 'Authorization: Bearer <API_KEY_HERE>' \
-H 'content-type: application/json' \
-d '{"query":"[QUERY HERE]"}'
# Pass API key as a header to request a mask for an annotated object
curl 'https://api.labelbox.com/masks/feature/:id' \
-H 'Authorization: Bearer <API_KEY_HERE>'
- Provide as a query parameter. We do not recommend sending API keys as a query parameter for GraphQL queries.
# Passing API key as a query parameter to request a mask for an annotated object
curl 'https://api.labelbox.com/masks/feature/:id?token=<API_KEY_HERE>'
Rate limiting
If you hit the rate limit, you’ll get a 429 status code and a retry-after response header that will contain a value for the number of seconds to wait before making a follow-up request.