Environment:Roboflow Rf detr Roboflow Deployment Credentials
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Deployment, Computer_Vision |
| Last Updated | 2026-02-08 15:00 GMT |
Overview
Credential environment for deploying trained RF-DETR models to Roboflow's cloud platform and running serverless inference via the Roboflow Inference SDK.
Description
This environment defines the API credentials needed to authenticate with the Roboflow platform. The `ROBOFLOW_API_KEY` is required to upload model weights and run serverless inference. It can be passed directly as a parameter or read from an environment variable.
Usage
Use this environment when deploying a trained model to Roboflow via `deploy_to_roboflow()` or when running serverless inference via the Roboflow Inference SDK. Not needed for local training or inference.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| Network | Internet access | Required to upload models and call inference API |
| Account | Roboflow account | Free tier available at roboflow.com |
Dependencies
Python Packages
- `roboflow` (included in core rfdetr dependencies)
- `inference` (for serverless inference; installed separately)
Credentials
The following credentials must be available at runtime:
- `ROBOFLOW_API_KEY`: Roboflow API key for authentication. Can be:
- Passed directly: `deploy_to_roboflow(api_key="your_key")`
- Set as environment variable: `export ROBOFLOW_API_KEY=your_key`
- Retrieved from Roboflow dashboard settings
WARNING: Never commit API keys to version control.
Quick Install
# Core rfdetr already includes the roboflow SDK
pip install rfdetr
# For serverless inference
pip install inference
# Set API key
export ROBOFLOW_API_KEY="your_api_key_here"
Code Evidence
API key resolution from `rfdetr/detr.py:429-432`:
if api_key is None:
api_key = os.getenv("ROBOFLOW_API_KEY")
if api_key is None:
raise ValueError(
"Set api_key=<KEY> in deploy_to_roboflow or export ROBOFLOW_API_KEY=<KEY>"
)
Roboflow SDK authentication from `rfdetr/detr.py:435`:
rf = Roboflow(api_key=api_key)
workspace = rf.workspace(workspace)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ValueError: Set api_key=<KEY> in deploy_to_roboflow or export ROBOFLOW_API_KEY=<KEY>` | No API key provided | Pass `api_key` parameter or set `ROBOFLOW_API_KEY` environment variable |
| `ValueError: Must set size for custom architectures` | Custom model without size specification | Pass the `size` parameter when calling `deploy_to_roboflow()` |
| Authentication failed | Invalid or expired API key | Verify API key at Roboflow dashboard settings |
Compatibility Notes
- API Key: Obtained from the Roboflow dashboard under workspace settings.
- Model Upload: Uploads weights as a `.pt` file to the Roboflow platform.
- Serverless Inference: Requires the separate `inference` package, not included in core rfdetr.