Programmatic access to your Roboflow projects.
The primary way for humans to interact with Roboflow is the web UI, but sometimes your code needs access to information about your projects, datasets, and models too.
For the most part, routes in the API follow the same naming conventions as those in the web app. This means, oftentimes, you can simply change the domain from
api.roboflow.comand add your
api_keyto the URL and receive the information corresponding to that resource in JSON format.
We are working on SDKs to wrap the REST API in the conventions of your favorite programming languages. The Roboflow Python pip package will be released first. If you need examples for other languages, please reach out.
To access the data for a resource, pass your
api_keyin the query string (in the documentation samples we have stored our
api_keyas an environment variable called
ROBOFLOW_API_KEYwhich you could do with
export ROBOFLOW_API_KEY="xxxxxxx"(see below for how to obtain your API key from your account).
For the REST API you will use your workspace's
api_keywhich is available via its settings. You can get to the workspace settings using the drop-down arrow at the top of the Workspace's project list.
First, navigate to your workspace's settings.
Then, select the Roboflow API tab from the settings page's sidebar navigation:
Finally, copy your Private API Key. Be sure to keep this secret. Treat it like a password; it grants the bearer access to all of your workspace's data and models.
Copy your API Key.
If you ever accidentally expose your key to someone who isn't authorized to access your workspace, click "Revoke API Key" and we will disable it. You can then issue a new one.