Manage Images
Upload, fetch, annotate, and delete images in a Roboflow project from the Python SDK.
Upload an image (with optional annotation)
import roboflow
rf = roboflow.Roboflow(api_key="YOUR_API_KEY")
project = rf.workspace().project("my-detector")
result = project.upload(
image_path="./photo.jpg",
annotation_path="./photo.xml", # optional; matched VOC / COCO / etc. annotation
split="train", # train | valid | test
batch_name="ingest-2026-05", # optional; groups uploads in the web UI
tag_names=["camera-A", "indoor"], # optional; apply tags
is_prediction=False, # set True for model-generated annotations awaiting review
num_retry_uploads=2, # retries on transient upload failures
)
print(result)Upload an image only
Validate an image before uploading
Attach an annotation to an existing image
Fetch an image's metadata
Delete images
A note on uploads in v1.3.6+
REST and CLI equivalents
Last updated
Was this helpful?