docimprint

← All docs

Collections

Aly Sawft · Founder & Engineer, Sawftware LLC ·

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 ask

Semantic 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/collectionsFree

    Wallet-scoped document corpus.

  • GET /v1/collectionsFree

    List collections for the paying wallet.

  • GET /v1/collections/{id}Free

    Document count and index status.

  • POST /v1/collections/{id}/documents$0.075

    Add bundle_id or ingest source and index chunks.

  • DELETE /v1/collections/{id}/documents/{bundle_id}Free

    Remove from collection and delete vectors.

  • GET /v1/collections/{id}/search$0.03

    Semantic search over indexed chunks.

  • POST /v1/collections/{id}/ask$0.05

    Cross-document QA with field-level citations.

bashExamples
# 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}'
jsonResponse
{
  "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

Related