ai

POST /v1/ai/recipes

Create an AI posting recipe.

Tất cả các điểm cuối ai

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền links.edit; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

⛔ Bounds are enforced at **authoring** time, not at run time: more than five anchors or more than ten posts per run would be refused on every run, so a recipe saved with them would look fine, sit on a schedule, and fail silently every night. Requires `links.edit` — the same key as writing a post by hand, because that is what this is.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestring
is_enabledbooleanKhông
briefstringKhông
tonestringKhông
word_countintegerKhông
languagestringKhông
posts_per_runintegerKhông
providerstringKhông
model_idstringKhông
model_familystringKhông
anchorsAiAnchor[]Không
anchor_policystring<none, every_post, rotate>Không
link_set_idstringKhôngThe reusable link set this recipe draws its links from, or `null` to use the recipe's own `anchors`. When set it **replaces** `anchors` rather than adding to them — two sources…
cadencestring<manual, daily, weekly, monthly>Không
cadence_hour_utcintegerKhông
cadence_dowintegerKhông
cadence_domintegerKhông
target_kindstring<none, sites, site_group, cms_targets>Không
target_sitesstring[]Không
target_site_group_idobjectKhông
target_cms_target_idsstring[]Không
target_categorystringKhông
requires_capabilitiesstring[]Không
capability_policystring<refuse, degrade, ask>Không
image_providerstringKhông
image_modelstringKhông
featured_imagebooleanKhông
inline_image_countintegerKhông
inline_placementstring<after_intro, between_sections, end>Không
image_stylestringKhông
publish_modestring<draft, schedule, publish>Không
schedule_offset_hoursintegerKhông
schedule_stagger_minutesintegerKhông
org_idUuidKhôngUUIDv7 identifier — sortable by creation time (docs/02 §8).

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestring
is_enabledboolean
briefstringKhông
tonestringKhông
word_countintegerKhông
languagestringKhôngBCP-47, or empty for "the language the brief is written in".
posts_per_runintegerKhông⛔ Capped at 10. Two hundred articles from one brief are two hundred near-identical articles, which is a **footprint** — the exact thing the Footprint-Free line is sold to avoid.
providerstringKhôngBlank = whatever the funding route resolves to.
model_idstringKhôngBlank = the newest verified model in the family.
model_familystringKhông
anchorsAiAnchor[]Không
anchor_policystring<none, every_post, rotate>Không
link_set_idstringKhôngThe reusable link set this recipe draws its links from, or `null` to use the recipe's own `anchors`. When set it **replaces** `anchors` rather than adding to them — two sources…
cadencestring<manual, daily, weekly, monthly>
cadence_hour_utcintegerKhông
cadence_dowintegerKhông0 = Monday.
cadence_domintegerKhông⛔ Never 29-31: a monthly recipe set to the 31st would skip February silently, and a schedule that stops without an error is the failure this feature prevents.
next_run_atobjectKhông
last_run_atobjectKhông
target_kindstring<none, sites, site_group, cms_targets>Không
target_sitesstring[]Không
target_site_group_idobjectKhông
target_cms_target_idsstring[]Không
target_categorystringKhông
requires_capabilitiesstring[]KhôngCapability ids the target must support, e.g. `cms_target:featured_image`. Enforced on every run: each site's capabilities are read from its CMS target and any shortfall is handl…
capability_policystring<refuse, degrade, ask>KhôngWhat to do when a target cannot do something the recipe requires. Default `refuse` — silently dropping a requested field is the failure this exists to stop. `refuse` skips that…
image_providerstringKhông
image_modelstringKhông
featured_imagebooleanKhông
inline_image_countintegerKhông
inline_placementstring<after_intro, between_sections, end>Không
image_stylestringKhông
publish_modestring<draft, schedule, publish>⚖️ Owner ruling 2026-08-20: a **per-recipe** switch defaulting to `draft`. `draft` writes into the library and schedules nothing; `schedule` queues placements the customer can s…
schedule_offset_hoursintegerKhông
schedule_stagger_minutesintegerKhôngMinutes between consecutive posts in one run. ⛔ Not cosmetic: a network whose articles all appear in the same minute is a footprint.
blocking_providersstring[]KhôngProviders this recipe needs a working key for and does not have. Empty means it can run now. ⚖️ A recipe naming no provider is never blocked — credits are the default route and…
created_atstring
updated_atstringKhông

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422 · 429