ai
POST /v1/ai/images/library
Generate images from a prompt, with no post involved.
Tabbatar da Asali
Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin links.edit; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.
Inda ID ɗin kungiyar ku ke zuwa
Wannan ma'ajiyar tana karɓar org_id a matsayin fili a cikin jikin JSON.
Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
curl -X POST https://api.zinndigital.com/v1/ai/images/library \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "prompt": <string> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
prompt | string | Eh | Used **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… |
shape | string<wide, standard, square> | A'a | ⛔ 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… |
count | integer | A'a | ⛔ 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. |
style | string | A'a | Appended to the prompt — "photographic, muted palette". |
provider | AiImageProvider | string<> | A'a | Leave empty to let the platform choose. |
model | string | A'a | A specific `model_id` to pin, or empty to follow the provider's default. |
org_id | Uuid | A'a | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
data | GeneratedImage[] | Eh | — |
unmet | string[] | A'a | What the chosen provider could not honour, in words for the customer. ⛔ Present and empty rather than absent when everything was honoured. |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 403 · 422 · 429