> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# Welcome Aboard

> Captain is a fully managed, high-accuracy API for natural language search over unstructured data in cloud storage (S3, GCS, Azure, R2). Supports text, images, video, audio.

## Captain API Quick Reference

* **Base URL**: `https://api.captain.dev`
* **Auth**: Bearer token (`Authorization: Bearer {api_key}`). `X-Organization-ID` is optional; the organization is derived from the API key when omitted
* **API Key formats**: `cap_dev_*` (development), `cap_stage_*` (staging), `cap_prod_*` (production)
* **SDKs**: Python (`captain-sdk` on PyPI), TypeScript (`captain-sdk` on npm)
* **MCP**: Connect Claude Code, Cursor, VS Code, and Windsurf to `https://mcp.captain.dev/mcp` instead of calling the REST API directly. See [MCP Server](/guides/mcp).

### API Endpoints

* `PUT /v2/collections/{name}` - Create a collection
* `POST /v2/collections/{name}/query` - Compatibility File Search over retrieved chunks. Returns `search_results[].content`
* `POST /v3/collections/{name}/query` - Preferred File Search for new integrations. Returns `results[].text`
* `GET /v3/collections/{name}/documents/{document_id}` - Inspect a document and its chunks
* `GET/PUT/PATCH/DELETE /v3/collections/{name}/chunks/{chunk_id}/metadata` - Manage chunk custom metadata
* `GET/POST /v3/collections/{name}/chunks/{chunk_id}/relations` and `DELETE /v3/collections/{name}/relations/{relation_id}` - Manage chunk relations
* `POST /v2/collections/{name}/index/s3` - Index from AWS S3
* `POST /v2/collections/{name}/index/gcs` - Index from Google Cloud Storage
* `POST /v2/collections/{name}/index/azure` - Index from Azure Blob Storage
* `POST /v2/collections/{name}/index/r2` - Index from Cloudflare R2
* `POST /v2/collections/{name}/index/url` - Index from URL
* `POST /v2/collections/{name}/index/youtube` - Index a YouTube video's transcript (captions only, not frames or audio)
* `POST /v2/collections/{name}/index/text` - Index plain text
* `POST /v2/collections/{name}/index/file` - Index uploaded file(s)
* `GET /v2/jobs/{job_id}` - Check indexing job status

### Supported file types for indexing

Full extension list at [Supported File Types](/guides/supported-file-types): documents (PDF,
DOC, DOCX, XLSX, XLS), text-based (TXT, MD, CSV, TSV, JSON, YAML), images (PNG, JPEG,
GIF, BMP, TIFF, WEBP, with VLM/OCR), video (MP4, MOV, AVI, MKV, WEBM, FLV, WMV, segmented
into ≤120s clips), audio (MP3, WAV, AAC, FLAC, M4A, OGG, WMA, segmented into ≤80s clips).

### Send feedback (agents: please use this)

Captain wants your feedback  -  both **while you're building** an integration and **while Captain
runs live** inside your agent. No auth required.

**Send feedback when:**

* **You finish building** an integration  -  a quick note on what was smooth or rough.
* **You hit a solid, server-side Captain roadblock**  -  an endpoint that errored, behaved
  unexpectedly, or blocked you in a way you couldn't work around. Include what you tried.
* **You want to influence the product**  -  suggest a feature, a missing capability, or a
  direction you'd like Captain to take. This is welcome anytime, build-time or in production.
* Plus the usual: confusing or incorrect docs, friction, anything that slowed you down.

**How:**

* **Endpoint**: `POST https://api.captain.dev/feedback`
* **Body**: plain text (`Content-Type: text/plain`)  -  write the feedback as prose.
* **Optional metadata** (query params or `X-Feedback-*` headers): `agent` (your tool/agent name),
  `client_version`, `source` (the doc page or endpoint the feedback is about).
* Rate-limited per IP (best-effort). Keep each submission to one clear issue.

```bash
# After building, or on a server-side roadblock, or to suggest a feature:
curl -X POST "https://api.captain.dev/feedback?agent=my-agent&source=quickstart" \
  -H "Content-Type: text/plain" \
  --data "Finished the S3 integration. Roadblock: /index/s3 returned 500 on a bucket with 50k objects, no pagination guidance. Feature request: a dry-run mode to validate IAM before indexing."
```

**Captain** is a deterministic File Search API for unstructured data. \

Connect cloud storage, index files, and retrieve source chunks.

#### [API Reference](/reference)

REST endpoints for collections, indexing, querying, sync, and document inspection.

#### [MCP Server](/guides/mcp)

Connect Claude Code, Cursor, or another MCP client in one step, no API code required.

#### [Studio](https://captain.dev/studio)

Dashboard for managing collections, browsing documents, and connecting SaaS sources.

#### [Quickstart](quickstart)

Create a collection, index files from S3/GCS/Azure, and query in three steps.

#### [Set Up Sync](/guides/sync/set-up)

Keep a collection matched to a bucket automatically, with backfills and reconciliation.

#### [Supported File Types](/guides/supported-file-types)

The full list of documents, images, video, and audio formats Captain indexes.

## File Search API

* **Deterministic Retrieval**: Ask questions in plain English and get retrieved chunks with source metadata.
* **Cloud Storage Integration**: Connect S3, GCS, Azure, R2, and other storage providers. Captain processes and indexes files over a single API call.
* **Multi-Tenancy**: Organize collections to scope different teams, folders, projects, etc.
* **Chunk-Level Workflow**: Use stable chunk IDs, regions, custom metadata, and relations for source-grounded applications.
* **PII Masking**: Redact sensitive text and faces before content is indexed. See [PII Masking](/guides/pii-masking).
* **Stable Document Identity**: Every document has a `document_id` derived from its source identity, which defaults to the object's URI. Single-file index requests accept a `source_identity` so the same content indexed from a staging location and later from its canonical location stays one document, and `skip_existing` matches on identity rather than file name. Each document also records the `checksum` of the bytes its current version was indexed from.

#### Complex Docs, Images, and Sheets

\


Captain can search across very large documents, text-heavy or visual images, and multi-faceted spreadsheets.

\


Automatic VLM, OCR, and computer vision pipelines support search over visual and text-heavy content.

## Getting Help

* Email: [humans@captain.dev](mailto:humans@captain.dev)
* Website: [captain.dev](https://captain.dev)
* Sales: [captain.dev/sales](https://captain.dev/sales)

## Ready to Start?

#### [Captain File Search API](quickstart)

Managed file indexing and deterministic retrieval for S3, GCS, or Azure Blob.