We're ecstatic to announce the launch of our newest pip package, a way for you to natively interface with your Roboflow workspace through your Python scripts and Jupyter notebooks! Read the full package documentation here.

Your API Key

If you've ever used our Upload API or Inference API you already have a Roboflow API Key for your workspace. If not, go to your workspace's settings to obtain one. You'll need it to use the package.

Obtain an API Key from your Workspace's settings.

Each API Key is tied to a specific workspace; treat it like a password and keep it private because your API Key can be used to access and modify the data in your workspace.

Overview

Through the Roboflow python package you can:

  1. Access information about your workspaces, projects, and versions programmatically.
  2. Upload images locally to your web Roboflow project.
  3. Perform inference on models you've trained through our web UI.
  4. Visualize, and save predictions that you've made on the model.

Example

import roboflow

rf = roboflow.Roboflow("MY_API_KEY")
project = rf.workspace().project("my-project")


model = project.versions()[0].model # assuming you have trained a model already

predictions = model.predict("IMAGE.jpg")

prediction.plot()
print(prediction.json())

prediction.save(output_path="predictions.jpg")

What's next

We're building a lot more integrations to the Web UI and REST API. Soon enough, you'll be able to upload and download batches of images that are in your projects, start training jobs, and perform preprocessing all through the Roboflow Python Package.

Build something cool with the pip package or have an idea for a feature that might be helpful? Either let us us know on the repository or drop us a line!