ai
POST /v1/ai/images/posts/{postId}
Generate a featured image and in-post images for a content post.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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
التفاصيل
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