BlogComparisons

Captain vs. Cloudflare AI Search

Edgar BabajanyanCTO & Co-Founder

6 min read

What the platform decides for you

Cloudflare AI Search indexes an R2 bucket, converts what it finds to Markdown, chunks it, embeds it with Workers AI, and answers from a Vectorize index. If your stack already runs on Workers and your content is Markdown and small PDFs, it gets a RAG pipeline running in an afternoon.

Captain indexes the files you have across any cloud, any size, any layout. Optimized for your agent.

Why choose Captain over Cloudflare AI Search?

Captain reads files of any size from your bucket, chunks them by page layout and stores metadata of any shape. AI Search caps files at 4 MB, chunks by token count and allows five metadata fields, each cut at 64 bytes.

Parsing that fits the file
A scanned form and a Markdown file take different paths through parsing.
Layout preserved
Every chunk knows whether it came from a table, a heading or a footer.
Every result knows its place
Page range, region, spreadsheet cell or media timestamp come back with every result, ready to cite.
Metadata of any shape
Nested filters, boosts, and values you can set per chunk after indexing without a re-index.
Reserved capacity
Indexing runs on throughput reserved for you, so a big backfill never waits on a shared daily quota.
Redaction before embedding
PII is masked before anything is embedded. A file that cannot be masked is held back, never stored unmasked.

How the platforms compare

Maximum file size

Captain

Read from your bucket, no upload step. PDF, Office, images, audio and video have no cap of their own; text, JSON and CSV files up to 250 MB each

Cloudflare AI Search

4 MB on every plan

Maximum size, text and data files

Captain

250 MB per file for Markdown, JSON, CSV, YAML and code

Cloudflare AI Search

4 MB on every plan

Chunk size ceiling

Captain

Each chunk ends where the layout does: a table, a heading, a paragraph

Embedding model

Captain

Chosen and managed by Captain, optimized for accuracy and speed

Cloudflare AI Search

Text embeddings only, fixed at creation: a Workers AI model (bge-m3, bge-large, qwen3-embedding, embeddinggemma), OpenAI text-embedding-3, or Google gemini-embedding-001

Changing the embedding model

Captain

Captain re-embeds the collection when the model changes. Your data and your calls stay the same

Cloudflare AI Search

Not possible after creation

LLM for generation

Captain

Captain returns ranked chunks. Your AI system runs the generation

Data sources

Captain

Any number per collection, added or changed at any time

Custom metadata fields

Cloudflare AI Search

5 per instance

Metadata size

Captain

Nested objects with a full operator set

Cloudflare AI Search

10 KiB per vector

Filterable string data

Captain

Full value

Cloudflare AI Search

First 64 UTF-8 bytes

Indexing at scale

Compute source

Captain

Flexible indexing capacity

Cloudflare AI Search

Your Workers AI allocation

When capacity runs out

Captain

Jobs keep running on capacity reserved for you

Cloudflare AI Search

Files error with workers_ai_out_of_capacity_error

How changes are detected

Captain

Webhook events from your bucket land within seconds, with scheduled reconciliation as the backstop

What counts as a change

Captain

Each object's content hash (ETag) against the one Captain last indexed, so only changed files re-index

Cloudflare AI Search

Not documented

Manual sync

Captain

On demand

Cloudflare AI Search

At most once every 30 seconds

Deleted files

Captain

Your policy per sync: mirror, archive, or ignore

Cloudflare AI Search

Removed on the next sync

Sources per collection

Cloudflare AI Search

Built-in uploads plus one R2 bucket or one website

Files per instance

Captain

Terabytes per collection

Recovering a failed run

Cloudflare AI Search

Fix the item, then sync it again

Understanding the document

Parsing

Captain

Each file takes the pipeline it needs: text, page layout, or vision

Cloudflare AI Search

Markdown conversion for every file type

Images

Captain

Indexed natively, with cross-modal reranking

Cloudflare AI Search

Object detection, then a caption is embedded

Audio and video

Captain

Indexed natively, with text and visual embeddings

Cloudflare AI Search

Not supported

Layout roles

Captain

Seven layout roles (body, table, heading, header, footer, footnote, figure), any of them excludable at query time

Cloudflare AI Search

None. Everything becomes Markdown

Position in a document

Captain

Page ranges, chunk index, sheet and cell ranges

Cloudflare AI Search

Filename and folder only

Spatial grounding

Captain

Bounding boxes and region mapping

Cloudflare AI Search

No

Page retrieval

Cloudflare AI Search

No

Chunk relations

Cloudflare AI Search

No

Retrieval

Method

Captain

Hybrid keyword (BM25) and dense vector, fused. The file limit is the same either way

Cloudflare AI Search

Vector and BM25, fused. Hybrid halves your file limit to 500,000

Keyword control

Captain

One parameter, semantic_ratio, from pure keyword to pure semantic

Cloudflare AI Search

Configurable fusion method

Score breakdown

Captain

Vector, BM25, fusion, and rerank scores per result

Boosting

Captain

Metadata boost rules that can outrank the reranker

Cloudflare AI Search

No

Query enhancement

Captain

Metadata boosts and reviewer feedback

Data protection

PII masking

Cloudflare AI Search

No

Masking coverage

Captain

Parsed text, region text, and image pixels

Cloudflare AI Search

None

Regulated-document recognizers

Captain

NMLS IDs, surety bonds, carriers, and bond principals

Cloudflare AI Search

None

When masking fails

Captain

The file is held back, never stored unmasked

Cloudflare AI Search

None

Healthcare and life sciences

Captain

HIPAA-ready. Fair balance for FDA-regulated content through chunk relations: a benefit claim is linked to its risk statement, so retrieval returns both together

Cloudflare AI Search

Not covered in the AI Search docs

Deployment

Captain

Hosted, BYOC, or on-premise

Cloudflare AI Search

Cloudflare's network

Maturity

Captain

Generally available: stable v2 API since January 2026, SOC 2 Type II, published pricing

Where Cloudflare AI Search fits

Cloudflare built a good on-ramp for existing users, but its architectural limitations keep the product from being truly dependable infrastructure. If you are already on Workers, your content is Markdown and small PDFs, and you want retrieval running today without choosing a vector database, it does that well and currently costs nothing beyond Workers AI usage.

The ceiling arrives with the first document that doesn't fit. A 12 MB scanned contract gets rejected. A financial statement comes back as flat Markdown, so nobody can tell which table a number came from. A tenant filter over 64 bytes stops matching. A big backfill stalls the moment the account's Workers AI allocation runs out. Captain reads the contract from the bucket, keeps the table, matches the filter, and runs the backfill on capacity reserved for you. That is the day-one job for most real document sets.

Edgar Babajanyan

CTO & Co-Founder · Captain

Edgar is co-founder and CTO of Captain, building self-tuning file search for AI agents.