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.
Over time, the REST API will be expanded to have feature parity with the web UI so that you can perform any action via code that you can by hand. But currently, the API contains primarily read-only methods (with the exceptions of the Upload API, the Annotate API, and the Inference API).
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.com and add your
api_key to 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_key in the query string (in the documentation samples we have stored our
api_key as an environment variable called
ROBOFLOW_API_KEY which you could do with
export ROBOFLOW_API_KEY="xxxxxxx" (see below for how to obtain your API key from your account).
/ - the Root route can be used to validate your API Key and find your workspace ID.
/:workspace - the Workspace route gives you information about your workspace and a list of its projects.
/:workspace/:project - the Project route shows information about a project and its versions.
/:workspace/:project/:version - the Version route surfaces information about a version, its trained model (if present), and exported datasets.
For the REST API you will use your workspace's
api_key which 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.
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.
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.