Contracts

GA

Contract drafting — 100+ document types behind one endpoint.

Internally wraps: ContractDrafter.draft (shares the app-wide Claude client — not on the dedicated /v1 capacity pool yet)

POST/v1/contracts/draftGA

Contract drafting (100+ document types)

Thin wrapper over the internal ContractDrafter service. `document_type` selects the contract template (e.g. nda, employment_agreement, service_agreement, lease).

Required scope: contracts~4 credit(s)/callSDK: contracts.draft(...)
  • Documented deviation: unlike chat/documents/compliance/corporate/litigation, this endpoint currently shares the app-wide Claude client rather than the dedicated /v1 capacity pool.

Request body

{
  "document_type": "nda",
  "jurisdiction": "US",
  "language": "en",
  "party_a": "Acme Corp",
  "party_b": "Beta LLC",
  "key_terms": {
    "duration": "3 years",
    "governing_law": "Delaware"
  }
}

Response body

{
  "request_id": "req_...",
  "tenant_id": "apikey:usr_123",
  "jurisdiction": "US",
  "document_type": "nda",
  "document_title": "Mutual Non-Disclosure Agreement",
  "preamble": "This Mutual Non-Disclosure Agreement (\"Agreement\") is entered into by and between ...",
  "clauses": [],
  "full_text": "MUTUAL NON-DISCLOSURE AGREEMENT\n\n1. Definition of Confidential Information ...",
  "citations": [],
  "warnings": [],
  "disclaimer": "This document is generated by an AI legal assistant as a starting point only. It must be reviewed and validated by a qualified legal professional before execution."
}
curl -X POST https://cailegal-backend-production-7edb.up.railway.app/v1/contracts/draft \
  -H "Authorization: Bearer cai_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "document_type": "nda",
  "jurisdiction": "US",
  "language": "en",
  "party_a": "Acme Corp",
  "party_b": "Beta LLC",
  "key_terms": {
    "duration": "3 years",
    "governing_law": "Delaware"
  }
}'