### Install CaseDev Go SDK Source: https://docs.case.dev/sdks Use the go get command to add the SDK to your project. Requires Go 1.22 or higher. ```bash go get -u github.com/CaseMark/casedev-go ``` -------------------------------- ### Install Case.dev CLI Source: https://docs.case.dev/cli Install the CLI tool using Homebrew or Go. ```bash brew install CaseMark/casedev/casedev ``` ```bash go install github.com/CaseMark/casedev-cli/cmd/casedev@latest ``` -------------------------------- ### CLI Command Structure Examples Source: https://docs.case.dev/cli Examples demonstrating the resource-based command pattern used by the CLI. ```bash casedev llm:v1:chat create-completion # LLM chat casedev vault search # Vault search casedev ocr:v1 process # OCR processing casedev voice:transcription create # Voice transcription casedev legal:v1 find # Legal research casedev search:v1 answer # Web search AI answer ``` -------------------------------- ### GET /connectors/v1/installations Source: https://docs.case.dev/api-reference/connectors/list-installations List application installations (tenants) in this organization. ```APIDOC ## GET /connectors/v1/installations ### Description List application installations (tenants) in this organization. ### Method GET ### Endpoint /connectors/v1/installations ### Parameters #### Query Parameters - **application** (string) - Optional - Filter by application name. - **external_tenant_id** (string) - Optional - Filter by external tenant ID. ### Response #### Success Response (200) - **Installations** (array) - Installations for the organization #### Error Responses - **401** - Invalid API key - **403** - Insufficient permissions ``` -------------------------------- ### Install CaseDev SDK Source: https://docs.case.dev/sdks Install the package using pip. ```bash pip install casedev ``` -------------------------------- ### Install Case.dev dependencies Source: https://docs.case.dev/cookbooks/document-intelligence-agent Install the necessary packages or tools for your specific development environment. ```bash # No installation needed — just set your API key export CASEDEV_API_KEY="sk_case_YOUR_API_KEY" ``` ```bash brew tap CaseMark/casedev && brew install casedev ``` ```bash npm install casedev ai zod ``` ```bash pip install casedev ``` ```bash go get github.com/CaseMark/casedev-go ``` -------------------------------- ### Retrieve Environments List Source: https://docs.case.dev/api-reference Example response body for a successful GET request to the environments endpoint. ```json { "environments": [ { "id": "env_abc123", "name": "Document Review Environment", "slug": "doc-review", "domain": "doc-review.compute.case.dev", "isDefault": true, "status": "active", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-20T14:45:00Z" }, { "id": "env_def456", "name": "Contract Analysis", "slug": "contract-analysis", "domain": "contract-analysis.compute.case.dev", "isDefault": false, "status": "active", "createdAt": "2024-01-18T09:15:00Z", "updatedAt": "2024-01-18T09:15:00Z" } ] } ``` ```json { "environments": [ { "id": "env_abc123", "name": "Document Review Environment", "slug": "doc-review", "domain": "doc-review.compute.case.dev", "isDefault": true, "status": "active", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-20T14:45:00Z" }, { "id": "env_def456", "name": "Contract Analysis", "slug": "contract-analysis", "domain": "contract-analysis.compute.case.dev", "isDefault": false, "status": "active", "createdAt": "2024-01-18T09:15:00Z", "updatedAt": "2024-01-18T09:15:00Z" } ] } ``` -------------------------------- ### Get LLM Configuration Response Example Source: https://docs.case.dev/api-reference/llms/get-llm-configuration Example JSON response structure for the getLlmConfig operation, showing the models array with model details. ```json models: - id: gpt-4 name: GPT-4 modelType: language description: Most capable GPT-4 model for complex legal analysis pricing: input: 0.03 output: 0.06 currency: USD unit: 1K tokens - id: claude-3-opus name: Claude 3 Opus modelType: language description: Anthropic's most powerful model for legal reasoning - id: text-embedding-3-large name: Text Embedding 3 Large modelType: embedding description: High-performance embeddings for semantic search ``` -------------------------------- ### Install CaseDev SDK Source: https://docs.case.dev/getting-started/index Commands to install the CaseDev SDK or configure the environment for various platforms. ```bash # No installation needed — just set your API key export CASEDEV_API_KEY="sk_case_YOUR_API_KEY" ``` ```bash brew tap CaseMark/casedev && brew install casedev ``` ```bash npm install casedev ``` ```bash pip install casedev ``` ```bash go get github.com/CaseMark/casedev-go ``` -------------------------------- ### Install CASE.DEV CLI Source: https://docs.case.dev/ Use Homebrew to install the CASE.DEV command-line interface on macOS. ```bash brew tap CaseMark/casedev && brew install casedev ``` -------------------------------- ### Install TypeScript SDK Source: https://docs.case.dev/sdks Install the official Case.dev package via npm. ```bash npm install casedev ``` -------------------------------- ### Install Linc CLI Source: https://docs.case.dev/ Use npm to install the Linc package globally. ```bash npm install -g @casemark/linc ``` -------------------------------- ### Verify CLI Installation Source: https://docs.case.dev/cli Check the installed version of the CLI to ensure it is correctly configured. ```bash casedev --version ``` -------------------------------- ### List Environments Response Example Source: https://docs.case.dev/api-reference/compute/list-environments Example JSON response structure for a successful request to list compute environments. ```yaml environments: - id: env_abc123 name: Document Review Environment slug: doc-review domain: doc-review.compute.case.dev isDefault: true status: active createdAt: '2024-01-15T10:30:00Z' updatedAt: '2024-01-20T14:45:00Z' - id: env_def456 name: Contract Analysis slug: contract-analysis domain: contract-analysis.compute.case.dev isDefault: false status: active createdAt: '2024-01-18T09:15:00Z' updatedAt: '2024-01-18T09:15:00Z' ``` -------------------------------- ### Compute Environment Schema Example Source: https://docs.case.dev/api-reference/compute/create-compute-environment Example JSON object representing a compute environment resource. ```yaml example: id: env_abc123 name: document-review-prod slug: document-review-prod domain: document-review-prod-lawfirm.case.dev isDefault: true status: active createdAt: '2024-01-15T10:30:00Z' ``` -------------------------------- ### GPU Instances Response Example Source: https://docs.case.dev/api-reference/compute/list-gpu-instances Example JSON response structure for a successful request to list GPU instances. ```json instances: - id: gpu_abc123 name: ocr-processing status: running ip: 143.198.54.123 instanceType: gpu_1x_a10 region: us-west-1 pricePerHour: $0.60 gpu: 1x A10 (24 GB) startedAt: '2025-01-15T10:00:00Z' totalRuntimeSeconds: 1800 totalCost: $0.30 createdAt: '2025-01-15T10:00:00Z' count: 1 ``` -------------------------------- ### Vault object merge started event example Source: https://docs.case.dev/events/event-types Represents the JSON structure for a started vault object merge operation. ```json { "id": "evt_01HV8ZK8M7Q9YJ6P5E3P2R1A0B", "type": "vault.object.merge.started", "occurred_at": "2026-04-24T15:12:09.481Z", "data": { "vaultId": "vault_123", "objectId": "object_123", "sourceObjectIds": ["sourceObjectId_123"], "clientReference": "clientReference_value" } } ``` -------------------------------- ### Initialize Client and Perform Operations Source: https://docs.case.dev/sdks Demonstrates client initialization with an API key, creating a vault, and executing an LLM chat completion request. ```go package main import ( "context" "fmt" casedev "github.com/CaseMark/casedev-go" "github.com/CaseMark/casedev-go/option" ) func main() { client := casedev.NewClient( option.WithAPIKey("sk_case_YOUR_API_KEY"), // or set CASEDEV_API_KEY env var option.WithEnvironmentProduction(), // default ) // Create a vault vault, _ := client.Vault.New(context.TODO(), casedev.VaultNewParams{ Name: casedev.F("My Documents"), Description: casedev.F("Legal document repository"), }) // Chat with an LLM resp, _ := client.Llm.V1.Chat.NewCompletion(context.TODO(), casedev.LlmV1ChatNewCompletionParams{ Model: casedev.F("anthropic/claude-sonnet-4.5"), Messages: casedev.F([]casedev.LlmV1ChatNewCompletionParamsMessage{{ Role: casedev.F(casedev.LlmV1ChatNewCompletionParamsMessagesRoleUser), Content: casedev.F("Summarize this contract..."), }}), }) fmt.Println(resp.Choices[0].Message.Content) } ``` -------------------------------- ### Ingest Vault Object Response Example Source: https://docs.case.dev/api-reference/vaults/ingest-vault-object Example JSON response returned upon successfully starting an ingestion workflow. ```json objectId: obj_abc123 workflowId: wf_def456 status: processing message: >- Document ingestion started. Text extraction, chunking, and embedding generation in progress. enableGraphRAG: false ``` -------------------------------- ### Get Vault Object Pages Response Example Source: https://docs.case.dev/api-reference/vault-objects/get-object-pages Example JSON response structure for a successful request to retrieve object pages. ```json { "pages": [ { "page": 1, "text": "PLAINTIFF’S MOTION FOR SUMMARY JUDGMENT..." }, { "page": 2, "text": "STATEMENT OF UNDISPUTED FACTS..." } ], "metadata": { "object_id": "obj_abc123", "vault_id": "vault_def456", "filename": "motion_for_summary_judgment.pdf", "source": "ocr", "page_count": 15, "returned_pages": 2, "start": 1, "end": 2 } } ``` -------------------------------- ### OpenAPI specification for listing installation vault grants Source: https://docs.case.dev/api-reference/connectors/list-installation-vault-grants Defines the GET endpoint for retrieving vault grants for a specific installation ID. ```yaml openapi: 3.1.0 info: title: Case.dev API description: >- The AI-native platform for legal technology. Build smarter legal applications with our suite of AI-powered APIs. version: 1.0.0 contact: name: Case.dev Support email: support@casemark.com url: https://case.dev license: name: Proprietary url: https://case.dev/terms servers: - url: https://api.case.dev description: Production security: - bearerAuth: [] tags: - name: Vaults description: Secure document storage with semantic search and GraphRAG - name: Vault Events description: Vault-scoped event subscriptions and delivery testing - name: Vault Memory description: Vault-scoped persistent memory and semantic retrieval - name: Vault Objects description: Vault object management, content access, and document operations - name: Memory description: >- Persistent memory for AI agents with semantic search and 12 generic indexed tag fields - name: OCR description: Extract text from PDFs, images, and scanned documents - name: Voice description: Audio transcription and text-to-speech - name: LLMs description: Access 40+ language models through a unified API - name: Search description: Web search and AI answers - name: Mail description: Managed inboxes for agent email workflows - name: Media description: Transcript retrieval and captioned media clip generation - name: Legal description: Legal research tools including citation verification - name: Privilege description: Privilege detection for e-discovery and litigation workflows - name: Compute description: Serverless GPU and CPU infrastructure - name: Format description: Document formatting and template rendering (MD/JSON to PDF/DOCX) - name: SuperDoc description: Document conversion and template automation - name: Webhooks description: Webhook endpoint management - name: System description: Public system metadata and discovery endpoints - name: Usage description: Usage reporting and webhook subscriptions - name: Database description: Serverless PostgreSQL databases with instant branching - name: Translation description: Language detection and translation for multilingual legal workflows - name: Skills description: Search and read legal AI skills for agents - name: Agents/Linc description: Durable, stateful legal agent sessions with sandboxed tools and files - name: Matters description: Matter-native legal workspaces and orchestration primitives - name: Connectors description: Import and export between provider folders (Google Drive) and vaults - name: Applications Projects description: Web application project management - name: Applications Deployments description: Web application deployment management - name: Applications Domains description: Custom domain configuration for applications - name: Applications Env Vars description: Environment variable management for applications paths: /connectors/v1/installations/{id}/vaults: get: tags: - Connectors summary: List installation vault grants description: >- List the vaults an installation may use, with capabilities and revocation state. operationId: listConnectorInstallationVaultGrants parameters: - name: id in: path required: true schema: type: string responses: '200': description: Grants for the installation '401': description: Invalid API key '403': description: Insufficient permissions '404': description: Installation not found components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: API key starting with `sk_case_` ``` -------------------------------- ### POST /connectors/v1/installations Source: https://docs.case.dev/api-reference/connectors/ensure-installation Idempotently create or return the installation for a specific application and external tenant ID. ```APIDOC ## POST /connectors/v1/installations ### Description Idempotently create (or return) the installation for (application, external_tenant_id) in this organization. Send the returned installation id as X-Case-Installation-Id on connector requests to scope them to this tenant. ### Method POST ### Endpoint /connectors/v1/installations ### Request Body - **application** (string) - Required - Consuming application key (e.g. "p3"). - **external_tenant_id** (string) - Required - The application's own tenant identifier (e.g. a P3 organization id). ### Response #### Success Response (200) - Existing installation returned #### Success Response (201) - Installation created #### Error Responses - **400**: Invalid payload - **401**: Invalid API key - **403**: Insufficient permissions or application owned by another organization ``` -------------------------------- ### Retrieve Instance Details and Setup Scripts Source: https://docs.case.dev/compute/index Poll the instance status and extract the SSH private key and vault setup script using the Case.dev API. ```bash RESP=$(curl -s -H "Authorization: Bearer $CASEDEV_API_KEY" \ https://api.case.dev/compute/v1/instances/) echo "$RESP" | jq -r '.ssh.privateKey' > ~/.ssh/case_gpu_key && chmod 600 ~/.ssh/case_gpu_key echo "$RESP" | jq -r '.vaultMounts.setupScript' > /tmp/setup-vaults.sh && chmod +x /tmp/setup-vaults.sh IP=$(echo "$RESP" | jq -r '.ip') ``` -------------------------------- ### Initialize tool-calling agent in Go Source: https://docs.case.dev/cookbooks/document-intelligence-agent Demonstrates the initial request structure for a tool-calling agent in Go. ```go // Tool-calling agent loop in Go // 1. Initial request with tools resp, _ := client.Llm.V1.Chat.NewCompletion(ctx, casedev.LlmV1ChatNewCompletionParams{ Model: casedev.F("anthropic/claude-sonnet-4.5"), Messages: casedev.F([]casedev.LlmV1ChatNewCompletionParamsMessage{ { Role: casedev.F(casedev.LlmV1ChatNewCompletionParamsMessagesRoleSystem), Content: casedev.F("You are a document intelligence agent with access to a knowledge base."), }, { Role: casedev.F(casedev.LlmV1ChatNewCompletionParamsMessagesRoleUser), Content: casedev.F(question), }, }), // Tools defined as JSON schema (searchKnowledgeBase, addToKnowledgeBase) }) // 2. If tool calls returned, execute them and continue // See TypeScript example for full tool-calling loop pattern fmt.Println(resp.Choices[0].Message.Content) ``` -------------------------------- ### Example bundle response Source: https://docs.case.dev/skills/custom-skills JSON structure returned for bundled root skills containing file references. ```json { "bundle": { "role": "root", "files": [ { "slug": "contract-redline-review--file--references-checklist-md-a1b2c3d4e5f6", "path": "references/checklist.md", "content_type": "text/plain; charset=utf-8" } ] } } ``` -------------------------------- ### Get text by page cURL request Source: https://docs.case.dev/vault/manage Example request to retrieve a specific range of pages from a document. ```bash curl "https://api.case.dev/vault/$VAULT_ID/objects/$OBJECT_ID/pages?start=3&end=5" \ -H "Authorization: Bearer $CASEDEV_API_KEY" ``` -------------------------------- ### POST /instances Source: https://docs.case.dev/api-reference/compute/launch-gpu-instance Endpoint to initiate the creation and launch of a new GPU instance. ```APIDOC ## POST /instances ### Description Initiates the launch of a new GPU instance with specified configuration. ### Method POST ### Endpoint /instances ### Response #### Success Response (200) - **id** (string) - Unique identifier of the instance - **name** (string) - Name of the instance - **status** (string) - Current status of the instance - **instanceType** (string) - Type of the instance - **region** (string) - Deployment region - **pricePerHour** (string) - Hourly cost - **gpu** (string) - GPU configuration details - **specs** (object) - Hardware specifications - **vaults** (array) - Associated storage vaults - **createdAt** (string) - Timestamp of creation - **message** (string) - Status message ### Error Handling - **400**: Invalid parameters - **401**: Invalid or missing API key - **404**: Instance type, region, or vault not found - **409**: Instance with this name already exists - **500**: Failed to launch instance ``` -------------------------------- ### GET /skills/:slug/export Source: https://docs.case.dev/skills/custom-skills Inspect the exact files that will be installed into an agent runtime sandbox for a specific skill. ```APIDOC ## GET /skills/:slug/export ### Description Inspect the exact files that will be installed into an agent runtime sandbox. Custom skills in your organization are resolved first; curated skills are used as a fallback. ### Method GET ### Endpoint /skills/:slug/export ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier of the skill. #### Query Parameters - **target** (string) - Optional - The target environment for the export (e.g., agents). ### Response #### Success Response (200) - **slug** (string) - The skill identifier. - **target** (string) - The target environment. - **root** (string) - The runtime directory path. - **source** (string) - The source type (e.g., custom). - **files** (array) - List of files included in the skill tree. ### Response Example { "slug": "contract-redline-review", "target": "agents", "root": "/contract-redline-review", "source": "custom", "files": [ { "path": "contract-redline-review/SKILL.md", "content": "# Contract Redline Review\n\n...", "content_type": "text/markdown; charset=utf-8", "sha256": "d3b07384d113edec49eaa6238ad5ff00", "size_bytes": 128 } ] } ``` -------------------------------- ### GET /connectors/v1/installations/{id}/vaults Source: https://docs.case.dev/api-reference/connectors/list-installation-vault-grants List the vaults an installation may use, with capabilities and revocation state. ```APIDOC ## GET /connectors/v1/installations/{id}/vaults ### Description List the vaults an installation may use, with capabilities and revocation state. ### Method GET ### Endpoint /connectors/v1/installations/{id}/vaults ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the installation. ### Response #### Success Response (200) - **Grants for the installation** #### Error Responses - **401** - Invalid API key - **403** - Insufficient permissions - **404** - Installation not found ``` -------------------------------- ### Launch a GPU instance Source: https://docs.case.dev/compute/index Create a new GPU instance with specific hardware, region, and vault attachments. Ensure the CASEDEV_API_KEY environment variable is set before execution. ```bash curl -X POST https://api.case.dev/compute/v1/instances \ -H "Authorization: Bearer $CASEDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "ocr-batch", "instanceType": "gpu_1x_a10", "region": "us-west-1", "autoShutdownMinutes": 60, "vaultIds": [""] }' ``` ```bash casedev compute:v1:instances create \ --name ocr-batch \ --instance-type gpu_1x_a10 \ --region us-west-1 \ --auto-shutdown-minutes 60 \ --vault-ids '[""]' ``` ```typescript import Casedev from 'casedev'; const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY }); const instance = await client.compute.v1.instances.create({ name: 'ocr-batch', instanceType: 'gpu_1x_a10', region: 'us-west-1', autoShutdownMinutes: 60, vaultIds: [''], }); console.log(instance.id, instance.status); ``` ```python import casedev, os client = casedev.Casedev(api_key=os.environ['CASEDEV_API_KEY']) instance = client.compute.v1.instances.create( name='ocr-batch', instance_type='gpu_1x_a10', region='us-west-1', auto_shutdown_minutes=60, vault_ids=[''], ) print(instance.id, instance.status) ``` ```go instance, _ := client.Compute.V1.Instances.New(ctx, casedev.ComputeV1InstanceNewParams{ Name: casedev.F("ocr-batch"), InstanceType: casedev.F("gpu_1x_a10"), Region: casedev.F("us-west-1"), AutoShutdownMinutes: casedev.F(int64(60)), VaultIds: casedev.F([]string{""}), }) fmt.Println(instance.ID, instance.Status) ``` -------------------------------- ### Quick Start CLI Commands Source: https://docs.case.dev/cli Commonly used commands for interacting with LLMs, vaults, and processing services. ```bash # Chat with an LLM casedev llm:v1:chat create-completion \ --model anthropic/claude-sonnet-4.6 \ --message '{"role":"user","content":"Summarize this contract..."}' # Search a vault casedev vault search \ --id vault_abc123 \ --query "termination clauses" # List available models casedev llm:v1 list-models # Run OCR on a document already accessible by URL casedev ocr:v1 process --document-url https://example.com/contract.pdf # Transcribe audio already accessible by URL casedev voice:transcription create --audio-url https://example.com/deposition.mp3 ``` -------------------------------- ### Vault Object Translation Started Event Example Source: https://docs.case.dev/events/event-types A sample JSON payload representing the vault.object.translation.started event. ```json { "id": "evt_01HV8ZK8M7Q9YJ6P5E3P2R1A0B", "type": "vault.object.translation.started", "occurred_at": "2026-04-24T15:12:09.481Z", "data": { "vaultId": "vault_123", "objectId": "object_123", "sourceObjectId": "sourceObject_123", "engine": "engine_value", "sourceLanguage": "sourceLanguage_value", "targetLanguage": "targetLanguage_value", "model": "model_value", "pageCount": 42, "characterCount": 42, "cost": 42, "currency": "usd" } } ``` -------------------------------- ### List installations OpenAPI definition Source: https://docs.case.dev/api-reference/connectors/list-installations The OpenAPI specification for the GET /connectors/v1/installations endpoint, including security requirements and parameter definitions. ```yaml openapi: 3.1.0 info: title: Case.dev API description: >- The AI-native platform for legal technology. Build smarter legal applications with our suite of AI-powered APIs. version: 1.0.0 contact: name: Case.dev Support email: support@casemark.com url: https://case.dev license: name: Proprietary url: https://case.dev/terms servers: - url: https://api.case.dev description: Production security: - bearerAuth: [] tags: - name: Vaults description: Secure document storage with semantic search and GraphRAG - name: Vault Events description: Vault-scoped event subscriptions and delivery testing - name: Vault Memory description: Vault-scoped persistent memory and semantic retrieval - name: Vault Objects description: Vault object management, content access, and document operations - name: Memory description: >- Persistent memory for AI agents with semantic search and 12 generic indexed tag fields - name: OCR description: Extract text from PDFs, images, and scanned documents - name: Voice description: Audio transcription and text-to-speech - name: LLMs description: Access 40+ language models through a unified API - name: Search description: Web search and AI answers - name: Mail description: Managed inboxes for agent email workflows - name: Media description: Transcript retrieval and captioned media clip generation - name: Legal description: Legal research tools including citation verification - name: Privilege description: Privilege detection for e-discovery and litigation workflows - name: Compute description: Serverless GPU and CPU infrastructure - name: Format description: Document formatting and template rendering (MD/JSON to PDF/DOCX) - name: SuperDoc description: Document conversion and template automation - name: Webhooks description: Webhook endpoint management - name: System description: Public system metadata and discovery endpoints - name: Usage description: Usage reporting and webhook subscriptions - name: Database description: Serverless PostgreSQL databases with instant branching - name: Translation description: Language detection and translation for multilingual legal workflows - name: Skills description: Search and read legal AI skills for agents - name: Agents/Linc description: Durable, stateful legal agent sessions with sandboxed tools and files - name: Matters description: Matter-native legal workspaces and orchestration primitives - name: Connectors description: Import and export between provider folders (Google Drive) and vaults - name: Applications Projects description: Web application project management - name: Applications Deployments description: Web application deployment management - name: Applications Domains description: Custom domain configuration for applications - name: Applications Env Vars description: Environment variable management for applications paths: /connectors/v1/installations: get: tags: - Connectors summary: List installations description: List application installations (tenants) in this organization. operationId: listConnectorInstallations parameters: - name: application in: query schema: type: string - name: external_tenant_id in: query schema: type: string responses: '200': description: Installations for the organization '401': description: Invalid API key '403': description: Insufficient permissions components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: API key starting with `sk_case_` ``` -------------------------------- ### POST /compute/v1/instances Source: https://docs.case.dev/api-reference/compute/launch-gpu-instance Launches a new GPU compute instance with automatic SSH key generation. Supports mounting Case.dev Vaults as filesystems. ```APIDOC ## POST /compute/v1/instances ### Description Launches a new GPU compute instance with automatic SSH key generation. Supports mounting Case.dev Vaults as filesystems. Instance boots in ~2-5 minutes. Perfect for batch OCR processing, AI model training, and intensive document analysis workloads. ### Method POST ### Endpoint /compute/v1/instances ### Request Body - **name** (string) - Required - Instance name - **instanceType** (string) - Required - GPU type (e.g., 'gpu_1x_h100_sxm5') - **region** (string) - Required - Region (e.g., 'us-west-1') - **vaultIds** (array) - Optional - Vault IDs to mount ### Request Example { "name": "ocr-batch-job", "instanceType": "gpu_1x_a10", "region": "us-west-1", "vaultIds": [ "vault_abc123" ] } ### Response #### Success Response (201) ``` -------------------------------- ### OpenAPI Specification for API Status Source: https://docs.case.dev/api-reference/system/get-api-status Defines the /index GET endpoint within the OpenAPI 3.1.0 specification, including response schemas and example output. ```yaml openapi: 3.1.0 info: title: Case.dev API description: >- The AI-native platform for legal technology. Build smarter legal applications with our suite of AI-powered APIs. version: 1.0.0 contact: name: Case.dev Support email: support@casemark.com url: https://case.dev license: name: Proprietary url: https://case.dev/terms servers: - url: https://api.case.dev description: Production security: - bearerAuth: [] tags: - name: Vaults description: Secure document storage with semantic search and GraphRAG - name: Vault Events description: Vault-scoped event subscriptions and delivery testing - name: Vault Memory description: Vault-scoped persistent memory and semantic retrieval - name: Vault Objects description: Vault object management, content access, and document operations - name: Memory description: >- Persistent memory for AI agents with semantic search and 12 generic indexed tag fields - name: OCR description: Extract text from PDFs, images, and scanned documents - name: Voice description: Audio transcription and text-to-speech - name: LLMs description: Access 40+ language models through a unified API - name: Search description: Web search and AI answers - name: Mail description: Managed inboxes for agent email workflows - name: Media description: Transcript retrieval and captioned media clip generation - name: Legal description: Legal research tools including citation verification - name: Privilege description: Privilege detection for e-discovery and litigation workflows - name: Compute description: Serverless GPU and CPU infrastructure - name: Format description: Document formatting and template rendering (MD/JSON to PDF/DOCX) - name: SuperDoc description: Document conversion and template automation - name: Webhooks description: Webhook endpoint management - name: System description: Public system metadata and discovery endpoints - name: Usage description: Usage reporting and webhook subscriptions - name: Database description: Serverless PostgreSQL databases with instant branching - name: Translation description: Language detection and translation for multilingual legal workflows - name: Skills description: Search and read legal AI skills for agents - name: Agents/Linc description: Durable, stateful legal agent sessions with sandboxed tools and files - name: Matters description: Matter-native legal workspaces and orchestration primitives - name: Connectors description: Import and export between provider folders (Google Drive) and vaults - name: Applications Projects description: Web application project management - name: Applications Deployments description: Web application deployment management - name: Applications Domains description: Custom domain configuration for applications - name: Applications Env Vars description: Environment variable management for applications paths: /index: get: tags: - System summary: Get API Status description: >- Returns basic information about the Case.dev API including name, version, and health status. This endpoint can be used for health checks and API discovery. operationId: getApiStatus responses: '200': description: API information retrieved successfully content: application/json: schema: type: object properties: name: type: string description: The name of the API version: type: string description: The current API version status: type: string description: The health status of the API required: - name - version - status example: name: case.dev API version: 1.0.0 status: healthy components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: API key starting with `sk_case_` ``` -------------------------------- ### Initialize and use CaseDev client Source: https://docs.case.dev/sdks Synchronous client initialization and basic usage for vault creation and LLM chat completion. ```python from casedev import Casedev client = Casedev( api_key="sk_case_...", environment="production" # or "local" ) # Create a vault vault = client.vault.create( name="My Documents", description="Legal document repository" ) # Chat with an LLM response = client.llm.v1.chat.create_completion( model="anthropic/claude-3-5-sonnet-20241022", messages=[ {"role": "user", "content": "Summarize this contract..."} ] ) print(response.choices[0].message.content) ``` -------------------------------- ### GET /vault/{vault_id}/objects/{object_id}/chunks Source: https://docs.case.dev/vault/chunks Retrieves a list of chunks for a given object within a vault, filtered by a start and end index. ```APIDOC ## GET /vault/{vault_id}/objects/{object_id}/chunks ### Description Retrieves a range of text chunks from a specific object in a vault. ### Method GET ### Endpoint /vault/{vault_id}/objects/{object_id}/chunks ### Parameters #### Path Parameters - **vault_id** (string) - Required - The unique identifier of the vault. - **object_id** (string) - Required - The unique identifier of the object. #### Query Parameters - **start** (integer) - Required - The starting index of the chunks to retrieve. - **end** (integer) - Required - The ending index of the chunks to retrieve. ### Response #### Success Response (200) - **object_id** (string) - The ID of the object. - **vault_id** (string) - The ID of the vault. - **chunks** (array) - A list of chunk objects. - **total_chunks** (integer) - The total number of chunks available for the object. #### Response Example { "object_id": "obj_abc123", "vault_id": "vault_def456", "chunks": [ { "index": 12, "text": "full text of chunk 12...", "page_start": 5, "page_end": 5, "word_start_index": 5544, "word_end_index": 6055 } ], "total_chunks": 42 } ``` -------------------------------- ### GET /skills/{slug}/export Source: https://docs.case.dev/api-reference/skills/export-skill-tree Export a skill as an installable filesystem tree for sandbox runtimes. Authenticated org-scoped custom skills are resolved before curated skills. ```APIDOC ## GET /skills/{slug}/export ### Description Export a skill as an installable filesystem tree for sandbox runtimes. Authenticated org-scoped custom skills are resolved before curated skills. ### Method GET ### Endpoint /skills/{slug}/export ### Parameters #### Path Parameters - **slug** (string) - Required - Skill slug to export #### Query Parameters - **target** (string) - Optional - Agent runtime skill directory convention to export for. Most callers should omit this and pass skillSlugs when creating a runtime. ### Response #### Success Response (200) - **slug** (string) - The skill slug - **target** (string) - The target runtime convention - **root** (string) - The root directory path - **source** (string) - The source type (custom or curated) - **files** (array) - List of files in the skill tree ``` -------------------------------- ### Connect and Mount Vaults Source: https://docs.case.dev/compute/index Transfer the setup script to the instance, connect via SSH, and execute the script to mount vaults. ```bash scp -i ~/.ssh/case_gpu_key /tmp/setup-vaults.sh ubuntu@$IP:~/ ssh -i ~/.ssh/case_gpu_key ubuntu@$IP # On the VM ./setup-vaults.sh ls /mnt/vault/ ``` -------------------------------- ### Initialize and Use TypeScript SDK Source: https://docs.case.dev/sdks Initialize the client with an API key and environment, then perform vault creation and LLM completion tasks. ```typescript import Casedev from 'casedev'; const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY, environment: 'production' // or 'local' for development }); // Create a vault const vault = await client.vault.create({ name: 'My Documents', description: 'Legal document repository' }); // Chat with an LLM const response = await client.llm.v1.chat.createCompletion({ model: 'anthropic/claude-3-5-sonnet-20241022', messages: [ { role: 'user', content: 'Summarize this contract...' } ] }); ``` -------------------------------- ### Compute Usage and Billing Response Example Source: https://docs.case.dev/api-reference/compute/get-compute-usage-and-billing Example JSON response showing usage metrics for a specific period, including a summary and environment-specific breakdowns. ```json example: period: year: 2024 month: 3 monthName: March summary: totalRuns: 47 totalGpuHours: 12.5 totalCpuHours: 3.2 totalCostCents: 4750 totalCostFormatted: $47.50 byEnvironment: - environment: legal-document-processing totalRuns: 35 totalGpuSeconds: 36000 totalCpuSeconds: 7200 totalCostCents: 3200 totalCostFormatted: $32.00 - environment: contract-analysis totalRuns: 12 totalGpuSeconds: 9000 totalCpuSeconds: 4320 totalCostCents: 1550 totalCostFormatted: $15.50 ``` -------------------------------- ### Vault Operations Quick Start Source: https://docs.case.dev/vault/index Demonstrates the end-to-end workflow for creating a vault, uploading a document, ingesting it for processing, and performing a semantic search. ```bash # 1. Create a vault casedev vault create --name "Documents - User 12345" # 2. Upload a document casedev vault upload --id $VAULT_ID \ --filename "contract.pdf" \ --content-type "application/pdf" # 3. Process it casedev vault ingest --id $VAULT_ID --object-id $OBJECT_ID # 4. Search by meaning casedev vault search --id $VAULT_ID --query "termination clauses" ``` ```typescript import Casedev from 'casedev'; const client = new Casedev({ apiKey: process.env.CASEDEV_API_KEY }); // 1. Create a vault for your user const vault = await client.vault.create({ name: 'Documents - User 12345' }); // 2. Upload a document const upload = await client.vault.upload(vault.id, { filename: 'contract.pdf', contentType: 'application/pdf' }); // PUT the file to upload.uploadUrl, then: // 3. Process it (OCR + vectorization) await client.vault.ingest(vault.id, upload.objectId); // 4. Enable your user to search by meaning const results = await client.vault.search(vault.id, { query: userSearchQuery // e.g., "termination clauses" }); console.log(results.chunks[0].text); ``` ```python import casedev client = casedev.Casedev(api_key=os.environ['CASEDEV_API_KEY']) // 1. Create a vault for your user vault = client.vault.create(name='Documents - User 12345') // 2. Upload a document upload = client.vault.upload(vault.id, filename='contract.pdf', content_type='application/pdf' ) // PUT the file to upload.upload_url, then: // 3. Process it (OCR + vectorization) client.vault.ingest(upload.object_id, id=vault.id) // 4. Enable your user to search by meaning results = client.vault.search(vault.id, query=user_search_query # e.g., "termination clauses" ) print(results.chunks[0].text) ``` ```go // 1. Create a vault for your user vault, _ := client.Vault.New(ctx, casedev.VaultNewParams{ Name: casedev.F("Documents - User 12345"), }) // 2. Upload a document upload, _ := client.Vault.Upload(ctx, vault.ID, casedev.VaultUploadParams{ Filename: casedev.F("contract.pdf"), ContentType: casedev.F("application/pdf"), }) // PUT the file to upload.UploadURL via net/http, then: // 3. Process it (OCR + vectorization) client.Vault.Ingest(ctx, vault.ID, upload.ObjectID) // 4. Enable your user to search by meaning results, _ := client.Vault.Search(ctx, vault.ID, casedev.VaultSearchParams{ Query: casedev.F("termination clauses"), }) fmt.Println(results.Chunks[0].Text) ``` -------------------------------- ### voice.transcription.deleted Event Payload Example Source: https://docs.case.dev/events/event-types Example JSON payload for the voice.transcription.deleted event. ```json { "id": "evt_01HV8ZK8M7Q9YJ6P5E3P2R1A0B", "type": "voice.transcription.deleted", "occurred_at": "2026-04-24T15:12:09.481Z", "data": { "jobId": "job_123", "vaultId": "vault_123", "assemblyaiId": "assemblyai_123", "inputObjectId": "inputObject_123", "transcriptId": "transcript_123", "mode": "vault", "providerDeleted": true, "providerAlreadyDeleted": true, "providerDeleteFailed": true, "providerErrorStatusCode": 42, "inputObjectDeleted": true, "resultObjectDeleted": true, "localRecordDeleted": true } } ```