ai
POST /v1/ai/recipes/{recipeId}/run
Queue an AI posting recipe to run now.
प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग links.edit अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
यो इन्डपोइन्टले कुनै संस्थाको आइडी लिँदैन। तपाईंको कुञ्जीले यस अन्तर्गत पर्ने संस्थालाई पहिल्यै पहिचान गर्छ, र प्रतिक्रिया त्यसैमा सीमित हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/ai/recipes/{recipeId}/run \
-H "Authorization: Bearer zdk_live_…"लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ 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 | हुन्छ | — |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
recipe_id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
trigger | string<manual, schedule> | हुन्छ | — |
state | string<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_at | object | हैन | — |
finished_at | object | हैन | — |
posts_created | integer | हैन | — |
post_ids | string[] | हैन | — |
anchor_warnings | string[] | हैन | 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. |
funding | string | हैन | Who paid. byo means the article was written on the customer's own key and we charged nothing. |
model | string | हैन | — |
workflow_id | string | हैन | The durable execution, when there is one. |
error_code | string | हैन | 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)… |
error | string | हैन | 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… |
created_at | string | हुन्छ | — |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 404 · 422 · 429