On this pageCollections
Collections
DocImprint ·
What are DocImprint collections?
Collections index multiple evidence bundles into a matter corpus. Create a collection, add bundle_ids, run semantic search, and ask cross-document questions with Merkle-proven citations per source chunk.
How does cross-document Q&A work?
POST /v1/collections/{id}/ask returns answers citing bundle_id and chunk_id per passage. Each citation is independently verifiable via verify-citation on the source bundle.
When should I use collections vs single bundles?
Use single bundles for one-document workflows (contracts, invoices). Use collections when agents need semantic search and Q&A across dozens of related documents — legal matters, fiscal years, research corpora.
Collections
$0.03$0.05 askSemantic search and cross-document QA over indexed evidence bundles. Index evidence bundles into a wallet-scoped corpus, then search and ask across documents with field-level citations.
- POST
/v1/collectionsFreeCreate a named corpus scoped to your wallet/API key. Add bundles later for search and cross-doc ask.
- GET
/v1/collectionsFreeList collections you own with ids and basic metadata.
- GET
/v1/collections/{id}FreeDocument count, index status, and collection settings for one id.
- POST
/v1/collections/{id}/documents$0.075Attach an existing bundle_id (or ingest a new source) and index chunks into Vectorize for search/ask.
- DELETE
/v1/collections/{id}/documents/{bundle_id}FreeRemove a bundle from the collection and delete its vectors. Does not delete the underlying evidence bundle.
- POST
/v1/collections/{id}/documents/{bundle_id}/reindexFreeRebuild Vectorize chunks for a bundle already in the collection after content or embedding changes.
- GET
/v1/collections/{id}/search$0.03Semantic search over indexed chunks. Returns ranked hits with chunk_id and score for citation follow-up.
- POST
/v1/collections/{id}/ask$0.05Cross-document Q&A with field-level citations (bundle_id + chunk_id). Verify quotes via verify-citation on the source bundle.
# Create a collection
curl -X POST https://api.docimprint.com/v1/collections \
-H "Content-Type: application/json" \
-H "X-Wallet-Address: 0x..." \
-d '{"name": "Contract corpus"}'
# Add an existing bundle and index
curl -X POST https://api.docimprint.com/v1/collections/col_abc/documents \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{"bundle_id": "ev_xyz"}'
# Semantic search
curl "https://api.docimprint.com/v1/collections/col_abc/search?q=indemnification&limit=10" \
-H "X-Payment: <token>"
# Cross-document QA
curl -X POST https://api.docimprint.com/v1/collections/col_abc/ask \
-H "Content-Type: application/json" \
-H "X-Payment: <token>" \
-d '{"question": "Which documents mention force majeure?", "max_chunks": 8}'{
"answer": {
"value": "...",
"confidence": "high",
"citations": [{ "quote": "...", "paragraphs": [3], "confidence": "high" }]
},
"sources": [{ "bundle_id": "ev_xyz", "chunks_used": ["c_3", "c_7"] }],
"retrieval": [{ "chunk_id": "c_3", "score": 0.89, "text_preview": "..." }]
}Index bundles from extract first — see Extract guide and Evidence bundle