Index R2 File
Index a single file from a Cloudflare R2 bucket into a collection. Returns a job_id for tracking progress.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
R2 URI format: r2://bucket-name/path/to/file.pdf
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.
Custom metadata to attach to all chunks from this file. Keys must be strings. Values: str, int, float, bool, or array of strings.