ai

POST /v1/ai/site-builds

Describe a site and the AI builds it.

Wszystkie punkty końcowe ai

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.create; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

curl -X POST https://api.zinndigital.com/v1/ai/site-builds \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "brief": <string> }'

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Treść żądania

NazwaTypWymaganeCo to jest
briefstringTakWhat the site is for, who it is for, and which pages it needs. A tighter brief produces a better site than a longer one.
providerstringNieForce a provider. Omit for the cheapest route this organization's funding allows, resolved exactly as every other customer-funded AI surface resolves it.
modelstringNieForce a model. Omit to let the resolver choose.

Odpowiedź

NazwaTypWymaganeCo to jest
buildSiteBuildTakOne "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…
trialSiteBuilderTrialNieThe 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…

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 422 · 429