인증
Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 sites.create 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.
이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.
무료 체험하기
대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.
curl -X POST https://api.zinndigital.com/v1/ai/site-builds \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "brief": <string> }'로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요
상세 정보
Accepts a brief and returns the new draft at once, in generating, with no files yet. A durable workflow writes the site — a real multi-page site takes one to three minutes, which no request can hold (D20191) — and the row settles to drafted, or to failed with a reason in error. Poll listSiteBuilds or getSiteBuild to watch it. Nothing is public until publishSiteBuild is called. The model is the cheapest priced one the catalogue has verified for the funding provider unless model names another (§2.45); the choice is recorded on the row. The first build on an organization posts its one-time free allowance before the spend is authorised, so a brand-new customer's first build succeeds rather than being refused and then handed credit they cannot retroactively use. The grant is made one-time by a database constraint, not by application code. Billed on actual token usage against the ordinary AI credit balance, or against the customer's own provider key when they have one — the same one meter every other AI surface uses. Refuses rather than truncating: a site that overran the size cap, that named an unusable file path, or that came back without a home page is reported as a 422 with a reason, because a half-written site that renders is worse than none — the customer would publish it. Requires sites.create, which is a stronger authority than reading a draft needs: this call spends the organization's money.
요청 본문
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
brief | string | 예 | What the site is for, who it is for, and which pages it needs. A tighter brief produces a better site than a longer one. |
provider | string | 아니요 | Force a provider. Omit for the cheapest route this organization's funding allows, resolved exactly as every other customer-funded AI surface resolves it. |
model | string | 아니요 | Force a model. Omit to let the resolver choose. |
응답
| 이름 | 유형 | 필수 | 설명 |
|---|---|---|---|
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 hundred… |
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 · 422 · 429