Developers

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

POST /api/v2/generate

Generate a new website from a text prompt.

Parameters:

  • prompt (required) — Natural language description of the website
  • template (optional) — Template style: modern, minimal, corporate, creative
  • pages (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
}
GET /api/v2/projects/{id}

Retrieve details of a generated project including files and preview URL.

GET /api/v2/projects

List all your generated projects with pagination support.

GET /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
Free10100
Starter30500
Pro602,000
EnterpriseUnlimitedUnlimited

Error Codes

Code Description
200Success
400Bad Request — invalid parameters
401Unauthorized — invalid or missing API key
402Payment Required — insufficient credits
429Too Many Requests — rate limit exceeded
500Internal Server Error

SDKs & Libraries

Official SDKs are available for popular languages:

PHP JavaScript Python Ruby

Need help? Contact our team or check out the Webhooks guide.