Index S3 Manifest
Path parameters
Headers
Request
S3 URI of the manifest, inside bucket_name (s3://bucket/path/manifest.jsonl). UTF-8 JSON Lines, uncompressed, one object per line: {“uri”: …} plus optional source_identity, custom_metadata, checksum, version_id, size and etag. Up to 1,000,000 lines, 500 MB total and 10 KB per line.
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.
Cross-account role-assumption auth. When provided, Captain calls sts:AssumeRole on the supplied role_arn (with the supplied external_id) instead of using static IAM-user keys. Mutually exclusive with aws_access_key_id/aws_secret_access_key.
AWS access key ID with read access to the bucket. Use this for long-lived IAM-user credentials. Omit when using the role-based ‘auth’ block.
AWS secret access key. Use this for long-lived IAM-user credentials. Omit when using the role-based ‘auth’ block.
Custom metadata attached to every indexed chunk. A line’s own custom_metadata is merged over it for that file. Keys are strings; values: str, int, float, bool, or List[str].
When true, mask detected PII (emails, names, SSNs, etc.) in parsed text before embedding and storing.
When true, files that already exist in the collection will be deleted and re-indexed with the latest changes. Requires skip_existing=false. Setting both to true returns a 400 error.
Relative path to a JS parsing script for JSON files (e.g. ‘research/paper-parser’). When provided, .json files are processed through a sandboxed V8 isolate. Without this, .json files are indexed as raw text.
Masking engine for this job. captain-jev (default): TypeSafe’s Jev classifier reads every token of the text in context, decides which values are personal data and which kind each one is; supports pii_fields and pii_instructions. captain-presidio (legacy): pattern recognizers and a named-entity model, runs entirely inside Captain, built-in categories only; rejects pii_fields and pii_instructions with 422. Requires mask_pii to be true.
What happens to a file when the Jev engine cannot be reached. true (default): the file is masked by captain-presidio instead, without custom fields, and the job reports engine captain-presidio with fallback true. false: the file fails to index rather than being stored with less than the requested masking. Only meaningful with pii_engine captain-jev.
Additional PII categories to mask for this job, on top of the built-in set. Requires mask_pii to be true. Up to 20 fields. Each masked value is replaced with the field’s tag in angle brackets and appears in the masking report under the field’s name.
Plain-language guidance that steers what counts as personal data for this job, for the built-in categories and any pii_fields. For example: ‘Names of hospital staff may stay; patient names, record numbers and bed assignments must be masked.’ Requires mask_pii to be true. Up to 1,000 characters.
When true, files already indexed in the collection are skipped and will not be re-indexed with incoming changes. When false, all incoming files are indexed regardless of whether they already exist.
AWS Transcribe language code for the spoken audio (e.g. ‘es-US’, ‘pt-BR’). Omit to auto-detect per file. Video and audio files only. Supported codes: https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html
Response
The custom_metadata Captain accepted for this job, echoed back as validated. Null when none was supplied.