Turn Unstructured Documents into Verifiable AI Insights

Clarisearch™ is a proprietary pipeline that converts very large case datasets into a structured, evidence-linked JSON at a fixed, predictable cost—so any LLM can generate professional reports with verifiable citations back to the original sources. Our patent-pending technology eliminates context window limits and AI hallucinations for good.

A Simple, Asynchronous Workflow

The Clarisearch™ API is designed for secure, large-scale processing using our proprietary fixed-cost pipeline. Submit your documents and get notified when your structured Evidence Packet is ready. Click each step below to see the technical details.

1

Initiate Job

Securely submit your research query and a list of pre-signed URLs for your documents.

2

We Process

Our system downloads, analyzes, and synthesizes the data, then permanently deletes your source files.

3

Receive Results

Get notified via webhook or polling, and download your completed Evidence Packet.

The Evidence Packet Explorer

The result of every job is a rich, structured JSON Evidence Packet. This becomes your single source of truth, ready for any LLM. Explore the data from a sample packet below.

Packet Analysis

Evidence Strength Distribution

A qualitative assessment of the evidence's probative value.

Filter by Thematic Tags

Click tags to filter the evidence list.

Evidence Items (0)

Build Powerful Applications

The Clarisearch™ Evidence Packet is a versatile asset. Here's how our clients are using the API to build innovative tools and products powered by our proprietary technology.

Automated Operational Summaries for Firm Management

A large firm needs high-level overviews of active cases. Their internal dashboard uses the API to analyze new documents weekly, generating custom summaries from the Evidence Packet that align with the firm's priorities.

Business Value:

  • Efficiency: Standardized, digestible summaries delivered automatically.
  • Custom Insights: Reports are tailored to the firm's unique methodology.
  • Strategic Oversight: Better decisions based on consistent, evidence-backed reporting.

Verifiable AI in Action

The key to trustworthy AI is verifiable output. The Clarisearch™ system makes this possible through our proprietary evidence-linking technology. Click any [Source:...] tag below to see the underlying evidence.

Case Status Memo

Case Summary

This case involves multiple safety violations by TEST PIPE, INC. at an inspection site located at 1492 PENGUIN WAY, ARMADILLO, LONE STAR [Source: evidence-FlSR067LOJJEaoezVh63-6]. An OSHA citation details serious issues, including failure to provide adequate protection from hazards and a lack of proper employee training [Source: evidence-FlSR067LOJJEaoezVh63-6]. These actions constitute a significant breach of the company's duty of care.

Key Factual Findings

  • The incident in question occurred on or about Spring 2021 [Source: evidence-FlSR067LOJJEaoezVh63-0].
  • Dr. Flory was deposed and provided testimony regarding the events [Source: evidence-FlSR067LOJJEaoezVh63-1].
  • The patient's initial complaint was recorded as a cough [Source: evidence-FlSR067LOJJEaoezVh63-2].
  • A key issue is whether the standard of care was met, which is a central point of contention [Source: evidence-FlSR067LOJJEaoezVh63-3].

Core Benefits and Uncompromising Security

The Clarisearch™ API provides the power of large-scale AI analysis through our proprietary, patent-pending pipeline with predictable costs and an uncompromising commitment to data security.

Predictable Cost

Avoid volatile AI bills. Our patent-pending pipeline technology delivers fixed, predictable costs for deep document analysis.

No Context Windows

Our proprietary pre-processing creates an Evidence Packet that eliminates the context window limitations of modern LLMs.

Zero Hallucinations

Every data point in the Evidence Packet is linked to its source with a unique evidence_id, guaranteeing factually grounded output.

Data Custody

You own your data. We use temporary, pre-signed URLs and never store your original files.

Important: Use of the Clarisearch™ API is subject to our Master Service Agreement, which includes confidentiality obligations and prohibitions on reverse engineering, benchmarking, or attempting to derive our proprietary methods. All feedback and suggestions become the property of DepoGenius.

Developer Documentation

Complete technical documentation for integrating with the Clarisearch™ API. Follow these step-by-step instructions to start processing documents and generating Evidence Packets programmatically.

Getting Started

1. Obtain Your API Key

To use the Clarisearch™ API, you'll need an API key. Contact our team to get your unique API key, which will have the format csk_xxxxxxxxx.

Security Note: Store your API key securely and never expose it in client-side code. All API requests must be made from your server environment.

2. Secure Your Files (Critical)

Clarisearch™ uses a zero-trust security model. Your files remain in your own secure storage, and you provide temporary pre-signed URLs for access. We never request permanent credentials or ask you to make files public.

✅ Secure Approach: Pre-Signed URLs
  • • Files remain private in your storage system
  • • URLs are time-limited (4+ hours recommended)
  • • Each URL grants access to exactly one file
  • • Complete audit trail and control
❌ Never Do This:
  • • Don't make files publicly accessible
  • • Don't share permanent storage credentials
  • • Don't use URLs that expire too quickly

Quick Example (Google Cloud Storage):

// Generate secure, time-limited URL const [signedUrl] = await storage .bucket('your-private-bucket') .file('sensitive-document.pdf') .getSignedUrl({ version: 'v4', action: 'read', expires: Date.now() + 6 * 60 * 60 * 1000 // 6 hours }); // Use in API call const files = [{ fileName: 'sensitive-document.pdf', downloadUrl: signedUrl // ✅ Secure, time-limited }];

See the complete security guide with examples for all major cloud providers below.

3. Base URL

All API requests should be made to:

https://us-central1-depogenius.cloudfunctions.net/clarisearch-

Replace the endpoint suffix (e.g., submitJob, getJobStatus) based on the specific operation you're performing.

Authentication

All API requests require authentication using your API key in the Authorization header:

Authorization: Bearer csk_your_api_key_here
✅ Correct Format
curl -H "Authorization: Bearer csk_abc123def456" \ https://us-central1-depogenius.cloudfunctions.net/clarisearch-submitJob
❌ Incorrect Formats
# Missing "Bearer" Authorization: csk_abc123def456 # Wrong prefix Authorization: Bearer api_abc123def456

API Endpoints

POST

Submit Research Job

Initiates a new document analysis job. Provide your research query and a list of pre-signed URLs to your documents.

Endpoint:
POST https://us-central1-depogenius.cloudfunctions.net/clarisearch-submitJob
Request Body:
{ "query": "Analyze these documents for evidence of medical malpractice and timeline of care", "files": [ { "fileName": "Patient Medical Records.pdf", "downloadUrl": "https://your-storage.com/files/medical-records.pdf?signature=..." }, { "fileName": "Expert Report - Dr. Smith.pdf", "downloadUrl": "https://your-storage.com/files/expert-report.pdf?signature=..." } ], "priority": "high", "options": { "betaMode": false, "processing": { "maxConcurrentFiles": 5, "timeoutMinutes": 120 } }, "metadata": { "caseId": "case-2024-001", "requestedBy": "attorney@lawfirm.com" } }
Required Fields:
  • query: Your research question or analysis request
  • files: Array of file objects with fileName and downloadUrl
  • files[].downloadUrl: Pre-signed GET URL that expires no sooner than 4 hours
Success Response (202 Accepted):
{ "jobId": "clarisearch-job-abc123", "status": "queued", "statusUrl": "https://us-central1-depogenius.cloudfunctions.net/clarisearch-getJobStatus?jobId=clarisearch-job-abc123", "queuePosition": 2 }
Error Responses:
401 Unauthorized:
{"error": "Invalid or missing API key"}
400 Bad Request:
{"error": "Missing required field: query"}
GET

Get Job Status

Retrieve the current status and progress of a submitted job. Supports efficient polling with ETag caching to minimize unnecessary requests.

Endpoint:
GET https://us-central1-depogenius.cloudfunctions.net/clarisearch-getJobStatus?jobId={jobId}
Headers (Recommended for Efficiency):
If-None-Match: "previous-etag-value"

Include the ETag from your previous response to receive a 304 Not Modified when the job status hasn't changed, saving bandwidth and processing time.

Success Response (200 OK):
{ "jobId": "clarisearch-job-abc123", "status": "analyzing", "query": "Analyze these documents for evidence of medical malpractice...", "fileCount": 5, "progress": { "totalFiles": 5, "completedFiles": 2, "failedFiles": 0, "processingFiles": 1, "queuedFiles": 2, "currentlyProcessingFiles": [ { "fileName": "Expert Report - Dr. Smith.pdf", "startedAt": "2024-01-15T10:30:00Z" } ], "estimatedCompletionAt": "2024-01-15T11:15:00Z" }, "createdAt": "2024-01-15T10:00:00Z", "startedAt": "2024-01-15T10:05:00Z", "completedAt": null, "updatedAt": "2024-01-15T10:30:00Z", "resultsUrl": null, "resultsSummary": null, "nextRecommendedPollInSeconds": 15 }
Completed Job Response:
{ "jobId": "clarisearch-job-abc123", "status": "completed", "query": "Analyze these documents for evidence of medical malpractice...", "fileCount": 5, "progress": { "totalFiles": 5, "completedFiles": 4, "failedFiles": 1, "processingFiles": 0, "queuedFiles": 0, "currentlyProcessingFiles": [] }, "createdAt": "2024-01-15T10:00:00Z", "startedAt": "2024-01-15T10:05:00Z", "completedAt": "2024-01-15T11:00:00Z", "updatedAt": "2024-01-15T11:00:00Z", "resultsUrl": "https://storage.googleapis.com/clarisearch-results/clarisearch-job-abc123/evidence-packet.json?signature=...", "resultsSummary": { "totalEvidence": 156, "processingTimeSeconds": 1800, "tokensUsed": 45000 } }
Job Status Values:
queued:

Job accepted, waiting to start

preprocessing:

Files being downloaded and prepared

analyzing:

AI analysis in progress

completed:

Evidence Packet ready for download

Polling Best Practices

Efficient Status Monitoring

1. Use ETags for Efficient Polling

Always include the If-None-Match header with the ETag from your previous response. This allows the server to return a 304 Not Modified when nothing has changed.

// Example: Efficient polling with ETags let etag = null; async function checkJobStatus(jobId) { const headers = { 'Authorization': 'Bearer ' + apiKey }; if (etag) { headers['If-None-Match'] = etag; } const response = await fetch(statusUrl, { headers }); if (response.status === 304) { // Job hasn't changed, use cached data return previousJobData; } if (response.status === 200) { etag = response.headers.get('ETag'); return await response.json(); } }
2. Follow Adaptive Polling Intervals

Use the nextRecommendedPollInSeconds value from the API response to optimize your polling frequency and avoid unnecessary requests.

Active Processing:

3-30 seconds

Queued:

60-600 seconds

Terminal States:

Stop polling

3. Handle Rate Limits Gracefully

If you receive a 429 Too Many Requests response, check the Retry-After header and wait the specified number of seconds before retrying.

Error Handling

Common Error Scenarios

Authentication Errors
// 401 Unauthorized { "error": "Invalid or missing API key" } // Common causes: // - Missing Authorization header // - Invalid API key format // - Expired or revoked API key
Validation Errors
// 400 Bad Request { "error": "Bad Request: Missing 'query' or 'files'." } // Common causes: // - Missing required fields // - Invalid file URLs // - Malformed request body
Handling File-Level Failures

Individual file failures don't cause the entire job to fail. Check the progress.failedFiles count and errors array in the job status response for details.

// Job with partial failures { "status": "completed", "progress": { "totalFiles": 5, "completedFiles": 4, "failedFiles": 1 }, "errors": [ { "fileId": "file-abc123", "fileName": "corrupted-document.pdf", "error": "Unable to parse PDF: File appears to be corrupted", "timestamp": "2024-01-15T10:45:00Z" } ] }

Secure File Access Guide

Zero-Trust Security Model

Clarisearch™ implements a zero-trust security model. We never request permanent access to your storage systems or ask you to make files publicly accessible. Your sensitive documents remain in your control at all times.

✅ How It Works
  • 1. You generate temporary, pre-signed URLs
  • 2. URLs grant access to specific files only
  • 3. URLs automatically expire (4+ hours recommended)
  • 4. Clarisearch downloads and processes files
  • 5. Original files remain in your private storage
  • 6. You maintain complete audit trail
🔒 Security Benefits
  • • No permanent credential sharing
  • • Time-limited access automatically expires
  • • File-specific permissions (no bucket access)
  • • SOC 2, HIPAA, GDPR compliant
  • • Complete data custody retention
  • • Zero data retention by Clarisearch

Implementation by Cloud Provider

Google Cloud Storage (Recommended)
const { Storage } = require('@google-cloud/storage'); const storage = new Storage({ projectId: 'your-project-id', keyFilename: 'service-account-key.json' }); async function generateSecureUrls(files) { const secureFiles = []; for (const file of files) { const [signedUrl] = await storage .bucket('your-private-bucket') .file(file.path) .getSignedUrl({ version: 'v4', action: 'read', expires: Date.now() + 6 * 60 * 60 * 1000, // 6 hours }); secureFiles.push({ fileName: file.name, downloadUrl: signedUrl }); } return secureFiles; }

Required IAM Permission:

Grant your service account: roles/storage.objectViewer

Amazon S3
const AWS = require('aws-sdk'); const s3 = new AWS.S3({ accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, region: 'your-region' }); async function generateSecureUrls(files) { const secureFiles = []; for (const file of files) { const signedUrl = s3.getSignedUrl('getObject', { Bucket: 'your-private-bucket', Key: file.key, Expires: 6 * 60 * 60, // 6 hours (in seconds) }); secureFiles.push({ fileName: file.name, downloadUrl: signedUrl }); } return secureFiles; }

Required S3 Permission:

IAM policy with s3:GetObject on specific paths

Microsoft Azure Blob Storage
const { BlobServiceClient, StorageSharedKeyCredential, generateBlobSASQueryParameters, BlobSASPermissions } = require('@azure/storage-blob'); const accountName = 'your-storage-account'; const credential = new StorageSharedKeyCredential( accountName, process.env.AZURE_STORAGE_ACCOUNT_KEY ); const blobServiceClient = new BlobServiceClient( `https://${accountName}.blob.core.windows.net`, credential ); async function generateSecureUrls(files) { const secureFiles = []; for (const file of files) { const containerClient = blobServiceClient .getContainerClient('your-private-container'); const blobClient = containerClient.getBlobClient(file.path); const sasToken = generateBlobSASQueryParameters({ containerName: 'your-private-container', blobName: file.path, permissions: BlobSASPermissions.parse('r'), // Read only expiresOn: new Date(Date.now() + 6 * 60 * 60 * 1000), // 6 hours }, credential).toString(); secureFiles.push({ fileName: file.name, downloadUrl: `${blobClient.url}?${sasToken}` }); } return secureFiles; }

Security Best Practices

✅ Do This
  • Use 4+ hour expiration: Ensures URLs don't expire during processing
  • Validate file sizes: Check against 500MB per file limit
  • Use dedicated directories: Create "clarisearch/" subdirectories for organization
  • Implement least privilege: Grant only necessary read permissions
❌ Avoid This
  • Public file URLs: Never make sensitive files publicly accessible
  • Short expiration times: URLs expiring in <30 minutes may fail
  • Permanent credentials: Never share storage access keys
  • Overly broad permissions: Avoid admin/full bucket access
⚠️ Common Troubleshooting

"Status 403" Error: Check URL expiration and service account permissions

"Status 404" Error: Verify file exists and path is correct

Processing Failures: Ensure URLs have 4+ hours before expiration

Complete Integration Example

End-to-End JavaScript Example

async function processDocuments(apiKey, query, files) { const baseUrl = 'https://us-central1-depogenius.cloudfunctions.net/clarisearch-'; // Step 1: Submit the job const submitResponse = await fetch(baseUrl + 'submitJob', { method: 'POST', headers: { 'Authorization': 'Bearer ' + apiKey, 'Content-Type': 'application/json' }, body: JSON.stringify({ query: query, files: files, metadata: { requestId: Date.now().toString() } }) }); if (!submitResponse.ok) { throw new Error(`Failed to submit job: ${submitResponse.statusText}`); } const { jobId, statusUrl } = await submitResponse.json(); console.log(`Job submitted successfully: ${jobId}`); // Step 2: Poll for completion let etag = null; let job = null; while (true) { const headers = { 'Authorization': 'Bearer ' + apiKey }; if (etag) headers['If-None-Match'] = etag; const statusResponse = await fetch(statusUrl, { headers }); if (statusResponse.status === 304) { // No changes, wait and retry await sleep(job?.nextRecommendedPollInSeconds || 30); continue; } if (!statusResponse.ok) { throw new Error(`Failed to get job status: ${statusResponse.statusText}`); } etag = statusResponse.headers.get('ETag'); job = await statusResponse.json(); console.log(`Job status: ${job.status} (${job.progress.completedFiles}/${job.progress.totalFiles} files)`); // Check if job is complete if (job.status === 'completed') { console.log(`Job completed! Evidence Packet: ${job.resultsUrl}`); return job; } else if (job.status === 'failed') { throw new Error(`Job failed: ${job.error?.message}`); } // Wait before next poll await sleep(job.nextRecommendedPollInSeconds || 30); } } function sleep(seconds) { return new Promise(resolve => setTimeout(resolve, seconds * 1000)); } // Usage example const files = [ { fileName: "contract.pdf", downloadUrl: "https://your-storage.com/contract.pdf?signature=..." }, { fileName: "correspondence.pdf", downloadUrl: "https://your-storage.com/correspondence.pdf?signature=..." } ]; processDocuments( 'csk_your_api_key_here', 'Analyze these documents for evidence of breach of contract', files ).then(job => { console.log('Processing complete!', job.resultsSummary); }).catch(error => { console.error('Error processing documents:', error); });