ai

POST /v1/ai/images/posts/{postId}

Generate a featured image and in-post images for a content post.

Всички крайни точки в ai

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението links.edit; ключ без него се отхвърля с 403, а не с 404.

Където отива идентификаторът на вашата организация

Този краен пункт приема org_id като поле в JSON тялото.

ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/ai/images/posts/{postId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

Generates the images **and writes the `<img>` placeholders into the post body**, in one transaction. ⛔ Those are deliberately not two endpoints: one that generated images and left the body alone would produce rows in a table, nothing on a page, and a dashboard reporting success. Alt text is generated and stored in the source language and **localised to the destination site's language when the post is published** (§2.19) — one post goes to many sites, so the language is a property of the site, not of the draft. The response carries `unmet`: anything the chosen provider could not honour, in words for the customer. Nothing is silently dropped. Requires `links.edit`.

Параметри

ИмеТипЗадължителноКакво представлява
postId (path)UuidДа

Тяло на заявката

ИмеТипЗадължителноКакво представлява
featuredbooleanНе
inline_countintegerНе⛔ Bounded at 4. A hundred near-identical stock-looking images across a network **is a footprint**, which is the one thing the Footprint-Free line exists to avoid.
stylestringНеWoven into every prompt — "photographic, no text overlay, muted palette".
providerAiImageProvider | string<>НеLeave empty to let the platform choose.
modelstringНеA specific `model_id` to pin, or empty to follow the provider's default.
target_localestringНеThe language the post will be published in, so alt text is localised to the **site** rather than to the dashboard's UI locale.
org_idUuidНеUUIDv7 identifier — sortable by creation time (docs/02 §8).

Отговор

ИмеТипЗадължителноКакво представлява
dataGeneratedImage[]Да
unmetstring[]НеWhat the chosen provider could not honour, in words for the customer. ⛔ Present and empty rather than absent when everything was honoured, so a client can tell "nothing was drop…
body_htmlstringНеThe post body with the generated images' placeholders written into it.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429