API Documentation
Generate websites programmatically with our REST API.
Quick Start
All API requests require an API key. You can generate one from your dashboard. Include it in the Authorization header of every request.
curl -X POST https://aiwebsitebuilder.startupitsolution.in/api/v2/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a landing page for a coffee shop",
"template": "modern",
"pages": 1
}'
Authentication
We use Bearer token authentication. Pass your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Endpoints
/api/v2/generate
Generate a new website from a text prompt.
Parameters:
prompt(required) — Natural language description of the websitetemplate(optional) — Template style: modern, minimal, corporate, creativepages(optional) — Number of pages to generate (default: 1, max: 10)
// Response 200
{
"status": "success",
"project_id": 12345,
"preview_url": "https://aiwebsitebuilder.startupitsolution.in/preview/12345",
"credits_remaining": 95
}
/api/v2/projects/{id}
Retrieve details of a generated project including files and preview URL.
/api/v2/projects
List all your generated projects with pagination support.
/api/v2/projects/{id}/export
Download a project as a ZIP file. Supports optional ?format=wordpress query parameter.
Rate Limits
API requests are rate-limited based on your subscription plan:
| Plan | Requests / min | Requests / day |
|---|---|---|
| Free | 10 | 100 |
| Starter | 30 | 500 |
| Pro | 60 | 2,000 |
| Enterprise | Unlimited | Unlimited |
Error Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request — invalid parameters |
401 | Unauthorized — invalid or missing API key |
402 | Payment Required — insufficient credits |
429 | Too Many Requests — rate limit exceeded |
500 | Internal Server Error |
Need help? Contact our team or check out the Webhooks guide.