Developer Portal & Docs

Integrate Dockase's automated legal reasoning into your applications or connect directly to AI clients.

Get Your API Key

Dockase APIs require authentication via a secret key. Sign up for a free developer account to obtain your key and start developing custom legal solutions.

Developer API Plans: The subscriptions and quotas described here are dedicated to developers building integrations or utilizing the MCP connector. If you are a legal practitioner wanting to use the main Dockase web workspace or firm dashboard, please check the standard Dockase Subscription Plans.

Interactive API & MCP Reference

Select an integration standard below to view setup and documentation details.

Model Context Protocol (MCP) Integration

Dockase implements the industry-standard Model Context Protocol (MCP). This allows LLMs (like Anthropic Claude, Google Gemini, or Meta Llama) to act as legal agents. By connecting the Dockase MCP server, your LLM client gains direct, secure tool-calling access to our case database, precedents database, contract review engine, and drafting tools.

Claude Desktop Setup

To add the Dockase litigation suite to your Claude Desktop application, configure the stdio MCP server. Add this configuration to your local config file:

{
  "mcpServers": {
    "dockase-litigation": {
      "command": "python",
      "args": [
        "python_mcp_server.py"
      ],
      "env": {
        "DOCKASE_API_KEY": "dk_YOUR_API_KEY_HERE",
        "DOCKASE_GATEWAY_URL": "https://dockase.com"
      }
    }
  }
}

Windows Config Path: %APPDATA%\Claude\claude_desktop_config.json

macOS Config Path: ~/Library/Application Support/Claude/claude_desktop_config.json

Standard Client Gateway

The stdio MCP server runs locally as a bridge. It parses JSON-RPC tool schemas and calls, forwarding them to the Dockase API gateway which executes the legal search, vector retrieval, and citation guardrails.

To test locally or set up custom agents, download the public python package or clone the connector repository:

git clone https://github.com/dockase/mcp-connector
Ensure python 3.8+ is installed on your client machine before configuring.
Exposed MCP Tools (11 Tools)

These tools are declared dynamically by the MCP Server on startup. The connected AI model determines which tool to execute based on user requests.

Tool Name Arguments Schema Functionality
dockase_query { "query": str } Research a specific legal question or principle under Nigerian law.
dockase_search_judgments { "query": str, "limit": int? } Semantic vector search (RAG) to find precedents/cases matching a fact pattern.
dockase_analyze_contract { "contract_text": str, "analysis_focus": str? } Performs senior-counsel-level legal risk analysis on contract clauses.
dockase_draft { "document_type": str, "key_facts": str, "template_context": str? } Draft an individual agreement, NDA, contract of sale, or pleading motion.
dockase_deep_research { "fact_pattern": str } Trigger the deep multi-step agent research flow to analyze complex factual situations.
dockase_chat { "message": str, "conversation_history": list?, "thread_id": str? } Chat directly with the Amicus assistant agent with system-level context.
dockase_validate_citations { "text": str } Validate court citations against the Amicus Electronic Law Report (ALR) database and flag unverified citations for lawyer review.
dockase_similar_judgments { "judgment_id": int, "limit": int? } Retrieve related case judgments by database ID based on semantic distance.
dockase_draft_multi { "document_set_key": str, "key_facts": str, ... } Draft structured bundles (e.g. motion_pack: Motion + Affidavit + Address).
dockase_tag_case { "description": str, "case_name": str? } Auto-generate practice area tags (e.g., Land Law, Family Law) from case descriptions.
dockase_verify_citation_by_name { "case_name": str, "limit": int? } Verify a case name against the Amicus Electronic Law Report (ALR) database.

1. Research Query API

curl -X POST https://dockase.com/v1/query \
  -H "Authorization: Bearer dk_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"query": "Trespass to land elements in Nigeria"}'

2. Judgment Search API

curl -X POST https://dockase.com/v1/judgments/search \
  -H "Authorization: Bearer dk_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"query": "fair hearing in election petition", "limit": 5}'

3. Amicus Embedding API (amicus-embed-ng-v1)

curl -X POST https://dockase.com/v1/embeddings \
  -H "Authorization: Bearer dk_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"input": ["trespass to land", "landmark cases"], "model": "amicus-embed-ng-v1"}'
Quickstart shows common examples only. Switch to the Endpoints Reference tab for the full list of available developer gateway endpoints.

1. Research Query API

import requests
res = requests.post("https://dockase.com/v1/query", 
    headers={"Authorization": "Bearer dk_YOUR_API_KEY_HERE"},
    json={"query": "Trespass to land elements in Nigeria"}
)
print(res.json()["response"])

2. Judgment Search API

import requests
res = requests.post("https://dockase.com/v1/judgments/search", 
    headers={"Authorization": "Bearer dk_YOUR_API_KEY_HERE"},
    json={"query": "fair hearing in election petition", "limit": 5}
)
for j in res.json().get("results", []):
    print(f"{j['case_name']} - {j['citation']}")

3. Amicus Embedding API (amicus-embed-ng-v1)

import requests
res = requests.post("https://dockase.com/v1/embeddings", 
    headers={"Authorization": "Bearer dk_YOUR_API_KEY_HERE"},
    json={"input": ["precedent text to embed"], "model": "amicus-embed-ng-v1"}
)
embeddings = [item["embedding"] for item in res.json()["data"]]
print(f"Generated {len(embeddings)} embedding vectors.")
Quickstart shows common examples only. Switch to the Endpoints Reference tab for the full list of available developer gateway endpoints.

1. Research Query API

const queryDockase = async () => {
  const res = await fetch("https://dockase.com/v1/query", {
    method: "POST",
    headers: {"Authorization": "Bearer dk_YOUR_API_KEY_HERE", "Content-Type": "application/json"},
    body: JSON.stringify({ query: "Trespass to land" })
  });
  console.log((await res.json()).response);
};

2. Judgment Search API

const searchJudgments = async () => {
  const res = await fetch("https://dockase.com/v1/judgments/search", {
    method: "POST",
    headers: {"Authorization": "Bearer dk_YOUR_API_KEY_HERE", "Content-Type": "application/json"},
    body: JSON.stringify({ query: "fair hearing in election petition", limit: 5 })
  });
  console.log((await res.json()).results);
};

3. Amicus Embedding API (amicus-embed-ng-v1)

const embedDockase = async () => {
  const res = await fetch("https://dockase.com/v1/embeddings", {
    method: "POST",
    headers: {"Authorization": "Bearer dk_YOUR_API_KEY_HERE", "Content-Type": "application/json"},
    body: JSON.stringify({ input: ["text to embed"], model: "amicus-embed-ng-v1" })
  });
  console.log((await res.json()).data);
};
Quickstart shows common examples only. Switch to the Endpoints Reference tab for the full list of available developer gateway endpoints.

amicus-embed-ng-v1

A private, legal-domain embedding model trained and optimized for Commonwealth case law, statutes, and legal briefs. It outputs dense 768-dimensional vectors tuned for legal semantic retrieval.

  • Model ID: amicus-embed-ng-v1
  • Dimensions: 768
  • Input: String or list of strings
  • Output: OpenAI-compatible JSON

Token Pricing & Quotas

Plan Monthly Tokens Overage
Free 200,000 Not available
Pro 100,000,000 ₦375 / 1M tokens
Enterprise 500,000,000 ₦300 / 1M tokens

Overage is accumulated and charged automatically in ₦5,000 blocks to the card on file. If a charge fails, the API key is suspended to prevent runaway costs.

Drop-in OpenAI SDK Example

from openai import OpenAI

client = OpenAI(
    api_key="dk_YOUR_API_KEY_HERE",
    base_url="https://dockase.com"
)

res = client.embeddings.create(
    model="amicus-embed-ng-v1",
    input=["trespass to land in Nigeria", "elements of fair hearing"]
)

for item in res.data:
    print(item.embedding[:5], "...")

Raw cURL Example

curl -X POST https://dockase.com/v1/embeddings \
  -H "Authorization: Bearer dk_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "input": ["trespass to land in Nigeria", "elements of fair hearing"],
    "model": "amicus-embed-ng-v1"
  }'

REST API Endpoints Reference

Below is the list of active developer gateway endpoints. All requests must carry the Authorization: Bearer <key> header.

Method & Path Request Body / Args Description
POST /v1/query { "query": str } Run a legal research query using our main reasoning pipelines.
POST /v1/embeddings { "input": str|list, "model": str? } Generate high-fidelity legal embeddings using the private fine-tuned `amicus-embed-ng-v1` model (768 dimensions). Billed per million tokens.
POST /v1/judgments/search { "query": str, "limit": int? } Semantic vector search against our judgments compendium.
POST /v1/contract/analyze { "contract_text": str, "analysis_focus": str? } AI-driven contract risk review and recommendations report.
POST /v1/citations/validate { "text": str } Validate legal citations against the Amicus Electronic Law Report (ALR) database and flag unverified citations for lawyer review.
POST /v1/cases/tag { "description": str, "case_name": str? } Extract relevant legal practice areas and tags from a description.
POST /v1/citations/verify-by-name { "case_name": str, "limit": int? } Verify a case name against the Amicus Electronic Law Report (ALR) database.
POST /v1/draft { "document_type": str, "key_facts": str, ... } Draft an individual legal document from facts and instructions.
POST /v1/deep_research { "fact_pattern": str } Run an in-depth multi-step research pipeline on complex factual situations.
POST /v1/chat { "message": str, "conversation_history": list?, "thread_id": str? } Chat with the Amicus legal assistant agent.
POST /v1/judgments/similar { "judgment_id": int, "limit": int? } Find semantically related precedents for a known judgment ID.
POST /v1/draft/multi { "document_set_key": str, "key_facts": str } Draft motion packs, defense packs, or originating packs.

amicus-embed-ng-v1 Model Benchmarks

Evaluating the domain-adapted embedding model against generic commercial and open-source embedding models. Benchmark queries cover Supreme Court & Court of Appeal precedents, statutory citations, and legal maxims.

Evaluation Metric OpenAI text-embedding-3-small Cohere Embed-English-v3 Amicus Embedder (v1)
Legal Search Accuracy (NDCG@10) 71.2% 78.4% 94.8%
Citation Alignment (Recall@5) 64.5% 73.1% 92.3%
Statutory Mapping Precision 59.8% 70.5% 88.6%
Retrieval Latency (Inference) ~45ms ~35ms < 20ms
Vector Dimensions (Compressed) 1536 1024 768 (Matryoshka)

Methodology: We evaluate models against a validation split of 1,200 curated expert-annotated query-judgment pairs drawn from the Commonwealth Supreme Court precedents corpus.

* NDCG@10 (Normalized Discounted Cumulative Gain): Evaluates whether the most authoritative judgments are retrieved in the top 10 results.

* Statutory Mapping: Assesses the model's ability to map natural language facts (e.g. "stealing a cow at night") to corresponding sections of the Criminal/Penal Code.

Ready to connect your AI models to Dockase?

Create a developer account in under a minute. No credit card required to start building on the free tier.