用途:在 Roboflow 自动扩缩容算力上对大批量图片或视频运行 Roboflow Workflow。所有作业处理一个临时 Data Staging 批次,两条输入路径区别在于由谁填充该批次。
主要能力:1) 资产库作业——文件已在 Roboflow,调用 batch_processing_asset_library_job_create,只传一个选择(image_ids、query 或 all_images=true),平台负责访问校验、选取、暂存、校验 Workflow 兼容性、计费并注册持久作业;用 batch_processing_asset_library_task_get 轮询 taskId,再用 batch_processing_job_get 监控 jobId。2) 暂存作业——文件在 Roboflow 之外(本地磁盘、云桶、引用文件),需自行用 inference-cli 暂存,数据约 7 天后过期,不会导入工作区。
使用方式:安装 pip install inference-cli;云桶来源用 pip install 'inference-cli[cloud-storage]'。暂存命令如 inference rf-cloud data-staging create-batch-of-images --batch-id my-batch --images-dir ./images(视频用 create-batch-of-videos)。启动作业:inference rf-cloud batch-processing process-images-with-workflow --batch-id my-batch --workflow-id my-workflow --machine-type gpu,视频对应 process-videos-with-workflow。监控用 show-job-details / fetch-logs / abort-job / restart-job,结果下载用 inference rf-cloud data-staging export-batch --batch-id my-job-export --target-dir ./results。MCP 等价工具包括 batch_processing_run、batch_processing_staged_job_start、batch_processing_job_get 等。
适用场景:已有 Workflow,需对大批量图片/视频做推理、需要 CPU/GPU 与 workers-per-machine 调优、或将云端/本地文件批量跑通。
限制:工作区需启用 batch-processing 功能,调用失败返回 402;作业消耗额度,余额需为正;Workflow 必须已存在,按 workflow_id 引用,无内联定义。暂存与结果导出只能在可访问文件的机器上运行。暂存输入与结果约 7 天过期;单次请求图片引用上限 20000(自动分块),视频引用上限 5000(不分块),单批建议约 1000 个视频。本地视频暂存不支持 --notifications-url;32 个及以下的小型本地图片批次会忽略该参数。其他细节以官方资料为准。