REST API Documentation
Interact programmatically with the Landi platform to trigger site generation, manage files, and execute research jobs.
POST /api/generate
Triggers the primary SITE_PAGE_GENERATOR_WORKFLOW. Acts as the onboarder body.
cURL Example
curl -X POST https://api.landi.build/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"businessName": "Acme Corp",
"pagesConfig": [
{
"title": "Home",
"description": "Main landing page explaining Acme products",
"attachments": []
}
],
"referenceAssets": ["url1", "url2"],
"designConfig": { "theme": "dark", "primaryColor": "#2563eb" },
"vibeParams": "Professional, modern, bold typography",
"migrationConfig": null,
"customUrls": {},
"generationModelId": "claude-3-opus",
"imageModelId": "dall-e-3",
"usePlaceholderImages": false
}'
GET/PATCH /api/sites/[siteId]/settings
Retrieve or update global site configurations (domains, scripts, forms wiring).
Additional Validated Routes
-
site_pagesManage route structure -
forms / collectionsCRUD for dynamic data -
assets / canvas-stateMedia and spatial state -
analyze-compatibility / importext-01 site import pipeline
Security Warning
The INTERNAL_RESEARCH_SECRET is restricted to server-to-server calls only. Never expose this token in client-side code or Canvas Studio requests.