Skip to main content

Anthropic (Claude)

Anthropic's Claude models are the recommended primary provider for Contract Lucidity. Claude excels at structured document analysis, legal reasoning, and following complex instructions with high fidelity -- all critical for contract intelligence.

Getting an API Key

  1. Go to console.anthropic.com
  2. Create an account or sign in
  3. Navigate to Settings > API Keys
  4. Click Create Key
  5. Give the key a descriptive name (e.g., contract-lucidity-prod)
  6. Copy the key immediately -- it will not be shown again
Security

Store your API key securely. CL encrypts API keys at rest in the database (api_key_encrypted column), but the key is transmitted in plaintext during initial configuration. Always use HTTPS in production.

Claude Sonnet 4.6 -- Best for Most Tasks

PropertyValue
Model IDclaude-sonnet-4-6
Context Window1M tokens (GA)
Max Output16,000 tokens
Input Price$3.00 / 1M tokens
Output Price$15.00 / 1M tokens
Best ForExtraction, classification, clause analysis, generation

Claude Sonnet 4.6 provides the optimal balance of quality, speed, and cost for the majority of CL pipeline stages. It handles structured JSON extraction reliably, classifies documents accurately, and produces well-formatted clause analysis. The 1M token context window (now GA) enables processing very large contracts without chunking.

Claude Opus 4.6 -- Best for Complex Analysis

PropertyValue
Model IDclaude-opus-4-6
Context Window1M tokens (GA)
Max Output32,000 tokens
Input Price$5.00 / 1M tokens
Output Price$25.00 / 1M tokens
Best ForComplex reasoning, risk assessment reports, nuanced legal analysis

Claude Opus 4.6 is Anthropic's most capable model. Use it for the Reasoning capability when processing high-value or complex contracts that require nuanced analysis, multi-factor risk assessment, or detailed negotiation recommendations. The 1M token context window (now GA) allows entire contract portfolios to be analyzed in a single pass.

Cost-Effective Configuration

Assign Sonnet 4.6 to Extraction & Classification, Document Understanding, and Generation. Reserve Opus 4.6 for Reasoning only. This reduces costs by ~60% compared to using Opus 4.6 for everything, with negligible quality difference on routine tasks.

Claude Haiku 4.5 -- Budget Option

PropertyValue
Model IDclaude-haiku-4-5-20251001
Context Window200K tokens
Max Output8,192 tokens
Input Price$1.00 / 1M tokens
Output Price$5.00 / 1M tokens
Best ForHigh-volume extraction on straightforward documents

Haiku 4.5 is significantly faster and cheaper. Consider it for Extraction & Classification when processing large batches of standard-form contracts (NDAs, SOWs) where speed matters more than nuance.

Pricing Reference

Model pricing as of March 2026. Verify current pricing at platform.claude.com/docs/en/about-claude/pricing.

Configuration in Contract Lucidity

Adding Anthropic as a Provider

  1. Navigate to Settings > AI Providers
  2. Click Add Provider
  3. Select Anthropic as the provider type
  4. Paste your API key
  5. Click Save & Verify

Mapping Capabilities

After adding the provider, go to Settings > AI Capabilities and assign Anthropic models to each capability:

Embeddings

Anthropic does not offer a native embedding model. When the Anthropic provider is configured for the Embeddings capability, CL routes embedding calls to the Voyage AI API using your Anthropic API key. Voyage AI models such as voyage-3 and voyage-3-lite are purpose-built for retrieval tasks and integrate seamlessly.

Alternatively, you can configure OpenAI as a second provider specifically for embeddings (recommended -- see the OpenAI guide).

Cost Considerations

Estimating Monthly Spend

VolumeDocuments/MonthAvg PagesEst. Monthly Cost (Sonnet 4.6)Est. Monthly Cost (Opus 4.6 for Reasoning)
Small firm5015~$25+$15
Mid-size20020~$130+$80
Am Law 2001,00025~$750+$500
Am Law 1005,000+30~$4,500+$3,000

Prompt Caching

Anthropic automatically caches system prompts for Claude Sonnet 4.6 and Opus 4.6. Since CL reuses the same system prompts across all documents of the same type, you benefit from:

  • 90% cost reduction on cached prompt tokens (input)
  • Automatic activation -- no configuration needed
  • Greatest savings when processing batches of similar documents

Batch Processing

Anthropic offers a Message Batches API with 50% cost savings. CL does not currently use batch mode (documents are processed individually in real-time), but this is on the roadmap for high-volume deployments.

Rate Limits

Anthropic uses a tiered rate limit system based on cumulative spend. Rate limits are measured in requests per minute (RPM), input tokens per minute (ITPM), and output tokens per minute (OTPM).

TierSpend RequiredRPMInput TPM (Sonnet)Output TPM (Sonnet)
Tier 1$55020,0004,000
Tier 2$401,00040,0008,000
Tier 3$2002,00080,00016,000
Tier 4$4004,0002,000,000+400,000+
Rate Limit Impact on Pipeline

At Tier 1, you can only process roughly one document at a time due to the 50 RPM limit. For production use, ensure you are at least at Tier 2 by adding credits to your Anthropic account.

If CL encounters a rate limit error, the Celery task will retry once after 30 seconds (max_retries=1, default_retry_delay=30). Persistent rate limiting will cause the document to fail.

Checking Your Tier

  1. Log in to console.anthropic.com
  2. Navigate to Settings > Plans & Billing
  3. Your current tier and limits are displayed under Usage Limits

Troubleshooting

SymptomCauseSolution
401 UnauthorizedInvalid or expired API keyRegenerate key at console.anthropic.com
429 Too Many RequestsRate limit exceededWait and retry, or upgrade tier
overloaded_errorAnthropic capacity issuesTransient -- retry in a few minutes
Documents fail at classificationAPI key valid but no capability mappingGo to Settings > AI Capabilities and assign models
Embeddings fail with Anthropic providerVoyage AI key issue or model mismatchEnsure model name is a valid Voyage model (e.g., voyage-3), or switch Embeddings to OpenAI