ai

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

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

Všechny koncové body ai

Všechny dokumenty pro vývojáře

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění links.edit; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Sem patří ID vaší organizace

Tento koncový bod přijímá org_id jako pole v těle JSON.

ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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.

Parametry

NázevTypPožadovánoCo to je
postId (path)UuidAno

Tělo požadavku

NázevTypPožadovánoCo to je
featuredbooleanNe
inline_countintegerNe⛔ 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.
stylestringNeWoven into every prompt — "photographic, no text overlay, muted palette".
providerAiImageProvider | string<>NeLeave empty to let the platform choose.
modelstringNeA specific model_id to pin, or empty to follow the provider's default.
target_localestringNeThe language the post will be published in, so alt text is localised to the site rather than to the dashboard's UI locale.
org_idUuidNeUUIDv7 identifier — sortable by creation time (docs/02 §8).

Odpověď

NázevTypPožadovánoCo to je
dataGeneratedImage[]Ano
unmetstring[]NeWhat 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…
body_htmlstringNeThe post body with the generated images' placeholders written into it.

Chyby, které může tento koncový bod vrátit

401 · 403 · 404 · 422 · 429