Skip to main content

The Problem

E-discovery teams review thousands of documents manually to identify privileged content. Miss one privileged document in production, and you’ve waived protection. Over-designate, and you face sanctions for obstruction.

The Solution

An AI-powered privilege detection API that analyzes documents for attorney-client privilege, work product doctrine, and other protected communications. Get confidence scores, category breakdowns, and actionable recommendations for each document.

Quick start

import Casedev from 'casedev';

const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY });

// Analyze document content for privilege
const result = await client.privilege.detect({
  content: 'Attorney memo: Confidential legal advice regarding...',
  categories: ['attorney_client', 'work_product'],
  include_rationale: true,
});

if (result.privileged) {
  console.log(`Privileged (${result.confidence * 100}% confidence)`);
  console.log(`Recommendation: ${result.recommendation}`);
  
  // Review detected categories
  for (const cat of result.categories) {
    if (cat.detected) {
      console.log(`  ${cat.type}: ${cat.rationale}`);
    }
  }
} else {
  console.log('No privilege detected - safe to produce');
}

// Or analyze a document already in your Vault
const vaultResult = await client.privilege.detect({
  document_id: 'doc_abc123',
  vault_id: 'vault_xyz789',
});

Endpoints

detect

Analyze document content for privilege indicators across multiple categories

Privilege categories

CategoryDescription
attorney_clientCommunications between attorney and client for legal advice
work_productMaterials prepared in anticipation of litigation
common_interestShared communications under joint defense agreements
litigation_holdDocuments subject to preservation obligations

Recommendations

The API returns one of four recommendations based on analysis:
RecommendationWhen returnedSuggested action
withholdHigh confidence privilege detectedDo not produce; log for privilege log
redactPartial privilege or mixed contentRedact privileged portions before production
produceNo privilege indicators foundSafe for production
reviewAmbiguous or borderline casesRequires attorney review

Vault integration

When you provide a document_id and vault_id, the API:
  1. Retrieves the document content from your Vault
  2. Analyzes it for privilege indicators
  3. Stores the analysis results in the document’s privilege_analysis metadata field
This enables bulk privilege review workflows where results are persisted alongside documents.
// Analyze and store results in Vault metadata
const result = await client.privilege.detect({
  document_id: 'doc_abc123',
  vault_id: 'vault_xyz789',
});

// Results are now stored in the document metadata
// Retrieve later with vault.get()
const doc = await client.vault.get({ 
  vault_id: 'vault_xyz789',
  object_id: 'doc_abc123' 
});
console.log(doc.metadata.privilege_analysis);

Permissions

Input TypeRequired Permissions
Raw text (content)chat
Vault document (document_id)chat + vault

Limits

  • Maximum document size: 200,000 characters
  • For larger documents, split into logical sections and analyze separately

Supported jurisdictions

Currently supports US-Federal privilege standards. Additional jurisdictions coming soon.

Vault

Store documents and run bulk privilege detection workflows

Legal Research

Verify citations in privileged documents before logging

OCR

Extract text from scanned documents before privilege analysis