Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Roboflow Rf detr Roboflow SDK Auth

From Leeroopedia


Knowledge Sources
Domains Deployment, Authentication
Last Updated 2026-02-08 15:00 GMT

Overview

External tool documentation for authenticating with the Roboflow platform via the Roboflow Python SDK.

Description

The Roboflow class from the roboflow package handles authentication and workspace access. It accepts an api_key parameter and provides methods to access workspaces, projects, and model versions.

Usage

Initialize the Roboflow client with your API key before calling deploy_to_roboflow on an RFDETR model.

Code Reference

Source Location

  • External: roboflow Python package

Signature

from roboflow import Roboflow

rf = Roboflow(api_key="your_api_key")
workspace = rf.workspace("workspace_name")
project = workspace.project("project_id")
version = project.version("version_number")

Import

from roboflow import Roboflow

I/O Contract

Inputs

Name Type Required Description
api_key str Yes Roboflow API key (or set ROBOFLOW_API_KEY env var)
workspace str Yes Roboflow workspace name

Outputs

Name Type Description
rf Roboflow Authenticated Roboflow client
workspace Workspace Workspace object for accessing projects

Usage Examples

Authenticate with Roboflow

from roboflow import Roboflow
import os

# Option 1: Direct API key
rf = Roboflow(api_key="your_api_key_here")

# Option 2: Environment variable
os.environ["ROBOFLOW_API_KEY"] = "your_api_key_here"
rf = Roboflow(api_key=os.environ["ROBOFLOW_API_KEY"])

workspace = rf.workspace("my-workspace")

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment