ai
POST /v1/ai/images/posts/{postId}
Generate a featured image and in-post images for a content post.
ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ
បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ links.edit។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។
កន្លែងដែលលេខសម្គាល់អង្គការរបស់អ្នកត្រូវដាក់
ចំនុចបញ្ចប់នេះទទួលយក org_id ជាវាលមួយនៅក្នុងតួ JSON។
លេខសម្គាល់អង្គការរបស់អ្នកស្ថិតនៅលើអេក្រង់គ្រាប់ចុច API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក នៅជាប់នឹងគ្រាប់ចុចផ្ទាល់តែម្ដង។ វាគឺជាលេខសម្គាល់ដូចគ្នានៅក្នុងការហៅទូរសព្ទនីមួយៗដែលអ្នកធ្វើ។
សាកល្បង
ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។
curl -X POST https://api.zinndigital.com/v1/ai/images/posts/{postId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API
ព័ត៌មានលម្អិត
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`.
ប៉ារ៉ាម៉ែត្រ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
postId (path) | Uuid | បាទ/ចាស | — |
សំណើរបស់រាងកាយ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
featured | boolean | ទេ | — |
inline_count | integer | ទេ | ⛔ 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 | ទេ | Woven into every prompt — "photographic, no text overlay, muted palette". |
provider | AiImageProvider | string<> | ទេ | Leave empty to let the platform choose. |
model | string | ទេ | A specific `model_id` to pin, or empty to follow the provider's default. |
target_locale | string | ទេ | 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 | ទេ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
ផ្អាកដំណើរការ
| ឈ្មោះ | ប្រភេទ | តម្រូវការ | តើវាជាអ្វី |
|---|---|---|---|
data | GeneratedImage[] | បាទ/ចាស | — |
unmet | string[] | ទេ | 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 | ទេ | The post body with the generated images' placeholders written into it. |
កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ
401 · 403 · 404 · 422 · 429