ai
POST /v1/ai/site-builds/{siteBuildId}/rebuild
Build the site again from its brief, optionally tweaked.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение sites.create; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/ai/site-builds/{siteBuildId}/rebuild \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Runs the builder again on this draft's stored brief. Send `brief` to change it first; omit it to rebuild from exactly what was asked for before. Like `createSiteBuild`, the new draft is returned in `generating` and settles through the same workflow. **A rebuild creates a NEW draft and never edits this one.** The original keeps its files, its cost and — if it was published — its live URL, because the customer paid for it and may be about to decide they preferred it. The new draft records `rebuilt_from` so a screen can show the lineage. It costs exactly what a first build costs and is metered identically; there is no discount for reusing the brief, because the model does the same work. Requires `sites.create` — the same authority as building the first one, and a stronger one than reading a draft, because this spends money.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
siteBuildId (path) | Uuid | Да | — |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
brief | string | Нет | The tweaked description. Omit to rebuild from the brief already stored. An empty string is refused rather than treated as "no brief". |
provider | string | Нет | — |
model | string | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
build | SiteBuild | Да | One "describe a site and we build it" run. `files` is present on the **detail** and create responses and absent from the **list**, deliberately: a generated tree can be a hundre… |
trial | SiteBuilderTrial | Нет | The **one-time** free allowance for the AI site builder. One grant per organization, for ever — not monthly, and not per site. `granted` is true because the credit was actually… |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 422 · 429