v1

latestOpenAPI 3.1.0MIT2026-07-22172693.3 KB

Generates a Letter of Medical Necessity (LMN) from uploaded procedure notes using AI analysis. The letter can be returned as plain text or as a formatted PDF document based on the output_format parameter.

post/api/generate-letter

Request body

file_contentstring required

Base64 encoded content of the procedure notes file (PDF)

patient_identifierstring required

Unique identifier for the patient

patient_namestring required

Patient's full name

patient_agestring required

Patient's age

facility_namestring required

Name of the medical facility or center

visit_coststring required

Cost of the visit or procedure

provider_emailstring email required

Provider's contact email address

provider_phonestring required

Provider's contact phone number

provider_signaturestring required

Signature line text for the letter

provider_namestring required

Name and credentials of the provider signing the letter

output_format'text' | 'pdf'

Output format for the letter. Defaults to 'text' if not specified.

Example request

{
  "provider_phone": "+1-555-123-4567",
  "provider_name": "Dr. Jane Smith, MD"
}

Response

Letter of Medical Necessity generated successfully

letterstring

The generated Letter of Medical Necessity content in text format. Present when output_format is 'text' or not specified.

fileContentstring

Base64 encoded PDF content of the generated letter. Present when output_format is 'pdf'.

timestampstring date-time

Timestamp when the letter was generated

invoice_coststring

The visit cost associated with the letter generation

patient_identifierstring

The patient identifier associated with the letter