REST API Reference
Interact programmatically with the Landi generator, editor, and runtime environments. All endpoints require a Bearer token in the Authorization header.
POST /api/generate (onboarder body)
POST /api/generate-page
POST /api/publish
GET /api/sites
GET/PATCH /api/sites/[siteId]/settings
VARIOUS site_pages, forms, collections
VARIOUS assets, canvas-state, import
VARIOUS analyze-compatibility
Generate Site Request
Submit a structured brief to spin up a complete site architecture asynchronously.
curl -X POST https://api.landi.build/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"businessName": "Acme Corp",
"pagesConfig": [
{
"title": "Home",
"description": "Primary landing page focusing on conversion.",
"attachments": []
},
{
"title": "About Us",
"description": "Company history and team overview."
}
],
"referenceAssets": ["https://example.com/logo.png"],
"designConfig": {
"theme": "dark",
"primaryColor": "#3b82f6"
},
"vibeParams": "modern, trustworthy, highly professional",
"migrationConfig": null,
"customUrls": false,
"generationModelId": "claude-3-5-sonnet",
"imageModelId": "dall-e-3",
"usePlaceholderImages": true
}'
Internal Research Access
The internal research endpoints (e.g., scraping deep competitor context before generation) require the INTERNAL_RESEARCH_SECRET header and are strictly server-only. Do not expose this token in client environments.