API documentation, key management, and live monitoring
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer avl_your_api_key_here
avl_ and can be managed via the /v1/keys endpoint.| Method | Path | Description |
|---|---|---|
| POST | /v1/video/generate | Submit video generation |
| GET | /v1/video/{task_id} | Get video generation status |
| POST | /v1/image/generate | Submit image generation |
| GET | /v1/image/{task_id} | Get image generation status |
| POST | /v1/music/generate | Submit music/audio generation |
| GET | /v1/music/{task_id} | Get music generation status |
| POST | /v1/tts/generate | Submit text-to-speech generation |
| GET | /v1/models | List available models & pricing |
| GET | /v1/models/status | Model health & success rates (24H) |
| GET | /v1/models/status/timeline | Model uptime timeline (144 × 10min segments) |
| GET | /v1/balance | Check token balance |
| GET | /v1/keys | List API keys |
| POST | /v1/keys | Create API key (body: {"label": "my-app"}) |
| DELETE | /v1/keys/{key} | Revoke API key |
| POST | /v1/upload | Upload image file (multipart, returns public URL — expires 72h) |
| GET | /v1/webhooks | List registered webhooks |
| POST | /v1/webhooks | Register webhook URL |
| DELETE | /v1/webhooks/{webhook_id} | Remove webhook |
| GET | /v1/developer/generations | List generations via your API key(s) |
GET /v1/models for real-time model list. GET /v1/models/status for 24H health. Minimum prompt length: 5 characters.Model ID: wan-2.7 · Modes: t2v, i2v, spicy_i2v, reference_to_video, video_extend, video_edit
Resolution: exactly 720P or 1080P (uppercase P) · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4
Duration: t2v/i2v/spicy/extend 2-15s; reference 2-10s; edit 0 or 2-10s (not 1), no longer than its 2-10s input_duration.
Required by mode: t2v: prompt; i2v/spicy: image_url; reference: prompt plus video_urls or image_urls; extend: video_url; edit: prompt, video_url, image_urls, input_duration.
Limits: prompts 5,000 chars; URLs 2,048 chars; reference submits max 5 videos + 5 images; edit submits max 3 images; seed 0-4,294,967,295.
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan-2.7",
"mode": "t2v",
"prompt": "A cinematic tracking shot through a rainy night market",
"duration": 8,
"resolution": "1080P",
"aspect_ratio": "16:9"
}'
Async: submit returns task_id, status, and exact cost_tokens. Poll GET /v1/video/{task_id} every ~5s: submitting → submitted → processing → completed, or failed/refunded. Completed jobs include result_url; failures release/refund tokens.
Model ID: grok-video · Mode: t2v · Resolution: 720p · Aspect: 16:9, 9:16
Pricing: 10s = 7 tok (RM0.70) · 20s = 12 tok (RM1.20) · 30s = 17 tok (RM1.70)
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-video",
"prompt": "A cat playing piano in a jazz bar",
"duration": 10,
"aspect_ratio": "16:9"
}'
Model ID: omni-flash · Mode: t2v, i2v · Resolution: 720p, 1080p, 4k · Duration: 6/8/10s · Aspect: 16:9, 9:16, 1:1
Pricing: 16 tok flat (RM1.60) — all durations/resolutions same price
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omni-flash",
"prompt": "Cinematic shot of a sunset over mountains",
"duration": 10,
"resolution": "720p",
"aspect_ratio": "16:9"
}'
Model ID: veo-3.1-stable · Mode: t2v, i2v · Resolution: 720p, 1080p · Duration: 4/6/8s · Aspect: 16:9, 9:16, 1:1
Pricing: 720p: 4s=12, 6s=16, 8s=20 tok · 1080p: 4s=17, 6s=23, 8s=29 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-stable",
"prompt": "A beautiful sunset over the ocean, cinematic drone shot",
"duration": 6,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
Model ID: veo-3.1-pro · Mode: t2v, i2v · Resolution: 720p, 1080p, 4k · Duration: auto · Aspect: 16:9, 9:16, 1:1
Pricing: 720p = 9 tok (RM0.90) · 1080p = 11 tok (RM1.10) · 4k = 14 tok (RM1.40)
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-pro",
"prompt": "Cinematic product showcase with dynamic camera movement",
"resolution": "1080p",
"aspect_ratio": "9:16"
}'
Model ID: veo-3.1-fast · Mode: t2v, i2v · Resolution: 720p, 1080p, 4k (same price) · Duration: auto · Aspect: 16:9, 9:16, 1:1
Pricing: 12 tok flat (RM1.20) — all resolutions, fastest Veo model
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast",
"prompt": "Quick product video with dynamic zoom effects",
"resolution": "4k",
"aspect_ratio": "16:9"
}'
Model ID: seedance-2-fast · Mode: t2v, i2v, multimodal · Resolution: 480p–4k · Duration: 5/10/15s · Audio included
Pricing: 720p/5s = 40 tok · 720p/10s = 73 tok · 1080p/5s = 48 tok · 4k/10s = 114 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-fast",
"prompt": "A dancer performing contemporary dance in a studio",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'
Model ID: seedance-2-standard · Mode: t2v, i2v, multimodal · Resolution: 480p–native4k · Duration: 5/10/15s · Audio included
Pricing: 720p/5s = 48 tok · 1080p/10s = 110 tok · native1080p/5s = 137 tok · native4k/10s = 457 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2-standard",
"prompt": "Aerial drone shot of a tropical island at golden hour",
"duration": 10,
"resolution": "native1080p",
"aspect_ratio": "16:9"
}'
Model ID: wan-2.7 · Mode: t2v, i2v, spicy_i2v, reference_to_video, video_extend, video_edit · Resolution: 720P, 1080P · Duration: 2–15s · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4
Pricing: 720P/5s = 20 tok · 720P/10s = 37 tok · 1080P/5s = 30 tok · 1080P/10s = 56 tok · Spicy 720p/5s = 32 tok · Spicy 1080p/5s = 46 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{
"model": "wan-2.7",
"mode": "t2v",
"prompt": "Product showcase spinning on white background",
"duration": 5,
"resolution": "720P",
"aspect_ratio": "16:9"
}'
// Image-to-Video
{ "model": "wan-2.7", "mode": "i2v", "image_url": "https://...", "duration": 5, "resolution": "1080P" }
// Spicy I2V (higher quality)
{ "model": "wan-2.7", "mode": "spicy_i2v", "image_url": "https://...", "duration": 5, "resolution": "720P" }
// Reference-to-Video (multi images + videos)
{ "model": "wan-2.7", "mode": "reference_to_video", "prompt": "...", "image_urls": ["url1","url2"], "video_urls": ["url3"], "duration": 5, "resolution": "720P", "aspect_ratio": "16:9" }
// Video Extend
{ "model": "wan-2.7", "mode": "video_extend", "video_url": "https://...", "duration": 5, "resolution": "1080P" }
// Video Edit (swap characters)
{ "model": "wan-2.7", "mode": "video_edit", "prompt": "Replace character with person in image", "video_url": "https://...", "image_urls": ["https://face.jpg"], "duration": 0, "resolution": "720P", "aspect_ratio": "16:9", "input_duration": 5 }
Model ID: sora-2 · Mode: t2v · Resolution: 1080p · Duration: 4/8/12/16/20s · Aspect: 16:9, 9:16, 1:1
Pricing: 4s=28 · 8s=46 · 12s=65 · 16s=84 · 20s=103 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cinematic tracking shot through a futuristic city at night",
"duration": 8,
"aspect_ratio": "16:9"
}'
Model ID: happyhorse-1.0 · Mode: t2v, i2v · Resolution: 720p, 1080p · Duration: 3–15s · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4
Pricing: 720p: 3s=22, 5s=34, 10s=64, 15s=94 tok · 1080p: 3s=26, 5s=40, 10s=76, 15s=112 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0",
"prompt": "A playful kitten chasing butterflies in a garden",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'
Model ID: happyhorse-1.1 · Mode: t2v, i2v · Resolution: 720p, 1080p · Duration: 3–15s · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4
Pricing: Same as 1.0 — quality upgrade, no price change. 720p: 3s=22, 5s=34, 10s=64, 15s=94 tok · 1080p: 3s=26, 5s=40, 10s=76, 15s=112 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1",
"prompt": "Cinematic slow-motion of a horse galloping through mist at sunrise",
"duration": 10,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
Model ID: kling-std · Mode: t2v, i2v, ref2v, video_edit, motion · Resolution: 1080p · Duration: 3–15s · Sound sync
Pricing: t2v 5s=27 tok · 10s=48 tok · ref2v=29 tok · video_edit=50 tok · motion=57 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-std",
"mode": "t2v",
"prompt": "A samurai drawing his katana in the rain",
"duration": 5,
"aspect_ratio": "16:9",
"sound": true
}'
Model ID: kling-pro · Mode: t2v, i2v, ref2v, video_edit, motion · Resolution: 1080p · Duration: 3–15s · Sound sync
Pricing: t2v 5s=34 tok · 10s=60 tok · ref2v=38 tok · video_edit=31 tok · motion=50 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-pro",
"mode": "i2v",
"prompt": "The woman walks forward, hair flowing in wind",
"image_url": "https://your-image-url.jpg",
"duration": 5,
"sound": true
}'
Model ID: kling-4k · Mode: t2v, i2v, ref2v · Resolution: 4K · Duration: 3–15s
Pricing: 3s=53 tok · 5s=85 tok · 10s=163 tok · 15s=241 tok
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4k",
"mode": "t2v",
"prompt": "Ultra-detailed aerial shot of a luxury resort at sunset",
"duration": 10,
"aspect_ratio": "16:9"
}'
Model ID: gpt-image-2 · Aspect: 1:1, 16:9, 9:16
Pricing: 4 tok per image (RM0.40)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A modern minimalist logo for a tech startup",
"aspect_ratio": "1:1"
}'
Model ID: gpt-image-1-5 · Aspect: 1:1, 16:9, 9:16 · Sharp text rendering
Pricing: 4 tok per image (RM0.40)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1-5",
"prompt": "A bold typographic poster that says SALE NOW",
"aspect_ratio": "16:9"
}'
Model ID: nano-banana · Aspect: 1:1, 16:9, 9:16 · Cheapest image model
Pricing: 2 tok per image (RM0.20)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana",
"prompt": "A cute cartoon cat sitting on a couch",
"aspect_ratio": "1:1"
}'
Model ID: nano-banana-2 · Aspect: 1:1, 16:9, 9:16 · Improved quality
Pricing: 4 tok per image (RM0.40)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"prompt": "Professional headshot, studio lighting",
"aspect_ratio": "1:1"
}'
Model ID: nano-banana-pro · Aspect: 1:1, 16:9, 9:16 · Best quality
Pricing: 6 tok per image (RM0.60)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"prompt": "Hyperrealistic food photography, gourmet burger with dramatic lighting",
"aspect_ratio": "16:9"
}'
Model ID: grok · Aspect: 1:1, 16:9, 9:16 · Fast & budget
Pricing: 2 tok per image (RM0.20)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "grok",
"prompt": "A neon-lit cyberpunk street at night, rain reflections",
"aspect_ratio": "9:16"
}'
Model ID: grok-stable · Aspect: 1:1, 16:9, 9:16 · Official, stable
Pricing: 2 tok per image (RM0.20)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "grok-stable",
"prompt": "Professional product shot of a perfume bottle, soft studio light",
"aspect_ratio": "1:1"
}'
Model ID: grok-quality · Aspect: 1:1, 16:9, 9:16 · High quality (1k/2k)
Pricing: 5 tok per image (RM0.50)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "grok-quality",
"prompt": "Cinematic portrait, dramatic rim lighting, ultra detailed",
"aspect_ratio": "16:9"
}'
Model ID: seedream-v45 · Aspect: 1:1, 16:9, 9:16, 4:3, 3:4 · Edit up to 10 refs
Pricing: 3 tok per image (RM0.30)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v45",
"prompt": "Cinematic wuxia movie poster, dramatic night rain, ultra detailed",
"aspect_ratio": "9:16"
}'
Model ID: seedream-v5lite · Aspect: 1:1, 16:9, 9:16, 4:3, 3:4 · Edit up to 10 refs
Pricing: 3 tok per image (RM0.30)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5lite",
"prompt": "Modern flat illustration weather forecast chart, clean vector style",
"aspect_ratio": "16:9"
}'
Model ID: seedream-v5pro · Aspect: 1:1, 16:9, 9:16, 4:3, 3:4 · Edit up to 10 refs
Pricing: 5 tok per image (RM0.50)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5pro",
"prompt": "High-end skincare e-commerce hero shot, glass serum bottle, soft studio lighting, ultra detailed",
"aspect_ratio": "9:16"
}'
Model ID: jimeng46 · Aspect: 1:1, 16:9, 9:16, 4:3, 3:4 · Edit up to 6 refs
Pricing: 3 tok per image (RM0.30)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "jimeng46",
"prompt": "Professional Japanese anime illustration, full-body portrait, premium quality",
"aspect_ratio": "9:16"
}'
Model ID: flux-klein · Aspect: 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2 · Edit 1 ref
Pricing: 2 tok per image (RM0.20)
curl -s -X POST https://api.aividlab.shop/v1/image/generate \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"model": "flux-klein",
"prompt": "Photorealistic product shot, soft studio lighting, crisp text on label",
"aspect_ratio": "9:16"
}'
curl -s https://api.aividlab.shop/v1/video/1234 \ -H "Authorization: Bearer YOUR_API_KEY" # For music/TTS: curl -s https://api.aividlab.shop/v1/music/1234 \ -H "Authorization: Bearer YOUR_API_KEY"
Response: {"status": "completed", "result_url": "https://...", "progress": 100}
Statuses: submitted → processing → completed / failed
/v1/video/{id} for video, /v1/image/{id} for image, /v1/music/{id} for music & TTS.curl -s https://api.aividlab.shop/v1/balance \ -H "Authorization: Bearer YOUR_API_KEY"
Response: {"available": 150, "reserved": 0, "total_topup": 200, "total_spent": 50}
POST /v1/music/generate and POST /v1/tts/generate respectively. Poll status via GET /v1/music/{task_id}. Result is an audio URL (MP3). URLs expire in 24h — download immediately.Model ID: suno-v5.5 · Latest Suno model · Full custom song from lyrics + style tags
Pricing: 9 tok (RM0.90) per song
Required: title, lyrics, tags
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-v5.5",
"title": "Rindu Di Hati",
"lyrics": "[Verse]\nMalam ini aku sendiri\nMemandang langit gelap\n\n[Chorus]\nRindu ini membara\nTiada henti walau jauh",
"tags": "pop melayu, sedih, slow ballad, female vocal"
}'
Model IDs: suno-v5, suno-v4.5 · Same params as V5.5
Pricing: 9 tok (RM0.90) per song
Model ID: mureka-v8-song · Full song with vocals · Supports vocal clone & reference
Pricing: 6 tok (RM0.60) per song
Required: lyrics · Optional: prompt (style), vocal_id, reference_id, melody_id, n (1-3)
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mureka-v8-song",
"lyrics": "[Verse]\nAku berjalan tanpa arah\n[Chorus]\nHati ini masih rindu",
"prompt": "upbeat pop, female vocal, acoustic guitar"
}'
Model IDs: mureka-v7.6-song (5 tok), mureka-o2-song (6 tok) · Same params as Mureka 8
Model ID: minimax-music-2.6 · Full song or instrumental · Lyrics optimizer
Pricing: 9 tok (RM0.90) per song
Optional: prompt (style), lyrics, is_instrumental (bool)
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-music-2.6",
"prompt": "cinematic orchestral epic battle theme",
"is_instrumental": true
}'
Model IDs: mureka-v8-bgm (6 tok), mureka-v7.6-bgm (5 tok) · Instrumental without vocals
Required: prompt (style/mood description)
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mureka-v8-bgm",
"prompt": "calm lo-fi hip hop, rainy day vibes, soft piano"
}'
Model IDs: suno-lyrics, mureka-lyrics · Generate lyrics from a topic/theme
Pricing: 4 tok (RM0.40) per call
Required: prompt (theme/topic)
Response: result contains lyrics field (text, not audio URL)
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "suno-lyrics",
"prompt": "lagu cinta putus asa, gaya pop melayu, penuh emosi"
}'
Model IDs: mureka-v8-extend (8 tok), mureka-v7.6-extend (5 tok) · Continue an existing song
Required: file_url (audio URL), lyrics (new lyrics for extension)
Optional: extend_at (ms, default 8000), extend_type ("tail"/"head", v8 only)
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mureka-v8-extend",
"file_url": "https://cdn.example.com/my-song.mp3",
"lyrics": "[Bridge]\nDi sini aku menunggu\nWalau hujan tak berhenti",
"extend_type": "tail"
}'
Model ID: minimax-cover · Restyle a reference audio with new instrumental
Pricing: 9 tok (RM0.90) per call
Required: file_url (audio URL) · Optional: prompt (style), lyrics
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-cover",
"file_url": "https://cdn.example.com/reference.mp3",
"prompt": "acoustic jazz version"
}'
Model ID: mureka-vocal-clone · Clone a voice from audio sample
Pricing: 206 tok (RM20.60) per clone
Required: file_url (clean vocal audio, 10s–5min, MP3/WAV)
Response: result contains vocalId — use this when generating songs with mureka-v8-song
curl -s -X POST https://api.aividlab.shop/v1/music/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mureka-vocal-clone",
"file_url": "https://cdn.example.com/vocal-sample.mp3"
}'
Uses POST /v1/tts/generate (separate endpoint from music)
| Model ID | Name | Cost | Features |
|---|---|---|---|
speech-2.8-hd | Speech-2.8 HD | 6 tok (RM0.60) | Latest HD. 40+ languages, emotion, interjections |
speech-2.6-hd | Speech-2.6 HD | 8 tok (RM0.80) | HD with emotion and pitch control |
speech-2.6-turbo | Speech-2.6 Turbo | 6 tok (RM0.60) | Fast generation, low latency |
speech-02-hd | Speech-02 HD | 6 tok (RM0.60) | High-definition voice |
speech-02-turbo | Speech-02 Turbo | 5 tok (RM0.50) | Budget TTS, fastest speed |
Required: model, text (1–10,000 chars)
Optional: voice_id (default: "Wise_Woman"), speed (0.5–2.0), volume (0.1–10), pitch (-12 to +12), emotion (neutral/happy/sad/angry/fearful/disgusted/surprised)
Voices: Wise_Woman, Gentle_Woman, Warm_Man, Deep_Man, Narrator, Cheerful_Girl, Calm_Boy, Storyteller, Broadcaster, Customer_Service
curl -s -X POST https://api.aividlab.shop/v1/tts/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "speech-2.8-hd",
"text": "Selamat datang ke AIVidLab. Platform AI terbaik untuk content creator.",
"voice_id": "Warm_Man",
"speed": 1.0,
"emotion": "happy"
}'
GET /v1/music/{task_id} (same endpoint as music). Result is an audio MP3 URL.| Model | Category | Cost (Token) | Cost (RM) |
|---|---|---|---|
suno-v5.5 / suno-v5 / suno-v4.5 | Song | 9 | RM0.90 |
mureka-v8-song | Song | 6 | RM0.60 |
mureka-v7.6-song | Song | 5 | RM0.50 |
mureka-o2-song | Song | 6 | RM0.60 |
minimax-music-2.6 | Song/Instrumental | 9 | RM0.90 |
mureka-v8-bgm | BGM | 6 | RM0.60 |
mureka-v7.6-bgm | BGM | 5 | RM0.50 |
suno-lyrics / mureka-lyrics | Lyrics | 4 | RM0.40 |
mureka-v8-extend | Extend | 8 | RM0.80 |
mureka-v7.6-extend | Extend | 5 | RM0.50 |
minimax-cover | Cover | 9 | RM0.90 |
minimax-cover-pre | Preprocess | 9 | RM0.90 |
mureka-vocal-clone | Vocal Clone | 206 | RM20.60 |
speech-2.8-hd | TTS | 6 | RM0.60 |
speech-2.6-hd | TTS | 8 | RM0.80 |
speech-2.6-turbo | TTS | 6 | RM0.60 |
speech-02-hd | TTS | 6 | RM0.60 |
speech-02-turbo | TTS | 5 | RM0.50 |
| Code | Meaning |
|---|---|
400 | Invalid parameters (e.g. prompt too short, invalid model ID) |
401 | Invalid or missing API key |
402 | Insufficient token balance |
403 | Content policy violation (prompt rejected) |
404 | Resource not found |
413 | File too large (upload max 10MB) |
429 | Rate limited — max 30 req/min per key |
500 | Internal server error (tokens auto-refunded) |
503 | Model temporarily unavailable — retry later |
GET /v1/balance to confirm.Register a webhook URL to receive POST callbacks when generations complete or fail.
curl -s -X POST https://api.aividlab.shop/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/callback",
"events": ["video.completed", "image.completed", "music.completed", "tts.completed", "job.failed"]
}'
{
"event": "video.completed",
"task_id": "1234",
"model": "Veo 3.1 Fast",
"status": "completed",
"result_url": "https://cdn.example.com/video.mp4",
"cost_tokens": 12,
"timestamp": "2026-07-03T10:30:00Z"
}
{
"event": "job.failed",
"task_id": "1235",
"model": "Kling V3.0 Pro",
"status": "refunded",
"error_message": "Model timeout — tokens refunded",
"cost_tokens": 0,
"timestamp": "2026-07-03T10:31:00Z"
}
video.completed, image.completed, music.completed, tts.completed, job.failed, all (receive everything). Failed deliveries are retried 3× with exponential backoff.Live generation log — enter your API key to monitor requests in real time.
Connect above to view live model health data.
144 segments, each representing 10 minutes.
curl -s -X POST https://api.aividlab.shop/v1/video/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast",
"prompt": "A cinematic shot of a mountain at sunset",
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
# Response:
# {"task_id": "1234", "status": "submitted", "model": "veo-3.1-fast", "cost_tokens": 12}
curl -s https://api.aividlab.shop/v1/video/1234 \
-H "Authorization: Bearer YOUR_API_KEY"
# Response (processing):
# {"status": "processing", "progress": 60}
# Response (completed):
# {"status": "completed", "progress": 100, "result_url": "https://cdn.../video.mp4"}
submitting → submitted → processing → completed | failed (tokens auto-refunded on failure).curl -s https://api.aividlab.shop/v1/balance \
-H "Authorization: Bearer YOUR_API_KEY"
# Response:
# {"available": 150, "reserved": 12, "total_topup": 200, "total_spent": 38}
import requests, time
API = "https://api.aividlab.shop"
KEY = "avl_your_key_here"
HEADERS = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
# 1. Submit
resp = requests.post(f"{API}/v1/video/generate", headers=HEADERS, json={
"model": "veo-3.1-fast",
"prompt": "Product showcase with zoom effect",
"resolution": "1080p",
"aspect_ratio": "9:16"
})
task_id = resp.json()["task_id"]
print(f"Submitted: {task_id}")
# 2. Poll until done (every 5s, max 5min)
for _ in range(60):
time.sleep(5)
r = requests.get(f"{API}/v1/video/{task_id}", headers=HEADERS)
data = r.json()
if data["status"] == "completed":
print(f"Done! Video: {data['result_url']}")
break
elif data["status"] in ("failed", "refunded"):
print(f"Failed: {data.get('error_message', 'Unknown')}")
break
print(f" Progress: {data.get('progress', 0)}%")
import requests, time
API = "https://api.aividlab.shop"
KEY = "avl_your_key_here"
HEADERS = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
# 1. Generate song with Suno V5.5
resp = requests.post(f"{API}/v1/music/generate", headers=HEADERS, json={
"model": "suno-v5.5",
"title": "Malam Rindu",
"lyrics": "[Verse]\nAku di sini sendiri\nMengenang saat bersamamu\n\n[Chorus]\nMalam rindu oh malam rindu\nKau jauh namun ku rasa dekat",
"tags": "pop ballad, malay, emotional, female vocal"
})
task_id = resp.json()["task_id"]
print(f"Music submitted: {task_id}, cost: {resp.json()['cost_tokens']} tokens")
# 2. Poll via /v1/music/{task_id}
for _ in range(60):
time.sleep(5)
r = requests.get(f"{API}/v1/music/{task_id}", headers=HEADERS)
data = r.json()
if data["status"] == "completed":
print(f"Done! Audio: {data['result_url']}")
# Download audio (expires in 24h)
audio = requests.get(data["result_url"])
with open("song.mp3", "wb") as f:
f.write(audio.content)
break
elif data["status"] in ("failed", "refunded"):
print(f"Failed: {data.get('error', 'Unknown')} — tokens auto-refunded")
break
import requests, time
API = "https://api.aividlab.shop"
KEY = "avl_your_key_here"
HEADERS = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
# 1. Submit TTS
resp = requests.post(f"{API}/v1/tts/generate", headers=HEADERS, json={
"model": "speech-2.8-hd",
"text": "Selamat datang ke kedai kami. Hari ini ada promosi besar-besaran!",
"voice_id": "Warm_Man",
"speed": 1.0,
"emotion": "happy"
})
task_id = resp.json()["task_id"]
# 2. Poll via /v1/music/{task_id} (same endpoint)
for _ in range(30):
time.sleep(3)
r = requests.get(f"{API}/v1/music/{task_id}", headers=HEADERS)
data = r.json()
if data["status"] == "completed":
print(f"TTS done! Audio: {data['result_url']}")
break
elif data["status"] in ("failed", "refunded"):
print(f"Failed: {data.get('error')}")
break