ai
POST /v1/ai/images/posts/{postId}
Generate a featured image and in-post images for a content post.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso links.edit; una clave que no lo tenga se rechazará con un código 403, no 404.
Donde va el ID de tu organización
Este endpoint toma org_id como un campo en el cuerpo JSON.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X POST https://api.zinndigital.com/v1/ai/images/posts/{postId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
postId (path) | Uuid | Sí | — |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
featured | boolean | No | — |
inline_count | integer | No | ⛔ 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 | No | Woven into every prompt — "photographic, no text overlay, muted palette". |
provider | AiImageProvider | string<> | No | Leave empty to let the platform choose. |
model | string | No | A specific `model_id` to pin, or empty to follow the provider's default. |
target_locale | string | No | 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 | No | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
data | GeneratedImage[] | Sí | — |
unmet | string[] | No | 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 | No | The post body with the generated images' placeholders written into it. |
Errores que este endpoint puede devolver
401 · 403 · 404 · 422 · 429