# case.dev - Complete Reference > The complete API platform for legal technology developers. This is the extended reference for case.dev. For a concise overview, see [llms.txt](https://case.dev/llms.txt). ## Platform Overview case.dev is the first complete API platform purpose-built for legal technology developers. It provides a unified suite of AI-powered services and infrastructure tools that enable developers to build production-grade legal applications without managing complex infrastructure. ### The Problem We Solve Legal tech developers currently face: - Integration of 5-8 different vendors for document processing, AI, storage, and search - Vector databases like Pinecone costing $0.23/GB/month - prohibitively expensive for document-heavy applications - Generic AI APIs lacking legal domain expertise - Complex vendor management increasing costs and slowing development ### Our Solution - **One Unified API** - All services through a single platform - **90% Cost Savings** - Vector storage at 10 credits/GB/month (~$0.10) vs $0.23/GB at competitors - **Legal-Optimized** - 800+ expert skills, legal embeddings, domain expertise - **Production-Ready** - Multi-tenant architecture, encryption, audit logs, compliance ## Authentication All API requests require an API key in the Authorization header: ``` Authorization: Bearer case_sk_live_YOUR_API_KEY ``` Key formats: - Live keys: `case_sk_live_*` - Test keys: `case_sk_test_*` Get your API key at https://console.case.dev --- ## Legal Agent Skills (MCP) Access 800+ curated legal skills via Model Context Protocol. **MCP Endpoint:** `https://skills.case.dev/api/mcp` **Available Tools:** - `resolve_skill` - Search skills by topic (e.g., "appellate brief", "contract review") - `read_skill` - Get full skill content by slug **Browse Skills:** https://agentskills.legal/skills **Documentation:** https://docs.case.dev/agent-skills Skills cover: litigation, transactional, corporate, regulatory, research, drafting, analysis. **Integration Examples:** Cursor MCP Config: ```json { "mcpServers": { "legal-skills": { "url": "https://skills.case.dev/api/mcp" } } } ``` Claude Desktop Config: ```json { "mcpServers": { "legal-skills": { "command": "npx", "args": ["-y", "mcp-remote", "https://skills.case.dev/api/mcp"] } } } ``` --- ## Pricing Model ### Pass-Through Billing All API usage is billed at upstream provider cost with no markup. You pay exactly what the underlying provider charges. ### Platform Tiers | Tier | Monthly Price | Description | |------|---------------|-------------| | **OSS Pay-Go** | $0 + usage | Pass-through pricing at upstream provider cost. $10 free usage included. 100 RPM LLM rate limit. | | **Enterprise** | Custom | Custom pricing, BAA/HIPAA available, dedicated support, SLAs. Contact sales. | ### Pass-Through Pricing Reference | Service | Unit | Price (USD) | Provider | |---------|------|-------------|----------| | **Transcription** | 1 hour | $0.30 | AssemblyAI | | **Text-to-Speech** | 1K characters | $0.12 | ElevenLabs | | **OCR** | 1K pages | $1.50 | Self-hosted (doctr) | | **Web Search** | 1K searches | $5.00 | Exa | | **Translation** | 1M characters | $20.00 | Google Cloud | | **LLM (CaseMark)** | 1M tokens (input) | $1.50 | Baseten | | **LLM (CaseMark)** | 1M tokens (output) | $3.50 | Baseten | | **LLM (3rd party)** | varies | Provider rate | AI Gateway | | **GPU (H100)** | 1 hour | $3.95 | Modal | | **DB Compute** | 1 CU-hour | $0.222 | Neon | | **DB Storage** | 1 GB/month | $0.35 | Neon | | **Memory** | operation | $0.001 | case.dev | --- ## Service Reference ### 1. Vault API - Document Storage & Semantic Search Store legal documents with encryption, automatic OCR, semantic chunking, and vector embeddings. **Endpoints:** ``` POST /vault Create vault GET /vault/:id Get vault details PATCH /vault/:id Update vault DELETE /vault/:id Delete vault GET /vault/:id/objects List objects POST /vault/:id/upload Get presigned upload URL POST /vault/:id/ingest/:objectId Trigger OCR + embedding POST /vault/:id/search Semantic search GET /vault/:id/objects/:objectId Get object metadata GET /vault/:id/objects/:objectId/download Download file GET /vault/:id/objects/:objectId/text Get extracted text ``` **Create Vault Request:** ```json { "name": "Client Documents", "description": "All client case files", "default_chunk_size": 512, "default_chunk_overlap": 50, "enable_graphrag": true } ``` **Search Request:** ```json { "query": "non-compete clause", "limit": 10, "metadata_filter": { "document_type": "contract" } } ``` **Pricing:** | Service | Credits | Unit | |---------|---------|------| | Vault Storage | 3 | per GB/month | | Vector Storage | 10 | per GB/month | | Semantic Search | 10 | per 1,000 queries | First 5GB free on all paid plans. --- ### 2. OCR/Vision API - Document Text Extraction Extract text from scanned PDFs and images with 95-99% accuracy on clean printed text. **Endpoints:** ``` POST /ocr/v1/process Submit document for OCR GET /ocr/v1/:id Check OCR status GET /ocr/v1/:id/download/text Download plain text GET /ocr/v1/:id/download/json Download structured JSON GET /ocr/v1/:id/download/pdf Download searchable PDF ``` **Request:** ```json { "file_url": "https://example.com/document.pdf", "engine": "doctr", "output_formats": ["text", "json", "pdf"], "extract_tables": true, "quality": "legal_grade" } ``` **Response (JSON output):** ```json { "pages": [ { "page_number": 1, "words": [ { "text": "DEPOSITION", "confidence": 0.98, "bbox": [100, 150, 400, 200] } ], "tables": [{"bbox": [50, 500, 2500, 1500], "csv_url": "..."}] } ], "full_text": "DEPOSITION OF JANE DOE...", "page_count": 150, "credits_used": 150 } ``` **Supported Formats:** PDF, PNG, JPG, TIFF, BMP (up to 500MB) **Pricing:** | OCR Type | Credits/Page | Best For | |----------|--------------|----------| | Simple | 1 | Clean PDFs, typed documents | | Complex | 2 | Tables, forms, mixed layouts | | Legal Grade | 3 | Depositions, court filings, handwriting | --- ### 3. Voice API - Transcription & Text-to-Speech Convert audio/video recordings to text with speaker identification and PII redaction. **Transcription Endpoints:** ``` POST /voice/transcription Submit audio for transcription GET /voice/transcription/:id Get transcript and status ``` **TTS Endpoints:** ``` POST /voice/v1/speak Generate audio file POST /voice/v1/speak/stream Stream audio GET /voice/v1/voices List available voices ``` **Transcription Request:** ```json { "audio_url": "https://example.com/deposition.mp3", "quality": "premium", "speaker_labels": true, "redact_pii": true, "audio_redaction": true, "auto_chapters": true, "sentiment_analysis": true, "word_boost": ["voir dire", "affidavit", "deposition"], "language_code": "en" } ``` **Transcription Response:** ```json { "id": "trans_abc123", "status": "completed", "text": "Speaker A: Please state your name...", "utterances": [ { "speaker": "A", "text": "Please state your name for the record.", "start": 1.2, "end": 3.5, "confidence": 0.96 } ], "chapters": [ {"summary": "Opening statements", "start": 0, "end": 120} ], "duration_seconds": 7200, "credits_used": 130 } ``` **Supported Audio Formats:** MP3, M4A, WAV, FLAC, MP4, MOV, WebM (up to 5GB, 10 hours) **Pricing:** | Tier | Credits/Hour | Features | |------|--------------|----------| | Standard | 15 | Basic transcription, 90%+ accuracy | | High Quality | 45 | Speaker labels, timestamps, 95%+ accuracy | | Premium | 65 | + PII redaction, audio redaction, sentiment | Per-minute: Standard (0.25), High Quality (0.75), Premium (~1.1) --- ### 4. LLM API - Unified AI Model Access (OpenAI Compatible) Access 140+ AI models through one OpenAI-compatible API. **Endpoints:** ``` POST /llm/v1/chat/completions Chat with AI models POST /llm/v1/embeddings Generate embeddings GET /llm/v1/models List models with pricing ``` **Chat Request (OpenAI format):** ```json { "model": "casemark/core-1", "messages": [ {"role": "system", "content": "You are a legal research assistant."}, {"role": "user", "content": "Summarize this deposition transcript..."} ], "max_tokens": 1000, "temperature": 0.7, "stream": false } ``` **Response with Credit Tracking:** ```json { "id": "chatcmpl-abc123", "model": "casemark/core-1", "choices": [ { "message": { "role": "assistant", "content": "This deposition covers..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 15234, "completion_tokens": 487, "total_tokens": 15721 }, "cost": { "market_cost": 0.053127, "actual_cost": 0.042502, "currency": "USD" } } ``` **Available Models by Tier:** | Tier | Credits/1M Tokens | Example Models | |------|-------------------|----------------| | Premium | 2,500 | Claude Opus 4.5, GPT-4 Turbo | | Standard | 750 | Claude Sonnet 4.5, GPT-4o, CaseMark Core 1 | | Efficient | 250 | Claude Haiku 4.5, GPT-4o-mini | | Budget | 35 | DeepSeek V3, Gemini Flash | **Featured Conversational Models:** | Model | Provider | Context | Input Price/Token | Output Price/Token | Best For | |-------|----------|---------|-------------------|-------------------|----------| | **CaseMark Core 1** | case.dev | 200K | $0.000003 | $0.000015 | Legal workflows (flagship) | | Claude Sonnet 4.5 | Anthropic | 200K | $0.000003 | $0.000015 | Balanced quality/cost | | Claude Haiku 4.5 | Anthropic | 200K | $0.00000025 | $0.00000125 | Fast, cost-effective | | Claude Opus 4.5 | Anthropic | 200K | $0.000015 | $0.000075 | Maximum capability | | GPT-5 | OpenAI | 128K | $0.000005 | $0.000015 | General purpose | | GPT-5-mini | OpenAI | 128K | $0.0000001 | $0.0000004 | Ultra-affordable | | o4-mini | OpenAI | 128K | $0.0000035 | $0.000014 | Reasoning tasks | | Gemini 2.5 Flash | Google | 1M | $0.000000075 | $0.0000003 | Ultra-fast | | Gemini 2.5 Pro | Google | 2M | $0.000001 | $0.000004 | Complex reasoning | | DeepSeek V3 | DeepSeek | 64K | $0.00000014 | $0.00000028 | Open, affordable | | DeepSeek R1 | DeepSeek | 64K | $0.00000055 | $0.0000022 | Reasoning traces | | Grok 4 | xAI | 128K | $0.000002 | $0.00001 | Real-time data | | Qwen 3 32B | Alibaba | 32K | $0.0001/1M | $0.0001/1M | Ultra-cheap | **Embedding Models:** | Model | Dimensions | Price/1K Tokens | Best For | |-------|------------|-----------------|----------| | text-embedding-3-small | 1536 | $0.00002 | General embeddings | | text-embedding-3-large | 3072 | $0.00013 | High-quality embeddings | | voyage-law-2 | 1024 | $0.00012 | **Legal documents** | | voyage-3.5 | 1536 | $0.00008 | General purpose | **Features:** - OpenAI API compatibility (drop-in replacement) - BYOK (Bring Your Own Key) support - Automatic cost tracking in every response - Prompt caching for cost reduction - Streaming support (SSE) - Tool use / function calling --- ### 5. Workflows API - Multi-Step Automation Orchestrate document processing pipelines with durable execution. **Endpoints:** ``` POST /workflows/v1 Create and execute workflow GET /workflows/v1/:id Get workflow status GET /workflows/v1/:id/output Get workflow output ``` **Workflow Definition:** ```json { "name": "deposition_analysis", "steps": [ { "id": "transcribe", "service": "voice", "action": "transcription", "input": { "audio_url": "{{input.audio_url}}", "speaker_labels": true, "redact_pii": true } }, { "id": "summarize", "service": "llm", "action": "chat", "input": { "model": "casemark/core-1", "messages": [ {"role": "user", "content": "Summarize: {{transcribe.text}}"} ] }, "depends_on": ["transcribe"] }, { "id": "store", "service": "vault", "action": "upload", "input": { "vault_id": "{{input.vault_id}}", "content": "{{summarize.content}}", "metadata": {"type": "deposition_summary"} }, "depends_on": ["summarize"] } ] } ``` **Features:** - Durable execution (survives failures) - Automatic retries with exponential backoff - Step-level parallelization - Conditional execution - Webhook notifications **Pricing:** | Complexity | Credits/Execution | Description | |------------|-------------------|-------------| | Simple | 1 | Single API call orchestration | | Standard | 3 | 2-5 API calls, basic logic | | Complex | 8 | 5-10 API calls, conditionals | | Enterprise | 15 | 10+ calls, parallel execution | Plus underlying service costs (LLM, OCR, etc.) --- ### 6. Actions API - Event-Driven Automation Execute workflows in response to events. **Endpoints:** ``` POST /actions/v1 Create action GET /actions/v1 List actions DELETE /actions/v1/:id Delete action ``` **Action Definition:** ```json { "name": "new_document_processor", "trigger": { "type": "vault.object.created", "vault_id": "vault_abc123" }, "workflow_id": "wf_xyz789", "enabled": true } ``` **Trigger Types:** - `vault.object.created` - New document uploaded - `vault.object.ingested` - Document processed - `schedule` - Cron expression - `webhook` - External HTTP call **Pricing:** Free (underlying workflow/service costs apply) --- ### 7. Convert API - FTR Conversion Convert FTR court recordings to standard M4A audio. **Endpoint:** ``` POST /convert/v1/process GET /convert/v1/:id ``` **Request:** ```json { "file_url": "https://example.com/recording.ftr", "output_format": "m4a" } ``` **Pricing:** 15 credits/hour of audio --- ### 8. Format API - Document Generation Transform Markdown or JSON into professional documents. **Endpoint:** ``` POST /format/v1/document ``` **Request:** ```json { "content": "# Motion to Dismiss\n\n## Background\n\nPlaintiff filed...", "format": "markdown", "output_format": "pdf", "template": "pleading", "style": { "page": {"size": "letter", "margin_top": "1in"}, "typography": {"font_family": "Times New Roman", "font_size": "12pt"} } } ``` **Templates:** `pleading`, `letter`, `memo`, `brief`, `contract`, `report` **Output Formats:** PDF, DOCX, HTML **Pricing:** 1 credit/document --- ### 9. Email API - Transactional Email **Endpoint:** ``` POST /email/v1/send ``` **Request:** ```json { "from": {"email": "notifications@yourfirm.com", "name": "Smith & Associates"}, "to": [{"email": "client@example.com", "name": "John Client"}], "subject": "Deposition Transcript Available", "html": "

Your transcript is ready...

", "attachments": [{"filename": "transcript.pdf", "content_url": "https://..."}] } ``` **Pricing:** 1 credit per 100 emails --- ### 10. Graph API - Knowledge Graphs (GraphRAG) Extract entities and relationships from documents. **Endpoints:** ``` POST /vault/:id/graphrag/init Initialize graph GET /vault/:id/graphrag/stats Graph statistics POST /graph/v1/query Query graph ``` **Query:** ```json { "vault_id": "vault_abc123", "query": { "type": "find_path", "from_entity": "John Smith", "to_entity": "Acme Corp", "max_hops": 3 } } ``` **Pricing:** | Service | Credits | Unit | |---------|---------|------| | Build Graph | 15 | per 1,000 entities | | Query Graph | 1 | per query | First 100 queries/month free. --- ### 11. Billing API **Endpoints:** ``` GET /billing/v1/usage Current usage summary GET /billing/v1/history Past invoices ``` **Usage Response:** ```json { "period": {"start": "2024-01-01T00:00:00Z", "end": "2024-01-31T23:59:59Z"}, "usage": { "total_cost_usd": 8.47, "free_allowance_usd": 10.00, "free_allowance_remaining_usd": 1.53, "has_payment_method": false }, "by_service": { "llm": {"cost_usd": 4.50, "units": "600K tokens"}, "transcription": {"cost_usd": 1.95, "units": "3 hours"}, "ocr": {"cost_usd": 1.50, "units": "1,000 pages"}, "storage": {"cost_usd": 0.52, "units": "17 GB"} } } ``` --- ### 12. Orbit Compute - Application Hosting Deploy web applications and GPU workloads. **Endpoints:** ``` POST /deployments/v1 Create deployment GET /deployments/v1 List deployments POST /deployments/v1/:id/pause Pause deployment POST /deployments/v1/:id/resume Resume deployment GET /deployments/v1/:id/logs Get logs ``` **Deployment Request:** ```json { "name": "legal-portal", "repository": "https://github.com/firm/legal-portal", "branch": "main", "framework": "nextjs", "environment_variables": { "DATABASE_URL": "postgresql://...", "API_KEY": "case_sk_live_..." }, "instance_size": "medium" } ``` **Features:** - One-click deployment from GitHub - Live URLs on case.systems domain - Container and static site support - Pause/resume for cost savings - Real-time deployment logs - Per-second billing **Instance Pricing (billed separately, not credits):** | Size | vCPU | Memory | Price/Hour | |------|------|--------|------------| | Small | 1 | 2GB | $0.03 | | Medium | 2 | 4GB | $0.08 | | Large | 4 | 8GB | $0.16 | **GPU Pricing (pass-through from Modal):** | GPU | VRAM | Price/Hour | |-----|------|------------| | T4 | 16GB | $0.59 | | L4 | 24GB | $0.83 | | A100 | 80GB | $2.50 | | H100 | 80GB | $3.95 | | B200 | 192GB | Custom | --- ### 13. Payments Platform (Early Access) IOLTA-compliant trust accounting and payment infrastructure. **Features:** - Double-entry ledger for all money movements - Trust account management - Holds and approval workflows - Stripe Connect integration - Settlement processing - Complete audit trails **Status:** Early access for select partners. Contact sales@case.dev for access. --- ### 14. Translation API - Multilingual Document Processing Neural machine translation powered by Google Cloud Translation, supporting 100+ languages. **Endpoints:** ``` POST /translate/v1/translate Translate text POST /translate/v1/detect Detect language GET /translate/v1/languages List supported languages ``` **Translate Request:** ```json { "text": "This agreement shall be governed by the laws of California.", "target_language": "es", "source_language": "en" } ``` **Response:** ```json { "translated_text": "Este acuerdo se regirá por las leyes de California.", "detected_language": "en", "confidence": 0.99 } ``` **Features:** - Auto language detection - Batch translation (up to 100 texts) - HTML preservation - 100+ language pairs **Pricing:** 3 credits per 1,000 characters --- ### 15. Web Search API - Search & AI Answers Programmatic web search with AI-powered answer generation. **Endpoints:** ``` POST /search/v1/search Web search with domain filtering POST /search/v1/answer Get AI answers with citations POST /search/v1/research Deep multi-step research ``` **Answer Request:** ```json { "query": "What is the statute of limitations for medical malpractice in California?", "includeDomains": ["law.cornell.edu", "findlaw.com"] } ``` **Response:** ```json { "answer": "In California, the statute of limitations for medical malpractice is 3 years from the date of injury or 1 year from discovery [1]...", "citations": [ {"title": "California Code of Civil Procedure § 340.5", "url": "..."} ] } ``` **Features:** - Domain filtering (include/exclude) - AI-generated answers with citations - Multi-step research for comprehensive reports **Note:** Web data only - use specialized platforms like Lexis or Westlaw for case law/statutes. --- ### 16. Databases API - Serverless PostgreSQL Serverless PostgreSQL databases powered by Neon with instant branching. **Endpoints:** ``` POST /database/v1/projects Create database project GET /database/v1/projects List projects GET /database/v1/projects/:id Get project details GET /database/v1/projects/:id/connection Get connection string POST /database/v1/projects/:id/branches Create branch ``` **Create Project Request:** ```json { "name": "case-management-db", "region": "aws-us-east-1" } ``` **Response:** ```json { "id": "proj_abc123", "name": "case-management-db", "region": "aws-us-east-1", "connection_uri": "postgresql://...", "status": "active" } ``` **Features:** - Serverless auto-scaling - Instant branching (dev/staging/prod copies) - Connection pooling (PgBouncer included) - PostgreSQL 17 with full feature support - Encrypted at rest and in transit **Regions:** aws-us-east-1 (default), aws-us-east-2, aws-us-west-2, aws-eu-central-1, aws-eu-west-1, aws-eu-west-2, aws-ap-southeast-1, aws-ap-southeast-2 --- ### 17. Memory API - Persistent Agent Memory Persistent, searchable memory for AI agents across conversations. **Endpoints:** ``` POST /memory/v1 Add memories from conversation POST /memory/v1/search Search memories semantically GET /memory/v1 List memories DELETE /memory/v1/:id Delete memory POST /memory/v1/delete-many Bulk delete by tags ``` **Add Memory Request:** ```json { "messages": [ {"role": "user", "content": "Remember that this client prefers conservative investments and is risk-averse."} ], "tag_1": "client_123", "tag_2": "matter_456", "category": "preference" } ``` **Response:** ```json { "results": [ {"id": "mem_abc", "memory": "Client prefers conservative investments", "event": "ADD"}, {"id": "mem_def", "memory": "Client is risk-averse", "event": "ADD"} ] } ``` **Search Request:** ```json { "query": "investment preferences", "tag_1": "client_123", "top_k": 5 } ``` **Features:** - Automatic fact extraction from conversations - Semantic search (find by meaning, not keywords) - 12 indexed tag fields for filtering - Deduplication and conflict resolution - Custom extraction prompts for domain-specific needs **Memory Events:** - `ADD` - New memory created - `UPDATE` - Existing memory updated/merged - `DELETE` - Contradicting info caused deletion - `NONE` - Duplicate, already exists **Pricing:** $0.001 per operation (add, search). List/get/delete are free. --- ### 18. SuperDoc API - Document Conversion Convert documents between formats and populate DOCX templates. **Endpoints:** ``` POST /superdoc/v1/convert Convert between formats POST /superdoc/v1/annotate Populate DOCX template fields ``` **Convert Request:** ```json { "file": "", "from": "md", "to": "pdf" } ``` **Annotate Request (Template Population):** ```json { "document": { "url": "https://your-bucket.s3.amazonaws.com/templates/contract.docx" }, "fields": [ {"id": "client_name", "type": "text", "value": "Acme Corporation"}, {"id": "contract_date", "type": "date", "value": "2025-01-15"}, {"id": "contract_amount", "type": "number", "value": 50000} ], "output_format": "pdf" } ``` **Supported Conversions:** | From | To | Use Case | |------|-----|----------| | docx | pdf | Finalize Word documents | | md | docx | Generate editable Word docs | | md | pdf | Create PDFs from Markdown | | html | docx | Convert web content | **Features:** - High-fidelity formatting preservation - Template field population - Multiple input methods (upload, URL, base64) --- ### 19. AI Governance - Provider Control Control which AI providers handle your organization's requests. **Endpoints:** ``` GET /governance List policies POST /governance Create policy PUT /governance/:id Update policy DELETE /governance/:id Delete policy GET /governance/audit Query audit logs ``` **Create Policy Request:** ```json { "name": "SOC 2 Compliant", "rules": { "minimumTrustTier": "most_trusted", "requireSoc2": true, "enforcement": "hard_block" } } ``` **Use in LLM Request:** ```json { "model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "Analyze this contract"}], "governance_policy": 2 } ``` **Trust Tiers:** | Tier | Description | Use Case | |------|-------------|----------| | `most_trusted` | Full enterprise compliance (SOC 2, HIPAA, BAA, ZDR) | Healthcare, financial | | `trusted` | Good compliance, may lack some certifications | General enterprise | | `sketchy` | Limited compliance info | Development/testing only | | `untrustworthy` | Subject to national security laws | Always blocked | **Compliance Certifications:** SOC 2 Type II, HIPAA, BAA, ZDR (Zero Data Retention), ISO 27001, GDPR **Enforcement Modes:** - `hard_block` - Request fails with 403 - `soft_block` - Request fails, violation logged - `warn` - Request proceeds, violation logged **Features:** - Trust tier enforcement - Compliance certification requirements - Complete audit logging - Per-request policy selection --- ## Error Handling All errors follow this format: ```json { "error": { "code": "INVALID_API_KEY", "message": "The API key provided is invalid", "type": "authentication_error" } } ``` Common error codes: - `401` - Invalid or missing API key - `403` - Insufficient permissions or credits exhausted - `404` - Resource not found - `429` - Rate limit exceeded (check `Retry-After` header) - `500` - Internal server error --- ## Rate Limits Rate limits vary by endpoint and plan. Headers returned: - `X-RateLimit-Limit`: Requests allowed per window - `X-RateLimit-Remaining`: Requests remaining - `X-RateLimit-Reset`: Unix timestamp when limit resets - `X-Credits-Remaining`: Credits remaining in current period --- ## SDKs & Libraries **Python:** ```bash pip install casemark ``` ```python from casemark import CaseMark client = CaseMark(api_key="case_sk_live_...") response = client.llm.chat.completions.create( model="casemark/core-1", messages=[{"role": "user", "content": "Hello"}] ) print(f"Credits used: {response.usage.credits_used}") ``` **TypeScript/JavaScript:** ```bash npm install @casemark/sdk ``` ```typescript import { CaseMark } from '@casemark/sdk'; const client = new CaseMark({ apiKey: 'case_sk_live_...' }); const response = await client.llm.chat.completions.create({ model: 'casemark/core-1', messages: [{ role: 'user', content: 'Hello' }] }); console.log(`Credits used: ${response.usage.credits_used}`); ``` **Additional SDKs:** - PHP (available) - C# (available) - Java (available) --- ## Usage Scenarios ### Scenario 1: Small Law Firm (OSS Pay-Go) | Activity | Volume | Cost (USD) | |----------|--------|------------| | OCR | 50 pages | $0.08 | | Transcription | 5 hours | $1.50 | | LLM (CaseMark Core) | 50K tokens | $0.18 | | DB Storage | 10 GB | $3.50 | | Web Search | 500 queries | $2.50 | | **Total** | | **$7.76** (within $10 free allowance) | ### Scenario 2: Solo Practitioner (OSS Pay-Go) | Activity | Volume | Cost (USD) | |----------|--------|------------| | OCR | 200 pages | $0.30 | | Transcription | 10 hours | $3.00 | | LLM (CaseMark Core) | 200K tokens | $0.70 | | DB Storage | 25 GB | $8.75 | | Translation | 50K chars | $1.00 | | **Total** | | **$13.75** ($3.75 after $10 free allowance) | ### Scenario 3: Mid-Size Firm (OSS Pay-Go) | Activity | Volume | Cost (USD) | |----------|--------|------------| | OCR | 1,000 pages | $1.50 | | Transcription | 20 hours | $6.00 | | LLM (CaseMark Core) | 500K tokens | $1.75 | | DB Compute | 100 CU-hours | $22.20 | | DB Storage | 100 GB | $35.00 | | **Total** | | **$66.45** (pass-through, no markup) | --- ## Common Integration Patterns ### RAG (Retrieval-Augmented Generation) 1. Upload documents to Vault 2. Ingest to create embeddings 3. Search for relevant chunks 4. Pass chunks to LLM with user query ### Document Processing Pipeline 1. Upload PDF to Vault 2. OCR if scanned 3. Extract text and metadata 4. Generate summary with LLM 5. Store results back in Vault ### Deposition Analysis 1. Convert FTR to M4A (if needed) 2. Transcribe with speaker labels 3. Store transcript in Vault 4. Extract entities with GraphRAG 5. Generate timeline and summary --- ## Links - **Documentation**: https://docs.case.dev - **API Reference**: https://docs.case.dev/api-reference - **Console**: https://console.case.dev - **Pricing**: https://case.dev/pricing - **Status**: https://status.case.dev - **Security**: https://trust.casemark.com - **Support**: support@case.dev - **Sales**: sales@case.dev --- ## Related Products - **Legal Agent Skills** (https://agentskills.legal): 800+ curated legal prompts, templates, and methodologies accessible via MCP - **MCP Server** (https://docs.case.dev/mcp): Integration with AI coding assistants like Cursor and Claude Desktop - **Console** (https://console.case.dev): Web dashboard for API management