ai

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

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

Tất cả các điểm cuối ai

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền links.edit; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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

Tham số

TênLoạiBắt buộcNội dung này là gì
postId (path)Uuid

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
featuredbooleanKhông
inline_countintegerKhông⛔ 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.
stylestringKhôngWoven into every prompt — "photographic, no text overlay, muted palette".
providerAiImageProvider | string<>KhôngLeave empty to let the platform choose.
modelstringKhôngA specific `model_id` to pin, or empty to follow the provider's default.
target_localestringKhôngThe language the post will be published in, so alt text is localised to the **site** rather than to the dashboard's UI locale.
org_idUuidKhôngUUIDv7 identifier — sortable by creation time (docs/02 §8).

Phản hồi

TênLoạiBắt buộcNội dung này là gì
dataGeneratedImage[]
unmetstring[]KhôngWhat 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_htmlstringKhôngThe post body with the generated images' placeholders written into it.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 422 · 429