CLI Usage

Use the Roboflow CLI to create and manage Batch Processing jobs.

By installing inference-cli you gain access to the inference rf-cloud command, which allows you to interact with Batch Processing and Data Staging — the core components of Roboflow Batch Processing.

Setup

pip install inference-cli
export ROBOFLOW_API_KEY="YOUR-API-KEY-GOES-HERE"

If you need help finding your API key, see our authentication guidearrow-up-right.

Ingest Data

Images

inference rf-cloud data-staging create-batch-of-images \
  --images-dir <your-images-dir-path> \
  --batch-id <your-batch-id>

Videos

inference rf-cloud data-staging create-batch-of-videos \
  --videos-dir <your-videos-dir-path> \
  --batch-id <your-batch-id>
circle-info

Batch ID format: Must be lowercase, at most 64 characters, with only letters, digits, hyphens (-), and underscores (_).

Cloud Storage

If your data is already in cloud storage (S3, Google Cloud Storage, or Azure), you can process it directly without downloading files locally. Install cloud storage support first:

For images:

For videos:

The --bucket-path parameter supports:

  • S3: s3://bucket-name/path/

  • Google Cloud Storage: gs://bucket-name/path/

  • Azure Blob Storage: az://container-name/path/

You can include glob patterns to filter files:

  • s3://my-bucket/training-data/**/*.jpg — All JPG files recursively

  • gs://my-bucket/videos/2024-*/*.mp4 — MP4 files in 2024-* folders

  • az://container/images/*.png — PNG files in images folder

circle-info

Your cloud storage credentials are used only locally by the CLI to generate presigned URLs. They are never uploaded to Roboflow servers.

circle-exclamation

For large datasets, the system automatically splits images into chunks of 20,000 files each. Videos work best in batches under 1,000.

For detailed cloud storage authentication setup, see the Cloud Storage Authentication guide.

Inspect Staged Data

Start a Job

Process Images

Process Videos

circle-info

Finding your Workflow ID: Open the Workflow Editor in the Roboflow App, click "Deploy", and find the identifier in the code snippet.

circle-info

By default, processing runs on CPU. Use --machine-type gpu for Workflows with multiple or large models.

Monitor Job Progress

The start command outputs a Job ID. Use it to check status:

Export Results

The job details will include the output batch ID. Use it to export results:

Discover All Options

Last updated

Was this helpful?