Image API
Ad image generation API
Send a prompt and up to four product photos, get back ad-ready images. The same models as the studio, behind one synchronous endpoint and a bearer key.
One endpoint, synchronous
Call POST /api/v1/images on https://adlark.alexshipit.com with a JSON body. The request waits until the images are ready and returns their URLs. File URLs need the same bearer header to download, so your images are not public by default.
curl -X POST https://adlark.alexshipit.com/api/v1/images \
-H "Authorization: Bearer adl_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Studio product photo of the serum bottle on wet stone, soft rim light",
"model": "klein",
"size": "1K",
"aspect": "4:5",
"count": 2,
"reference_images": ["data:image/jpeg;base64,/9j/4AAQ..."]
}'The response is { job, credits, images: [{ url, width, height }] }. credits is what the call cost, so you can log spend per client or per campaign.
Parameters
| Field | Values | Notes |
|---|---|---|
prompt | text | Describe the scene, light and composition |
model | klein, schnell, nb2, nbpro | nb2 and nbpro only work when Gemini images are switched on |
size | 1K, 2K, 4K | Per model: klein 1K/2K, schnell 1K, nb2 up to 4K, nbpro 2K/4K |
aspect | 1:1, 4:5, 9:16, 16:9, 3:4, 4:3, 2:3, 3:2 | Pixel sizes are multiples of 16 |
count | 1-4 | Each image is billed |
reference_images | base64 or data URLs, max 4 | Not used by schnell |
Pricing per image
API calls cost the studio price plus 10%, rounded up. A FLUX.2 klein image is 9 credits at 1K and 16 at 2K by API; FLUX.1 schnell is 5 credits. Optional Nano Banana 2.1 starts at 11 credits at 1K. The same credit balance is shared with the studio. See pricing and AI ad costs.
Errors
401: missing or wrong key.402: not enough credits. Top up with a pack or wait for your monthly credits.429: too many requests at once. Back off and retry.503: the model is temporarily unavailable or switched off. Retry later or pick another model.
Every error body is { error } with a readable message.
Typical uses
- A store that creates lifestyle shots for every new SKU from its catalog photos.
- An agency tool that makes four 4:5 and four 9:16 variations per brief.
- A workflow in n8n or Make triggered by a new row in a sheet.
Prefer an assistant? The same image tool is available through our MCP server as generate_image. Code walk-throughs: Python and JavaScript.
Questions
+How do I get an API key?
Subscribe to Pro, then go to Account, API keys. Keys start with adl_ and can be revoked at any time.
+Are API credits separate from studio credits?
No. Both draw from the same balance; API calls cost the studio price plus 10%, rounded up.
+Is the endpoint asynchronous?
No, images return in the same response. You can still look up any job later with GET /api/v1/jobs/{id}.
+Can I use the images commercially?
Yes, images you generate are for your ads and products. Check our terms and the model's own license notes on its model page.
Related
Make your next ad today
Pro is $39.99 a month with 3,000 credits. Cancel anytime.