REST API & Webhooks
Deeply embed Nirmaanly's Generation capabilities natively into your own SaaS, internal portals, or CI/CD pipelines.
Global Authentication
Every request must include your Secret API Key in the `Authorization` header as a Bearer token. Go to your Dashboard Settings > Developer API to provision a fresh token.
HTTP HEADER
Authorization: Bearer nrmn_live_aB3x9sL9102mkZ...POST
https://api.nirmaanly.com/v1/projects/generateAsynchronously fires an AI build pipeline. The endpoint returns a 202 Accepted instantly along with a `job_id`. You can use this ID to poll the status or await your configured Webhook.
Request Body Schema
{
"prompt": "Create a minimal portfolio for an architect with a dark theme.",
"agent_id": "optional_custom_agent_hash",
"framework": "nextjs",
"webhook_url": "https://api.yourapp.com/nirmaanly/callback"
}Webhooks & Events
Rather than polling the `GET /projects/:id` endpoint continuously, provide a `webhook_url` in your build request. Nirmaanly will POST a payload to your server immediately upon successful compilation or failure.
WEBHOOK PAYLOAD
{
"event": "project.build.completed",
"project_id": "prj_9x81mK",
"url": "https://random-architect.nirmaanly.app",
"export_download_url": "https://api.nirmaanly.com/v1/download/prj_9x81mK.zip"
}