ai
POST /v1/ai/images/posts/{postId}
Generate a featured image and in-post images for a content post.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation links.edit ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Où insérer l'ID de votre organisation
Cet endpoint prend org_id comme champ dans le corps JSON.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/ai/images/posts/{postId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
postId (path) | Uuid | Oui | — |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
featured | boolean | Non | — |
inline_count | integer | Non | ⛔ 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. |
style | string | Non | Woven into every prompt — "photographic, no text overlay, muted palette". |
provider | AiImageProvider | string<> | Non | Leave empty to let the platform choose. |
model | string | Non | A specific `model_id` to pin, or empty to follow the provider's default. |
target_locale | string | Non | 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_id | Uuid | Non | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
data | GeneratedImage[] | Oui | — |
unmet | string[] | Non | 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_html | string | Non | The post body with the generated images' placeholders written into it. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422 · 429