
Roboflow Api Reference
- 173 installs
- 30 repo stars
- Updated August 3, 2026
- roboflow/computer-vision-skills
Reference for Roboflow REST and Inference API URL patterns, authentication, host selection, rate limits, and Python SDK quick starts for computer vision.
About
A reference skill giving protocol-level facts for the Roboflow REST and Inference APIs, including hosts, auth, parameters, and SDK usage. A developer uses it when calling Roboflow for model inference, uploads, or project management from code.
- Documents Roboflow Platform, Serverless, Dedicated and self-hosted inference hosts
- Auth methods, host selection guide, rate limits and Python inference-sdk/roboflow quick starts
Roboflow Api Reference by the numbers
- 173 all-time installs (skills.sh)
- +25 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #2,259 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/roboflow/computer-vision-skills --skill roboflow-api-referenceAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 173 |
|---|---|
| repo stars | ★ 30 |
| Last updated | August 3, 2026 |
| Repository | roboflow/computer-vision-skills ↗ |
What it does
Reference for Roboflow REST and Inference API URL patterns, authentication, host selection, rate limits, and Python SDK quick starts for computer vision.
Files
For agents — source-of-truth: This skill is authored in `roboflow/computer-vision-skills` and shipped with the Roboflow plugin. If your client has loaded the plugin (you'll seeroboflow:<name>skills in your available skills list), use those local skills — they're read fresh from disk every session. The same content served as MCP resources atroboflow://skills/<name>/...is a fallback for clients without the plugin and may lag this repo. Don't call `ReadMcpResourceTool` for `roboflow://skills/...` URIs when a local `roboflow:<name>` skill is available.
Tip: If you're connected to the Roboflow MCP server, prefer its tools (projects_*,versions_*,models_*,workflows_*,images_*, …) over raw REST calls — they handle auth, pagination, and typed responses for you. The REST patterns below stay relevant if you're not using MCP.
Roboflow API Reference — Overview
API Hosts
| Host | Base URL | Purpose |
|---|---|---|
| Platform API | https://api.roboflow.com | CRUD for projects, images, versions, training, upload |
| Serverless Inference | https://serverless.roboflow.com | Model inference + Workflow execution |
| Dedicated Deployment | https://<name>.roboflow.cloud | Private GPU inference (same API as serverless) |
| Self-hosted Inference | http://localhost:9001 | Local inference server via inference package |
Use the inference-sdk Python package as the preferred client for all inference hosts. It handles auth, retries, and response parsing.
Authentication
| Method | Where | Format |
|---|---|---|
| Query parameter | All hosts | ?api_key=YOUR_KEY |
| Request body | Platform API + Workflow inference | "api_key": "YOUR_KEY" in JSON body |
| Header | MCP server (mcp.roboflow.com) | x-api-key: YOUR_KEY (handled automatically by MCP) |
API keys are workspace-scoped. Get yours from Workspace Settings > API Keys in the Roboflow dashboard (app.roboflow.com/{workspace}/settings/api). Personal API keys are at /settings/account → API Keys tab.
SDKs
| SDK | Install | Primary Use |
|---|---|---|
Python (inference-sdk) | pip install inference-sdk | Inference via InferenceHTTPClient |
Python (roboflow) | pip install roboflow | Upload, training, project management |
JavaScript (roboflow.js) | Browser script tag | Real-time on-device web inference |
| iOS (Swift) | CocoaPods/SPM | On-device mobile inference |
Python inference-sdk Quick Start
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(
api_url="https://serverless.roboflow.com", # or dedicated URL, or localhost
api_key="YOUR_KEY"
)
result = CLIENT.infer("image.jpg", model_id="your-project/1")Python roboflow SDK Quick Start
import roboflow
rf = roboflow.Roboflow(api_key="YOUR_KEY")
project = rf.workspace("my-workspace").project("my-project")
# Upload
project.upload(image_path="image.jpg", split="train")
# Inference
model = project.version(1).model
result = model.predict("image.jpg", confidence=40).json()Host Selection Guide
| Task | Host to Use |
|---|---|
| Run model inference | serverless.roboflow.com |
| Run Workflows | serverless.roboflow.com |
| Upload images | api.roboflow.com |
| Manage projects/versions | api.roboflow.com |
| Start training | api.roboflow.com |
| High-throughput / SLA inference | Dedicated deployment URL |
| Air-gapped / on-prem inference | Self-hosted localhost:9001 |
| Real-time video / webcam / RTSP | WebRTC via inference_sdk.webrtc against serverless or local — see roboflow://skills/inference/workflows ("Video Stream" section). Not a plain HTTP call. |
Rate Limits
- Serverless API: rate limits vary by plan
- File upload max: 20 MB
Related Pages
roboflow://skills/api-reference/inference— inference URL patterns, request/response formatsroboflow://skills/api-reference/rest-api— platform REST API endpoints (CRUD, upload, training)
Roboflow Inference API Reference
Source-of-truth note: This page ships with the Roboflow plugin. If your client has the plugin loaded, prefer the local skill (roboflow:api-reference) over fetchingroboflow://skills/api-reference/inferenceviaReadMcpResourceTool— the MCP resources are a fallback for non-plugin clients and may lag the source repo.
Tip: If you're connected to the Roboflow MCP server, prefermodels_infer(single-model) orworkflow_specs_run/workflows_run(chained pipelines with annotated images) over raw HTTP calls — same operations, but auth is handled and responses are typed. The REST patterns below stay relevant if you're not using MCP.
Serverless Inference (Hosted API v2)
Single endpoint for all model types and Workflows. V2 is credit-billed by execution time (seconds); the older v1 hosted API was billed per inference count — v2 is the current default for all new projects.
POST https://serverless.roboflow.com/{dataset_id}/{version_id}
POST https://serverless.roboflow.com/{workspace_name}/workflows/{workflow_id}Inference SDK (Recommended Client)
The inference-sdk Python package is the preferred way to call Roboflow models. It handles auth, retries, and response parsing.
pip install inference-sdkfrom inference_sdk import InferenceHTTPClient
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key="YOUR_KEY"
)
result = client.infer("image.jpg", model_id="my-project/1")Works with local files, URLs, numpy arrays, and PIL images. Points at serverless by default; change api_url for dedicated deployments or local inference server.
Dedicated Deployments
Same API as serverless, but at your deployment URL:
POST https://<deployment-name>.roboflow.cloud/{projectId}/{versionNumber}Request Format
Image Input (choose one)
| Method | How |
|---|---|
| Base64 POST body | Set Content-Type: application/x-www-form-urlencoded, body = base64 string |
| Image URL param | ?image=https%3A%2F%2F... (URL-encoded) |
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
api_key | string | required | Workspace API key |
confidence | number | 40 | Prediction threshold (0-100). Lower = more predictions |
overlap | number | 30 | Max overlap % before NMS merges boxes (0-100) |
classes | string | all | Comma-separated class filter (e.g. dog,cat) |
format | string | json | json, image, or image_and_json |
labels | boolean | false | Show text labels (only when format=image) |
stroke | number | 1 | Bounding box stroke width in px (only when format=image) |
image | string | — | URL of hosted image (alternative to base64 body) |
Visualization
The recommended approach for visualization is Workflows — use workflow_specs_run with a visualization block (Bounding Box, Label, Mask, etc.). This gives you full control over rendering and works reliably across all model types. See roboflow://skills/inference/workflows.
Response Shapes
Object Detection
{
"predictions": [
{
"x": 189.5, "y": 100,
"width": 163, "height": 186,
"class": "helmet",
"class_id": 0,
"confidence": 0.544,
"class_confidence": 0.544,
"detection_id": "uuid"
}
],
"image": { "width": 2048, "height": 1371 }
}(x, y) = center of bounding box. Corner points: x1 = x - width/2, y1 = y - height/2.
Classification (Single-Label)
{
"predictions": [
{ "class": "real-image", "confidence": 0.7149 },
{ "class": "illustration", "confidence": 0.2851 }
],
"top": "real-image",
"confidence": 0.7149,
"image": { "width": 210, "height": 113 },
"prediction_type": "ClassificationModel"
}Classification (Multi-Label)
{
"predictions": {
"dent": { "confidence": 0.5253 },
"severe": { "confidence": 0.5804 }
},
"predicted_classes": ["dent", "severe"],
"prediction_type": "ClassificationModel"
}Instance Segmentation
Same as object detection, plus a points array per prediction:
{
"predictions": [
{
"x": 179.2, "y": 247,
"width": 231, "height": 147,
"class": "A", "confidence": 0.98,
"points": [
{ "x": 134, "y": 314 },
{ "x": 116, "y": 313 }
]
}
]
}Keypoint Detection
Same as object detection, plus a keypoints array per prediction:
{
"predictions": [
{
"x": 189.5, "y": 100,
"width": 163, "height": 186,
"class": "helmet", "confidence": 0.544,
"keypoints": [
{ "x": 189, "y": 20, "class": "top", "class_name": "top", "class_id": 0, "confidence": 0.91 },
{ "x": 188, "y": 180, "class": "bottom", "class_name": "bottom", "class_id": 1, "confidence": 0.93 }
]
}
],
"image": { "width": 2048, "height": 1371 }
}Code Examples
Python (inference-sdk) — Recommended
from inference_sdk import InferenceHTTPClient
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key="YOUR_KEY"
)
# Local image
result = client.infer("image.jpg", model_id="my-project/1")
# URL image
result = client.infer("https://example.com/photo.jpg", model_id="my-project/1")curl — Base64
base64 image.jpg | curl -d @- \
"https://serverless.roboflow.com/my-project/1?api_key=YOUR_KEY&confidence=50"curl — Image URL
curl -X POST "https://serverless.roboflow.com/my-project/1?\
api_key=YOUR_KEY&image=https%3A%2F%2Fexample.com%2Fphoto.jpg"Workflow Inference
curl -X POST "https://serverless.roboflow.com/my-workspace/workflows/my-workflow" \
-H "Content-Type: application/json" \
-d '{"api_key": "YOUR_KEY", "inputs": {"image": {"type": "url", "value": "https://example.com/photo.jpg"}}}'Error Responses
| Status | Meaning |
|---|---|
| 403 | Invalid or unauthorized api_key |
| 404 | Model/version not found |
| 413 | Image too large (max 20 MB) |
Roboflow Platform REST API Reference
Source-of-truth note: This page ships with the Roboflow plugin. If your client has the plugin loaded, prefer the local skill (roboflow:api-reference) over fetchingroboflow://skills/api-reference/rest-apiviaReadMcpResourceTool— the MCP resources are a fallback for non-plugin clients and may lag the source repo.
Tip: If you're connected to the Roboflow MCP server, prefer its tools (projects_*,versions_*,images_*,annotations_save,models_train, …) over raw REST calls — they handle auth and typed responses for you. The REST patterns below stay relevant if you're not using MCP.
Base URL: https://api.roboflow.com
All endpoints require ?api_key=YOUR_KEY as a query parameter.
API keys are not available programmatically. Users can find theirs at Workspace Settings > API Keys in the Roboflow dashboard (app.roboflow.com/{workspace}/settings/api).
Projects
| Method | Endpoint | Description |
|---|---|---|
| GET | /{workspace} | List all projects in workspace |
| GET | /{workspace}/{project} | Get project details |
| POST | /{workspace}/projects | Create a new project |
Create Project
curl -X POST "https://api.roboflow.com/my-workspace/projects?api_key=KEY" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "type": "object-detection", "annotation": "my-annotation-group"}'Required body fields: name, type, annotation (annotation group identifier).
Project types: object-detection, single-label-classification, multi-label-classification, instance-segmentation, semantic-segmentation
Image Upload
| Method | Endpoint | Description |
|---|---|---|
| POST | /{workspace}/{project}/upload | Upload image to project |
Upload via Image URL
curl -X POST "https://api.roboflow.com/my-workspace/my-project/upload?\
api_key=KEY&\
name=photo.jpg&\
split=train&\
image=https%3A%2F%2Fexample.com%2Fphoto.jpg"Upload via File (multipart)
curl -X POST "https://api.roboflow.com/my-workspace/my-project/upload?api_key=KEY" \
-F "name=image.jpg" \
-F "split=train" \
-F "file=@image.jpg" \
-F 'metadata={"camera_id":"cam001","temperature":72.5}'Upload Parameters
| Param | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Workspace API key |
name | string | no | Filename |
split | string | no | train, valid, or test (default: train) |
image | string | no | URL-encoded image URL (alternative to file upload) |
batch | string | no | Custom batch name |
tag | string | no | Tag(s) to apply (repeat param for multiple) |
metadata | string | no | JSON-stringified key-value metadata |
Upload via Python SDK
import roboflow
rf = roboflow.Roboflow(api_key="KEY")
project = rf.workspace("my-workspace").project("my-project")
project.upload(
image_path="image.jpg",
split="train",
metadata={"camera_id": "cam001", "temperature": 72.5}
)Image limits: max 20 MB, max 16400x10900 px. Duplicate images are skipped.
Versions
| Method | Endpoint | Description |
|---|---|---|
| GET | /{workspace}/{project}/{version} | Get version details |
| POST | /{workspace}/{project}/generate | Generate a new dataset version |
Generate Version
Creates a new version with preprocessing and augmentation applied.
curl -X POST "https://api.roboflow.com/my-workspace/my-project/generate?api_key=KEY" \
-H "Content-Type: application/json" \
-d '{
"preprocessing": { "auto-orient": true, "resize": { "width": 640, "height": 640 } },
"augmentation": { "flip": { "horizontal": true } }
}'Training
| Method | Endpoint | Description |
|---|---|---|
| POST | /{workspace}/{project}/{version}/train | Start training on a version |
Start Training
curl -X POST "https://api.roboflow.com/my-workspace/my-project/1/train?api_key=KEY"Training status is included in the version GET response (GET /{workspace}/{project}/{version}) under the version.train field. There is no separate training-status endpoint.
Models
| Method | Endpoint | Description |
|---|---|---|
| GET | /{workspace}/{project}/{version} | Get model/version info (includes metrics if trained) |
| GET | /{workspace}/{project}/models | List models for a project |
| GET | /models/{workspace}/{project}/{version} | Get model by workspace/project/version |
The version response includes model performance metrics (map, precision, recall) when a trained model exists.
Workflows
| Method | Endpoint | Description |
|---|---|---|
| GET | /{workspace}/workflows | List workflows in workspace |
| GET | /{workspace}/workflows/{workflowUrl} | Get a specific workflow |
| POST | /{workspace}/createWorkflow | Create a new workflow |
| POST | /{workspace}/updateWorkflow | Update a workflow |
Common Patterns
Full Pipeline: Upload, Version, Train
import roboflow
rf = roboflow.Roboflow(api_key="KEY")
project = rf.workspace("ws").project("proj")
# 1. Upload images
project.upload(image_path="img1.jpg", split="train")
# 2. Generate version
version = project.generate_version(
preprocessing={"auto-orient": True, "resize": {"width": 640, "height": 640}},
augmentation={"flip": {"horizontal": True}}
)
# 3. Train
version.train()CLI Upload (bulk)
pip install roboflow
roboflow import -w my-workspace -p my-project /path/to/images/Error Responses
| Status | Meaning |
|---|---|
| 401 | Missing or invalid api_key |
| 403 | Not authorized for this resource |
| 404 | Project/version not found |
| 409 | Duplicate image (skipped) |
| 413 | Image exceeds size limits |
| 422 | Validation error (missing/invalid required fields) |
| 423 | Folder usage paused |