Generate Document

Endpoint

POST https://api.lawyergptai.cc/v1/generate-document

✅ Purpose

  • Instantly generate legal documents using AI

  • Save time drafting contracts or agreements

  • Tailor documents to specific jurisdictions and languages

  • Automate legal workflows for startups, HR teams, freelancers, and more

Example Request

{
  "api_key": "YOUR_API_KEY",
  "document_type": "non_disclosure_agreement",
  "parties": ["Company A", "Freelancer B"],
  "jurisdiction": "California, USA",
  "custom_clauses": ["Include a non-compete clause for 6 months post-contract."],
  "language": "en",
  "tone": "formal"
}

Response Example

{
  "document_title": "Mutual Non-Disclosure Agreement",
  "generated_document": "This Mutual Non-Disclosure Agreement (the 'Agreement') is entered into as of...",
  "jurisdiction": "California, USA",
  "language": "en",
  "estimated_read_time": "3 minutes"
}

Parameters

Parameter
Type
Required
Description

api_key

string

✅ Yes

Your API key

document_type

string

✅ Yes

Predefined document type or free text

parties

array

✅ Yes

Names of the involved entities or people

jurisdiction

string

❌ Optional

Region for legal compliance (e.g., "California, USA")

custom_clauses

array

❌ Optional

Additional clauses or considerations

language

string

❌ Optional

Language to generate the document in (default: en)

tone

string

❌ Optional

Formality of tone: formal, neutral, friendly

Response Fields

Field
Type
Description

document_title

string

Title of the generated document

generated_document

string

Full legal text of the document

jurisdiction

string

Jurisdiction applied (if any)

language

string

Language the document was written in

estimated_read_time

string

Approximate time to read the generated content

Supported Document Types

Type
Example

non_disclosure_agreement

NDA between a startup and a developer

service_agreement

Contract for software development

employment_contract

Full-time or freelance job contract

terms_of_service

Web platform ToS

privacy_policy

User data protection document

custom_prompt

Any user-defined freeform request

⚙️ Use Cases

  • HR teams auto-generating employment contracts

  • Freelancers creating service agreements on demand

  • Founders generating NDAs during fundraising

  • Platforms automating ToS & Privacy Policy generation

Error Codes

Code
Message
Description

400

Missing required fields

One or more parameters were not provided

403

Invalid API key

The API key is incorrect or unauthorized

422

Unsupported document type

The requested document type is not supported

500

Internal server error

AI engine or document generation failed

Last updated