Roboflow Docs
DashboardForum
  • Build Vision Models with Roboflow
  • Quickstart
  • Roboflow Enterprise
  • Workspaces
    • Create a Workspace
    • Delete a Workspace
    • Add Team Members
    • Role-Based Access Control
  • Usage Based Pricing
  • Workflows
    • Create a Workflow
    • Build a Workflow
    • Test a Workflow
    • Deploy a Workflow
    • Workflow Examples
      • Multimodal Model Workflow
    • Share a Workflow
      • Workflow Sharing Configuration
    • Advance Workflow Topics
      • JSON Editor
  • Datasets
    • Create a Project
    • Upload Data
      • Import Data from Cloud Providers
        • AWS S3 Bucket
        • Azure Blob Storage
        • Google Cloud Storage
      • Upload Video
      • Import from Roboflow Universe
    • Manage Batches
    • Search a Dataset
    • Create a Dataset Version
    • Preprocess Images
    • Create Augmented Images
    • Add Tags to Images
    • Manage Classes
    • Edit Keypoint Skeletons
    • Create an Annotation Attribute
    • Export Versions
    • Dataset Analytics
    • Merge Projects
    • Delete an Image
    • Delete a Version
    • Delete a Project
    • Project Folders
  • Annotate
    • Annotation Tools
    • Use Roboflow Annotate
      • Annotate Keypoints
      • Label Assist (AI Labeling)
      • Enhanced Smart Polygon with SAM (AI Labeling)
      • Smart Polygon (AI Labeling)
      • Keyboard Shortcuts
      • Comment on an Image
      • Annotation History
      • Similarity Search
      • Box Prompting (AI Labeling)
    • Automated Annotation with Auto Label
    • Collaborate on Annotations
    • Annotation Insights
    • Labeling Best Practices
  • Train
    • Train a Model in Roboflow
      • Train from Scratch
      • Train from a Universe Checkpoint
      • Python Package
      • Roboflow Notebooks (GitHub)
    • Train from Azure Vision
    • Train from Google Cloud
    • View Training Results
    • Evaluate Trained Models
    • Custom Training Notebooks
  • Deploy
    • Deployment Overview
      • Roboflow Managed Deployments Overview
    • Serverless Hosted API
      • Object Detection
      • Classification
      • Instance Segmentation
        • Semantic Segmentation
      • Keypoint Detection
      • Foundation Models
        • CLIP
        • OCR
        • YOLO-World
      • Video Inference
        • Use a Fine-Tuned Model
        • Use CLIP
        • Use Gaze Detection
        • API Reference
        • Video Inference JSON Output Format
      • Pre-Trained Model APIs
        • Blur People API
        • OCR API
        • Logistics API
        • Image Tagging API
        • People Detection API
        • Fish Detection API
        • Bird Detection API
        • PPE Detection API
        • Barcode Detection API
        • License Plate Detection API
        • Ceramic Defect Detection API
        • Metal Defect Detection API
    • Serverless Hosted API V2
    • Dedicated Deployments
      • How to create a dedicated deployment (Roboflow App)
      • How to create a dedicated deployment (Roboflow CLI)
      • How to use a dedicated deployment
      • How to manage dedicated deployment using HTTP APIs
    • SDKs
      • Python inference-sdk
      • Web Browser
        • inferencejs Reference
        • inferencejs Requirements
      • Lens Studio
        • Changelog - Lens Studio
      • Mobile iOS
      • Luxonis OAK
    • Upload Custom Weights
    • Download Roboflow Model Weights
    • Enterprise Deployment
      • License Server
      • Offline Mode
      • Kubernetes
      • Docker Compose
    • Model Monitoring
      • Alerting
  • Roboflow CLI
    • Introduction
    • Installation and Authentication
    • Getting Help
    • Upload Dataset
    • Download Dataset
    • Run Inference
  • API Reference
    • Introduction
    • Python Package
    • REST API Structure
    • Authentication
    • Workspace and Project IDs
    • Workspaces
    • Workspace Image Query
    • Batches
    • Annotation Jobs
    • Projects
      • Initialize
      • Create
      • Project Folders API
    • Images
      • Upload Images
      • Image Details
      • Upload Dataset
      • Upload an Annotation
      • Search
      • Tags
    • Versions
      • View a Version
      • Create a Project Version
    • Inference
    • Export Data
    • Train a Model
    • Annotation Insights
      • Annotation Insights (Legacy Endpoint)
    • Model Monitoring
      • Custom Metadata
      • Inference Result Stats
  • Support
    • Share a Workspace with Support
    • Account Deletion
    • Frequently Asked Questions
Powered by GitBook
On this page
  • Inference via Python SDK (roboflow package) – Deprecated
  • What's Changed?
  • Use These Instead
  • Why Deprecate the Python SDK Inference Method?
  • Need Help Migrating?

Was this helpful?

  1. API Reference

Inference

Run inference on an image and retrieve predictions.

PreviousCreate a Project VersionNextExport Data

Last updated 1 month ago

Was this helpful?

Inference via Python SDK (roboflow package) – Deprecated

⚠️ Deprecated Running inference using the roboflow Python SDK was deprecated. This method is no longer actively maintained, and we recommend migrating to the new Inference SDK and Serverless Hosted APIs for all current and future projects.


What's Changed?

Roboflow has introduced more powerful and flexible inference options, including:

  • ✅ Native support for all models

  • ✅ Access to foundation models (YOLO-World, CLIP, OCR, SAM, Florence2, etc.)

  • ✅ Improved performance and latency using GPU-accelerated infrastructure

  • ✅ A simplified and unified inference endpoint


Use These Instead

🧠

Use this package for running inference across a wide range of model types, with local and hosted backends supported out-of-the-box. It supports modern use cases like versionless models and foundation models.

👉 Explore:


☁️

A GPU-accelerated cloud API with unified endpoints for all tasks. Offers lower latency for inference requests and support for powerful models such as Florence2 and SAM2.


If you're using older models or workflows, the original serverless API is still available. This includes individual endpoints for object detection, classification, segmentation, and more.


Why Deprecate the Python SDK Inference Method?

While the roboflow Python SDK remains useful for other interactions (e.g., uploading data, managing datasets), its inference capabilities have been replaced by more efficient and modern solutions:

  • It does not support all models (models uploaded without dataset version, Roboflow Instant)

  • It offers limited access to newer model types

  • It lacks performance improvements found in GPU-accelerated APIs

  • It is not compatible with newer deployment workflows


Need Help Migrating?

If you're using the legacy SDK for inference and want help transitioning to the new tools, check out our guides at:

🔗 Learn more:

🌐

🔗 Learn more:

🔧

📘

New Inference SDK
https://inference.roboflow.com
Serverless Hosted API V2
Serverless Hosted API V2 Documentation
Serverless API
Serverless Hosted API (V1)
https://inference.roboflow.com
Roboflow Documentation