ai

POST /v1/ai/recipes/{recipeId}/run

Queue an AI posting recipe to run now.

모든 ai 엔드포인트

인증

Bearer 토큰으로 API 키를 전송하세요. 키는 반드시 links.edit 권한을 가지고 있어야 하며, 권한이 없는 키는 404가 아닌 403으로 거부됩니다.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

curl -X POST https://api.zinndigital.com/v1/ai/recipes/{recipeId}/run \
  -H "Authorization: Bearer zdk_live_…"

로그인하셨나요? 대시보드의 API 콘솔이 실제 조직 ID와 본인의 키를 자동으로 채우고 라이브 API를 대상으로 요청을 실행하므로 실제 응답을 확인할 수 있습니다. API 콘솔에서 이 엔드포인트를 여세요

상세 정보

**Returns as soon as the run is recorded — it does not wait for the article.** Writing takes longer than an HTTP request may live: the dashboard aborts at 20s and the engine's own worker timeout is 30s, so a synchronous run was killed mid-call every time. The response carries a run whose `state` is `queued`; poll `GET /v1/ai/recipes/{recipeId}/runs` until it reaches `succeeded`, `partial` or `failed`. A queued run normally starts within two minutes. The work then happens on the customer's own key when they have one, on Zinn® AI credits otherwise — **one meter either way** (owner directive D4). What happens after the drafts exist is the recipe's `publish_mode`, which defaults to `draft`: nothing is scheduled or published unless the customer turned that on for that recipe. A `422` means nothing was queued and nothing was charged — funding is checked before the run is recorded, so an unaffordable run is refused here rather than failing later. Requires `links.edit`.

매개변수

이름유형필수설명
recipeId (path)Uuid

응답

이름유형필수설명
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
recipe_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
triggerstring<manual, schedule>
statestring<queued, running, succeeded, partial, failed>⛔ `partial` is a real state, not a rounding of failure: some posts were written and a later step failed. Telling the customer the run failed would make them run it again and pay…
started_atobject아니요
finished_atobject아니요
posts_createdinteger아니요
post_idsstring[]아니요
anchor_warningsstring[]아니요Anchors the model did not place verbatim, aggregated across the run so the customer sees it once instead of opening ten drafts to find out.
fundingstring아니요Who paid. `byo` means the article was written on the customer's own key and we charged nothing.
modelstring아니요
workflow_idstring아니요The durable execution, when there is one.
error_codestring아니요A stable machine code for what went wrong, empty on a clean run. ⛔ Set on a `partial` run as well as a `failed` one — `no_target_sites` (the recipe schedules but names no site)…
errorstring아니요The engine's own English sentence, for a code a client does not recognise. ⛔ A client SHOULD render its own translated copy from `error_code` and fall back to this only for an u…
created_atstring

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422 · 429