---
title: "Create a website with AI-generated content"
method: POST
path: "/v1/hosting/ai-website"
tags: ["Section Based AI"]
---

# Create a website with AI-generated content

`POST /v1/hosting/ai-website`

## Request

- Base URL: `https://api.10web.io`
- URL: `https://api.10web.io/v1/hosting/ai-website`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/10web/apis/10web-api-v1/docs/v1/hosting/ai-website/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new website and automatically generates AI-powered content for it in a single operation.
This endpoint combines website creation with AI site generation, providing a streamlined
workflow for creating fully functional websites with AI-generated content.

On completion, emits `website_generation_completed` with `generation_flow: create_website`
(or `create_website_dedicated_vm` for dedicated-VM accounts).

## Headers

- `x-api-key` string, required

## Request body

- CreateAIWebsiteRequest
  - `subdomain` string, required: Subdomain for the website (3-63 characters, lowercase letters, numbers, and hyphens only)
  - `region` string, required: Region of the website
  - `site_title` string, required: Title of the website
  - `admin_username` string, required: Admin username for the website (max 60 characters, can contain alphanumeric characters, space, _, ., -, *, @)
  - `admin_password` string, required: Admin password for the website (must contain 1 lowercase, 1 uppercase, 1 digit, minimum 8 chars)
  - `is_trial` 0 | 1: Specifies if this website is a trial (0 = regular website, 1 = trial website). Legacy alias `is_demo` is still accepted temporarily and mapped to `is_trial`. With `b2b_trial_limitations`, max trial sites = `b2b_trial_website_create_limit_hard` (legacy fallback: `demo_website_count`). Trial sites do not consume paid slots.
  - `trial_website_delete_after_days` integer: Optional. Number of days after which a trial website will be deleted (only applicable when is_trial = 1). Default is 3. Maximum is enforced by Core using the plan `b2b_trial_period_days` parameter (values above the plan max are clamped). Legacy alias `demo_domain_delete_after_days` is still accepted temporarily.
  - `business_type` string, required: Type of business for AI content generation
  - `business_name` string, required: Name of the business for AI content generation
  - `business_description` string, required: Description of the business for AI content generation

## Response `200`

Website created and AI content generated successfully

- AIWebsiteResponse
  - `website_id` integer: The ID of the created website
  - `website_url` string, nullable: The URL of the website with generated AI content
  - `error` string, nullable: Error message if AI generation failed (website still created successfully)

## Other responses

- `400`: Bad request
- `403`: Unauthorized access
- `429`: Too many requests
- `500`: Something went wrong

---

[API](https://skmtc.dev/10web/apis/10web-api-v1.md) - [All operations](https://skmtc.dev/10web/apis/10web-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/10web/apis/10web-api-v1/revisions/01afc9651dfc?raw)
