API reference
Partner API
REST over HTTPS. JSON in and out, multipart for uploads. Synchronous except video.
Authentication
Create a key under Account. Send it on every request:
Authorization: Bearer adl_...Base URL: https://adlark.alexshipit.com. Files in responses (/api/files/...) need the same header. Files are kept 60 days.
Pricing and limits
Each call costs the studio credit price plus 10%, rounded up, from the same balance. Failed calls are refunded. Limits: 120 requests a minute per key, 20 generations a minute per account, and a daily credit cap per account (write to us to raise it).
Errors
Errors are JSON { "error": "..." }: 400 bad input, 401 bad key, 402 not enough credits, 413 file too large, 429 rate limited, 502/503 provider trouble (credits returned).
Quick start
curl -s https://adlark.alexshipit.com/api/v1/images \
-H "Authorization: Bearer $ADLARK_API_KEY" \
-H "content-type: application/json" \
-d '{"prompt":"Studio photo of a ceramic mug, warm light","model":"klein","aspect":"1:1"}'Endpoints
GET /api/v1/credits
Credit balance and rank.
{ "credits": 2950, "plan_credits": 2950, "pack_credits": 0, "rank": "bronze" }POST /api/v1/images
Generate 1-4 images. JSON with base64 reference_images, or multipart with `refs` files.
{ "prompt": "Amber serum bottle on wet stone, morning light", "model": "klein", "size": "1K", "aspect": "4:5", "count": 2, "reference_images": ["<base64>"] }{ "job": "Jb3...", "credits": 18, "images": [{ "id": "...", "url": "/api/files/...", "width": 816, "height": 1024 }], "failed": 0 }POST /api/v1/copy
Ad copy set for one platform.
{ "product": "Glowline serum", "details": "15% vitamin C, fragrance free", "audience": "women 25-40", "offer": "20% off", "platform": "TikTok", "tone": "Friendly", "language": "English" }{ "job": "...", "credits": 6, "copy": { "angles": [...], "hooks": [...], "headlines": [...], "primary_texts": [...], "descriptions": [...], "ctas": [...] } }POST /api/v1/ugc-script
Scene-by-scene UGC script. Same brief fields plus length (15, 30, 45, 60), creator, angle.
{ "product": "Glowline serum", "length": 30, "creator": "busy mom in her 30s" }{ "job": "...", "credits": 6, "script": { "title": "...", "scenes": [{ "n": 1, "time": "0-3s", "shot": "...", "voiceover": "...", "on_screen_text": "...", "image_prompt": "..." }], "hook_variations": [...] } }POST /api/v1/scenes
Split a script into 3-8 scenes with image prompts.
{ "script": "...", "style": "bright handheld look" }{ "job": "...", "credits": 6, "scenes": [...] }POST /api/v1/analyze
Multipart: `file` (image or video up to 3 min / 80 MB), `caption`, `platform`.
curl -F file=@ad.mp4 -F platform=TikTok ...{ "job": "...", "credits": 55, "analysis": { "grade": "B", "score": 74, "hook": {...}, "cta": {...}, "audience": {...}, "ugc_script": {...}, "hook_variations": [...] }, "transcript": { "text": "..." }, "frames": [{ "url": "...", "at": 0.5 }] }POST /api/v1/captions
Multipart: `file` (video), `style` (bold-pop | clean | boxed | neon | karaoke), `uppercase` (1/0).
curl -F file=@edit.mp4 -F style=bold-pop ...{ "job": "...", "credits": 28, "video": { "url": "/api/files/..." }, "srt": { "url": "/api/files/..." } }POST /api/v1/voiceover
Text to MP3. Voices: thalia, andromeda, helena, apollo, arcas, orion.
{ "text": "Meet the serum that changed my mornings.", "voice": "thalia" }{ "job": "...", "credits": 2, "audio": { "url": "/api/files/..." }, "characters": 41 }GET /api/v1/jobs/{id}
A job's status and output (video jobs are polled here).
{ "id": "...", "tool": "image", "status": "done", "credits": 18, "output": {...} }POST /api/v1/videos
Coming soon: returns 503 until video launches. Then: prompt, model (veo31fast | veo31), seconds (4|6|8), aspect, resolution, first_frame (multipart).
{ "job": "...", "credits": 282, "status": "running" }