# Create a website with AI

`POST /service/@id/builder/sites` · TinoPage Builder, service owner's sign-in token

JSON body `{intake}`: the AI picks a template and writes the content from the business details. HTTP 202: creation runs in the background for 1–5 minutes; poll [Website creation progress](/en/docs/api/builder-get-site-creation) until `state` is `done` (`site_id` is the new website) or `failed`. One creation per account at a time: 409 `CREATION_IN_PROGRESS`; no websites left: 409 `LIMIT_EXCEEDED` (`details.key: sites`); missing or invalid fields: 422 `VALIDATION_FAILED` per `intake.<field>`; AI paused: 503 `AI_UNAVAILABLE`.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/service/@id/builder/sites` |
| Method | `POST` |
| Authentication | the TinoPage Builder service owner's sign-in token (`Authorization: Bearer <token>`); the `/v1` gateway does not expose TinoPage Builder yet |
| Content-Type | `application/json` |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | TinoPage Builder service ID |
| `intake` | body | object | yes | Business details the AI uses to pick a template and write the content: `business_name`, `industry`, `phone` required; `address`, `city`, `services`, `hours`, `zalo`, `email` optional; maximum lengths in [Getting started with TinoPage Builder](/en/docs/builder-start#create-a-website-with-ai) |
| `idempotency_key` | body | string | no | 8–64 characters `A-Za-z0-9._:-`: resending the same key and content returns the earlier result instead of running again |

## Example request

```bash
curl -X POST "https://api.tino.vn/service/100003/builder/sites" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "intake": {
    "business_name": "Tiệm bánh Hoa Mai",
    "industry": "tiệm bánh",
    "phone": "0900000000",
    "city": "Thành phố Hồ Chí Minh",
    "services": "bánh sinh nhật, bánh mì"
  },
  "idempotency_key": "tao-website-0001"
}'
```

`$TINO_TOKEN` is the TinoPage Builder service owner's sign-in token. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): no dedicated function yet, use `client.request("POST", "/service/@id/builder/sites")`.

## Example response

```json
{
 "data": {
  "state": "running",
  "site_id": null,
  "message": null,
  "started_at": "2026-10-26T02:00:00Z",
  "finished_at": null
 }
}
```

Sample built from the TinoPage Builder API (Tino relays the answer as is inside `data`); values are examples.
