ai

POST /v1/ai/images/library

Generate images from a prompt, with no post involved.

Lahat ng ai endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na links.edit; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Ang endpoint na ito ay kumukuha ng org_id bilang isang field sa JSON body.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

Draws up to four images from the customer's own prompt and keeps them in their library for 90 days. Requires `links.edit`. ⭐ This is the door that makes image generation a product rather than a post decoration. Every other image operation needs a content post to exist first; a hosting customer who wants a hero picture for their homepage, a social card or a product shot has none and never will. Billing is the **one AI meter** — BYO key first, then Zinn® credits, then whatever the plan includes; there is no separate image SKU. ⛔ A suspended account or one with no active subscription is refused before anything is drawn (§2.46), with `AI_NOT_IN_GOOD_STANDING` rather than the top-up message: that one is fixed by settling the account, and offering a credit button there sends the customer to a screen that cannot help them. The response carries `unmet` — anything the chosen provider could not honour, in words for the customer. Nothing is silently dropped.

Katawan ng kahilingan

PangalanUriKailanganAno ito
promptstringOoUsed **as written**, not rewritten into a template. The only thing added is an instruction to draw no lettering, because all three providers render garbled text when asked for w…
shapestring<wide, standard, square>Hindi⛔ A word, not a pixel pair, and that is a portability property rather than a simplification: Google takes an aspect ratio and a size *bucket* and cannot be given `1536x864`; Ope…
countintegerHindi⛔ Bounded at 4 so one press cannot spend an unbounded amount of a customer's credit. Four is already more variations than anybody picks between.
stylestringHindiAppended to the prompt — "photographic, muted palette".
providerAiImageProvider | string<>HindiLeave empty to let the platform choose.
modelstringHindiA specific `model_id` to pin, or empty to follow the provider's default.
org_idUuidHindiUUIDv7 identifier — sortable by creation time (docs/02 §8).

Tugon

PangalanUriKailanganAno ito
dataGeneratedImage[]Oo
unmetstring[]HindiWhat the chosen provider could not honour, in words for the customer. ⛔ Present and empty rather than absent when everything was honoured.

Mga error na maibabalik ng endpoint na ito

401 · 403 · 422 · 429