For the complete documentation index, see llms.txt. This page is also available as Markdown.

Find Your Roboflow API Key

Find your API Key to authenticate with the Roboflow API and Roboflow Inference

You can find your API Key at app.roboflow.com/settings/api


There are two kinds of API key:

  • Private API Keys: used by Roboflow API and Roboflow Infernece

  • Public / Publishable API Key: Used by inference.js , our JavaScript inference SDK

API keys are scoped to a Workspace, which means you must use the API key associated with a workspace to access that Workspace's private projects.

Click "Generate New Key" to issue a new key, or copy a key you have already created.

If you ever accidentally expose your key to someone who isn't authorized to access your workspace, click "Roll API Key", which will disable previous API key and create a new one.

Multiple API Keys

Workspaces on Enterprise plans can create multiple API keys, allowing them to isolate environments and instantly revoke access for specific deployments or personnel without disrupting their entire production workflow.

Multiple API Key options for Enterprise Workspaces

We also offer Scoped API Keys as an Add-on to our Enterprise customers.

Default API Key

When a workspace has several keys, the app still uses one of them for code snippets and common workspace actions (ex: viewing model evaluation results). To choose it, edit a key and check "Set as default API key for this workspace". That key then shows a "Default" badge in the key list. Choosing a default requires the Advanced API Keys feature.

If no key is set as the default, the app falls back to the oldest enabled workspace key, and that key shows an "In Use" badge instead. Check the badge before you disable or revoke a key, so you know which one your workspace actions and billed usage run under.

Use your key with Roboflow Inference

Your API key grants access to the models you have trained on Roboflow, public models on Roboflow Universe, and the hosted inference APIs. There are several ways to supply it when using Roboflow Inference.

Environment variable

The recommended way is to set ROBOFLOW_API_KEY in your environment. In most terminals:

Any command run in that terminal session then has access to the key. See Environment Variables for the other variables the CLI and SDK read.

Python

When using Inference from Python, the key can be passed as a keyword argument:

HTTP request payload

When calling the server directly, pass the key as a URL parameter or as part of the request payload, depending on the route:

Docker

If you run the Inference Server locally in a Docker container, provide the key in the docker run command:

Requests sent to that server can then omit api_key from the request payload.

Last updated

Was this helpful?