ai

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

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

Lahat ng ai endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na links.edit; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Ang endpoint na ito ay kumukuha ng org_id bilang isang field sa JSON body.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

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`.

Mga Parameter

PangalanUriKailanganAno ito
postId (path)UuidOo

Katawan ng kahilingan

PangalanUriKailanganAno ito
featuredbooleanHindi
inline_countintegerHindi⛔ 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.
stylestringHindiWoven into every prompt — "photographic, no text overlay, muted palette".
providerAiImageProvider | string<>HindiLeave empty to let the platform choose.
modelstringHindiA specific `model_id` to pin, or empty to follow the provider's default.
target_localestringHindiThe language the post will be published in, so alt text is localised to the **site** rather than to the dashboard's UI locale.
org_idUuidHindiUUIDv7 identifier — sortable by creation time (docs/02 §8).

Tugon

PangalanUriKailanganAno ito
dataGeneratedImage[]Oo
unmetstring[]HindiWhat 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_htmlstringHindiThe post body with the generated images' placeholders written into it.

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 422 · 429