Index R2 Bucket
Index all files from a Cloudflare R2 bucket into a collection. R2 is S3-compatible — provide your R2 API token’s Access Key ID and Secret Access Key. Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
Cloudflare account ID (found in your R2 dashboard URL)
Document processing type. ‘advanced’ uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. ‘basic’ provides reliable OCR optimized for general document indexing and high-volume processing.
R2 jurisdiction. ‘default’ for global, ‘eu’ for EU-only storage, ‘fedramp’ for FedRAMP-compliant storage.
Maximum number of files to index (optional)
Skip files that are already indexed in the collection. When true, only new files will be indexed. Set to false to re-index all files.
Custom metadata to attach to all indexed chunks. Keys must be strings. Values: str, int, float, bool, or array of strings.