L
Lekhan
Developers
DashboardGet API key
Core resources

Create a document

Generate a structured document from a short intent, or transform pasted content. The response returns a document you can preview and export.

POST/v1/documents

Body parameters

intentstring
A short description of the document you need.
typeenum
proposal · report · audit · pitch · profile …
audiencestring?
Who the document is for.
styleenum?
executive · professional · government · premium

Transform instead

Send raw content to /v1/documents/transform to reshape notes, transcripts, or drafts into the same structured document.

const doc = await lk.documents.create({
  intent: 'Website growth proposal',
  type: 'proposal',
  audience: 'client',
  style: 'executive',
});
Response
{
  "id": "doc_8f2a91",
  "status": "draft",
  "sections": [
    { "id": "sec_1", "title": "Executive Summary" },
    { "id": "sec_2", "title": "Scope" }
  ]
}