ai

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

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

Semua titik akhir ai

Pengesahan

Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran links.edit; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

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

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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

Parameter

NamaJenisDiperlukanApakah ia
postId (path)UuidYa

Badan permintaan

NamaJenisDiperlukanApakah ia
featuredbooleanTidak
inline_countintegerTidak⛔ 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.
stylestringTidakWoven into every prompt — "photographic, no text overlay, muted palette".
providerAiImageProvider | string<>TidakLeave empty to let the platform choose.
modelstringTidakA specific `model_id` to pin, or empty to follow the provider's default.
target_localestringTidakThe language the post will be published in, so alt text is localised to the **site** rather than to the dashboard's UI locale.
org_idUuidTidakUUIDv7 identifier — sortable by creation time (docs/02 §8).

Respons

NamaJenisDiperlukanApakah ia
dataGeneratedImage[]Ya
unmetstring[]TidakWhat 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_htmlstringTidakThe post body with the generated images' placeholders written into it.

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 404 · 422 · 429