@felores/kie-ai-mcp-server 1.2.2 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,34 +1,96 @@
1
1
  # Kie.ai MCP Server
2
2
 
3
- An MCP (Model Context Protocol) server that provides access to Kie.ai's AI APIs including Nano Banana image generation/editing and Veo3 video generation.
4
-
5
- ## Features
6
-
7
- - **Nano Banana Image Generation**: Text-to-image generation using Google's Gemini 2.5 Flash Image Preview
8
- - **Nano Banana Image Editing**: Natural language image editing with up to 10 input images
9
- - **Nano Banana Image Upscaling**: Upscale images 1-4x with optional face enhancement
10
- - **Veo3 Video Generation**: Professional-quality video generation with text-to-video and image-to-video capabilities
11
- - **1080p Video Upgrade**: Get high-definition versions of Veo3 videos
12
- - **Suno Music Generation**: AI-powered music creation with multiple models (V3_5, V4, V4_5, V4_5PLUS, V5)
13
- - **Task Management**: SQLite-based task tracking with status polling
14
- - **Smart Endpoint Routing**: Automatic detection of task types for status checking
15
- - **Error Handling**: Comprehensive error handling and validation
16
-
17
- ## Prerequisites
18
-
19
- - Node.js 18+
20
- - Kie.ai API key from https://kie.ai/api-key
21
-
22
- ## Installation
23
-
24
- ### From NPM
25
-
3
+ **Access multiple AI models with one API. Generate videos, images, music, and audio.**
4
+
5
+ Access the world's best AI models through a single, developer-friendly API. Generate stunning videos, images, music, and audio at **lower cost than Fal.ai** with 99.9% uptime and 24/7 support.
6
+
7
+ ## Why Choose Kie.ai MCP Server?
8
+
9
+ | Feature | Kie.ai | Fal.ai | Replicate.com |
10
+ |---------|--------|--------|---------------|
11
+ | **Pricing** | Lower | Higher | Higher |
12
+ | **Models** | All-in-one API | Limited | Separate APIs |
13
+ | **Uptime** | 99.9% | Lower | 99.5% |
14
+ | **Support** | 24/7 | Limited | Business hours |
15
+ | **API Keys** | One key | Multiple keys | Multiple keys |
16
+ | **Free Trial** | Yes | Limited | Limited |
17
+
18
+ ### 🚀 **All AI Models in One API**
19
+ - **Google Veo 3**: Cinematic video generation with synchronized audio and 1080p output
20
+ - **Runway Aleph**: Advanced video editing with object removal and style transfer
21
+ - **Suno V5**: Professional music generation with realistic vocals up to 8 minutes
22
+ - **Nano Banana**: Lightning-fast image generation and editing
23
+ - **ElevenLabs**: Studio-quality text-to-speech and sound effects
24
+ - **ByteDance Seedance**: High-quality video with text-to-video and image-to-video
25
+
26
+ ### 💰 **Affordable Pricing**
27
+ Pay-as-you-go credit system means you only pay for what you use. Good for startups and enterprises looking to reduce AI costs.
28
+
29
+ ### ⚡ **Fast & Reliable**
30
+ - **99.9% uptime**
31
+ - **25.2s average response time**
32
+ - Low latency for applications
33
+ - High concurrency support
34
+
35
+ ### 🔒 **Secure**
36
+ Your data is protected with encryption. We prioritize privacy and do not expose your information.
37
+
38
+ ## What You Can Build
39
+
40
+ ### 🎬 **Video Generation**
41
+ Generate videos from text or images. Use for:
42
+ - Social media content
43
+ - Marketing materials
44
+ - Product demonstrations
45
+ - Creative projects
46
+
47
+ ### 🎨 **Image Generation**
48
+ Create images, edit existing ones, and upscale with AI. Use for:
49
+ - Content creation
50
+ - Product photography
51
+ - Artistic projects
52
+ - Design mockups
53
+
54
+ ### 🎵 **Music Generation**
55
+ Generate music tracks with vocals. Use for:
56
+ - Background music for videos
57
+ - Podcast intros/outros
58
+ - Game soundtracks
59
+ - Commercial projects
60
+
61
+ ### 🎤 **Audio Generation**
62
+ Voiceovers and sound effects. Use for:
63
+ - Narration and voiceovers
64
+ - Podcast production
65
+ - Game audio
66
+ - Accessibility features
67
+
68
+ ## Key Features
69
+
70
+ - **🎯 One API Key**: Access all models with one credential
71
+ - **🔄 Task Management**: Built-in SQLite database for tracking generations
72
+ - **📱 Smart Routing**: Automatic endpoint detection and status monitoring
73
+ - **🛡️ Error Handling**: Validation and error recovery
74
+ - **⚙️ Flexible Parameters**: Control outputs with parameters
75
+ - **📊 Persistent Storage**: Tasks survive server restarts
76
+ - **🎛️ Quality Control**: Choose between speed (lite) and quality (pro) modes
77
+ - **🌐 Multilingual Support**: Text-to-speech in multiple languages
78
+
79
+ ## Quick Start
80
+
81
+ ### 🎯 Get Your Free API Key
82
+ 1. Visit [Kie.ai API Key](https://kie.ai/api-key) to get your free API key
83
+ 2. **Try any model for free** in the AI Playground before committing
84
+ 3. Choose the flexible pricing plan that fits your needs
85
+
86
+ ### 📦 Installation
87
+
88
+ #### Option 1: Install from NPM (Recommended)
26
89
  ```bash
27
90
  npm install -g @felores/kie-ai-mcp-server
28
91
  ```
29
92
 
30
- ### From Source
31
-
93
+ #### Option 2: Install from Source
32
94
  ```bash
33
95
  # Clone the repository
34
96
  git clone https://github.com/felores/kie-ai-mcp-server.git
@@ -41,6 +103,27 @@ npm install
41
103
  npm run build
42
104
  ```
43
105
 
106
+ ### ⚙️ Configuration
107
+
108
+ Create your environment file:
109
+ ```bash
110
+ # Required: Your API key from https://kie.ai/api-key
111
+ export KIE_AI_API_KEY="your_api_key_here"
112
+
113
+ # Optional: Custom settings
114
+ export KIE_AI_BASE_URL="https://api.kie.ai/api/v1" # Default
115
+ export KIE_AI_TIMEOUT="60000" # Default: 60 seconds
116
+ export KIE_AI_DB_PATH="./tasks.db" # Default: local database
117
+ export KIE_AI_CALLBACK_URL="https://your-domain.com/webhook" # For notifications
118
+ ```
119
+
120
+ ### 🚀 Start Generating
121
+ You're ready to create amazing AI content! The server will automatically:
122
+ - Track all your generations in a local database
123
+ - Handle task status and completion notifications
124
+ - Route requests to the optimal AI models
125
+ - Provide detailed error messages and guidance
126
+
44
127
  ## Configuration
45
128
 
46
129
  ### Environment Variables
@@ -88,7 +171,35 @@ Or if installed globally:
88
171
 
89
172
  ## Available Tools
90
173
 
91
- ### 1. `nano_banana_generate`
174
+ ### 1. `list_tasks`
175
+ List recent tasks with their status.
176
+
177
+ **Parameters:**
178
+ - `limit` (integer, optional): Max tasks to return (default: 20, max: 100)
179
+ - `status` (string, optional): Filter by status ("pending", "processing", "completed", "failed")
180
+
181
+ **Example:**
182
+ ```json
183
+ {
184
+ "limit": 10,
185
+ "status": "completed"
186
+ }
187
+ ```
188
+
189
+ ### 2. `get_task_status`
190
+ Check the status of a generation task.
191
+
192
+ **Parameters:**
193
+ - `task_id` (string, required): Task ID to check
194
+
195
+ **Example:**
196
+ ```json
197
+ {
198
+ "task_id": "281e5b0*********************f39b9"
199
+ }
200
+ ```
201
+
202
+ ### 3. `nano_banana_generate`
92
203
  Generate images using Nano Banana.
93
204
 
94
205
  **Parameters:**
@@ -105,7 +216,7 @@ Generate images using Nano Banana.
105
216
  }
106
217
  ```
107
218
 
108
- ### 2. `nano_banana_edit`
219
+ ### 4. `nano_banana_edit`
109
220
  Edit images using natural language prompts.
110
221
 
111
222
  **Parameters:**
@@ -124,7 +235,7 @@ Edit images using natural language prompts.
124
235
  }
125
236
  ```
126
237
 
127
- ### 3. `nano_banana_upscale`
238
+ ### 5. `nano_banana_upscale`
128
239
  Upscale images with optional face enhancement.
129
240
 
130
241
  **Parameters:**
@@ -141,7 +252,7 @@ Upscale images with optional face enhancement.
141
252
  }
142
253
  ```
143
254
 
144
- ### 4. `veo3_generate_video`
255
+ ### 6. `veo3_generate_video`
145
256
  Generate videos using Veo3.
146
257
 
147
258
  **Parameters:**
@@ -166,19 +277,6 @@ Generate videos using Veo3.
166
277
  }
167
278
  ```
168
279
 
169
- ### 5. `get_task_status`
170
- Check the status of a generation task.
171
-
172
- **Parameters:**
173
- - `task_id` (string, required): Task ID to check
174
-
175
- ### 6. `list_tasks`
176
- List recent tasks with their status.
177
-
178
- **Parameters:**
179
- - `limit` (integer, optional): Max tasks to return (default: 20, max: 100)
180
- - `status` (string, optional): Filter by status ("pending", "processing", "completed", "failed")
181
-
182
280
  ### 7. `veo3_get_1080p_video`
183
281
  Get 1080P high-definition version of a Veo3 video.
184
282
 
@@ -195,7 +293,7 @@ Generate music with AI using Suno models.
195
293
  - `prompt` (string, required): Description of desired audio content (max 5000 chars for V4_5+, V5; 3000 for V3_5, V4; 500 chars for non-custom mode)
196
294
  - `customMode` (boolean, required): Enable advanced parameter customization
197
295
  - `instrumental` (boolean, required): Generate instrumental music (no lyrics)
198
- - `model` (enum, required): AI model version - "V3_5", "V4", "V4_5", "V4_5PLUS", or "V5"
296
+ - `model` (enum, optional): AI model version - "V3_5", "V4", "V4_5", "V4_5PLUS", or "V5" (default: "V5")
199
297
  - `callBackUrl` (string, optional): URL to receive task completion updates (uses KIE_AI_CALLBACK_URL environment variable if not provided)
200
298
  - `style` (string, optional): Music style/genre (required in custom mode, max 1000 chars for V4_5+, V5; 200 for V3_5, V4)
201
299
  - `title` (string, optional): Track title (required in custom mode, max 80 chars)
@@ -222,6 +320,15 @@ With explicit callback URL:
222
320
 
223
321
  Using environment variable (KIE_AI_CALLBACK_URL):
224
322
  ```json
323
+ {
324
+ "prompt": "A relaxing electronic music track",
325
+ "customMode": false,
326
+ "instrumental": false
327
+ }
328
+ ```
329
+
330
+ Using explicit model (overrides default V5):
331
+ ```json
225
332
  {
226
333
  "prompt": "A relaxing electronic music track",
227
334
  "customMode": false,
@@ -230,7 +337,325 @@ Using environment variable (KIE_AI_CALLBACK_URL):
230
337
  }
231
338
  ```
232
339
 
233
- **Note**: In custom mode, `style` and `title` are required. If `instrumental` is false, `prompt` is used as exact lyrics. The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided.
340
+ **Note**: In custom mode, `style` and `title` are required. If `instrumental` is false, `prompt` is used as exact lyrics. The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. The `model` parameter defaults to "V5" but can be explicitly set to any available version.
341
+
342
+ ### 9. `elevenlabs_tts`
343
+ Generate speech from text using ElevenLabs TTS models (Turbo 2.5 by default, with optional Multilingual v2 support).
344
+
345
+ **Parameters:**
346
+ - `text` (string, required): The text to convert to speech (max 5000 characters)
347
+ - `model` (enum, optional): TTS model to use - "turbo" (faster, default) or "multilingual" (supports context)
348
+ - `voice` (enum, optional): Voice to use - "Rachel", "Aria", "Roger", "Sarah", "Laura", "Charlie", "George", "Callum", "River", "Liam", "Charlotte", "Alice", "Matilda", "Will", "Jessica", "Eric", "Chris", "Brian", "Daniel", "Lily", "Bill" (default: "Rachel")
349
+ - `stability` (number, optional): Voice stability (0-1, step 0.01, default: 0.5)
350
+ - `similarity_boost` (number, optional): Similarity boost (0-1, step 0.01, default: 0.75)
351
+ - `style` (number, optional): Style exaggeration (0-1, step 0.01, default: 0)
352
+ - `speed` (number, optional): Speech speed (0.7-1.2, step 0.01, default: 1.0)
353
+ - `timestamps` (boolean, optional): Whether to return timestamps for each word (default: false)
354
+ - `previous_text` (string, optional): Text that came before current request (multilingual model only, max 5000 chars)
355
+ - `next_text` (string, optional): Text that comes after current request (multilingual model only, max 5000 chars)
356
+ - `language_code` (string, optional): ISO 639-1 language code for language enforcement (turbo model only, max 500 chars)
357
+ - `callBackUrl` (string, optional): URL to receive task completion updates (uses KIE_AI_CALLBACK_URL environment variable if not provided)
358
+
359
+ **Examples:**
360
+
361
+ Basic TTS generation (uses Turbo model by default):
362
+ ```json
363
+ {
364
+ "text": "Hello, this is a test of the ElevenLabs text-to-speech system.",
365
+ "voice": "Rachel"
366
+ }
367
+ ```
368
+
369
+ Fast generation with language enforcement (Turbo model):
370
+ ```json
371
+ {
372
+ "text": "Bonjour, comment allez-vous?",
373
+ "voice": "Rachel",
374
+ "model": "turbo",
375
+ "language_code": "fr"
376
+ }
377
+ ```
378
+
379
+ Advanced voice controls with context (Multilingual model):
380
+ ```json
381
+ {
382
+ "text": "This is the second part of our conversation.",
383
+ "voice": "Roger",
384
+ "model": "multilingual",
385
+ "stability": 0.8,
386
+ "similarity_boost": 0.9,
387
+ "previous_text": "This is the first part of our conversation.",
388
+ "next_text": "This is the third part of our conversation."
389
+ }
390
+ ```
391
+
392
+ **Model Comparison:**
393
+ - **Turbo 2.5** (default): Faster generation (15-60 seconds), supports language enforcement with `language_code`
394
+ - **Multilingual v2**: Supports context with `previous_text`/`next_text`, generation takes 30-120 seconds
395
+
396
+ **Note**: The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. Choose Turbo model for speed and language enforcement, or Multilingual model for context-aware speech generation.
397
+
398
+ ### 10. `elevenlabs_ttsfx`
399
+ Generate sound effects from text descriptions using ElevenLabs Sound Effects v2 model.
400
+
401
+ **Parameters:**
402
+ - `text` (string, required): Description of the sound effect to generate (max 5000 chars)
403
+ - `loop` (boolean, optional): Whether to create a sound effect that loops smoothly (default: false)
404
+ - `duration_seconds` (number, optional): Duration in seconds (0.5-22, step 0.1). If not specified, optimal duration will be determined from prompt
405
+ - `prompt_influence` (number, optional): How closely to follow the prompt (0-1, step 0.01, default: 0.3). Higher values mean less variation
406
+ - `output_format` (string, optional): Audio output format (default: "mp3_44100_192")
407
+ - MP3 options: `mp3_22050_32`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192`
408
+ - PCM options: `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_44100`, `pcm_48000`
409
+ - Telephony: `ulaw_8000`, `alaw_8000`
410
+ - Opus: `opus_48000_32`, `opus_48000_64`, `opus_48000_96`, `opus_48000_128`, `opus_48000_192`
411
+ - `callBackUrl` (string, optional): URL for task completion notifications
412
+
413
+ **Examples:**
414
+
415
+ Basic sound effect:
416
+ ```json
417
+ {
418
+ "text": "Rain falling on a tin roof"
419
+ }
420
+ ```
421
+
422
+ Advanced sound effect with custom duration:
423
+ ```json
424
+ {
425
+ "text": "Epic thunderstorm with heavy rain and distant thunder",
426
+ "duration_seconds": 15.0,
427
+ "prompt_influence": 0.8,
428
+ "output_format": "mp3_44100_192"
429
+ }
430
+ ```
431
+
432
+ Looping ambient sound:
433
+ ```json
434
+ {
435
+ "text": "Gentle ocean waves lapping at the shore",
436
+ "loop": true,
437
+ "duration_seconds": 10.0
438
+ }
439
+ ```
440
+
441
+ **Key Features:**
442
+ - **High-Quality Audio**: Professional-grade sound effect generation
443
+ - **Flexible Duration**: Control exact length from 0.5 to 22 seconds
444
+ - **Loop Support**: Create seamless looping sound effects
445
+ - **Multiple Formats**: Support for MP3, PCM, Opus, and telephony formats
446
+ - **Prompt Control**: Adjust how closely to follow your description
447
+
448
+ **Note**: The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. Sound effects generation typically takes 30-90 seconds depending on complexity.
449
+
450
+ ### 12. `bytedance_seedance_video`
451
+ Generate videos using ByteDance Seedance models (unified tool for both text-to-video and image-to-video).
452
+
453
+ **Parameters:**
454
+ - `prompt` (string, required): Text prompt for video generation (max 10000 chars)
455
+ - `image_url` (string, optional): URL of input image for image-to-video generation (if not provided, uses text-to-video)
456
+ - `quality` (string, optional): Model quality level (default: "lite")
457
+ - `lite`: Faster generation with good quality
458
+ - `pro`: Higher quality with longer generation time
459
+ - `aspect_ratio` (string, optional): Video aspect ratio (default: "16:9")
460
+ - Options: `1:1`, `9:16`, `16:9`, `4:3`, `3:4`, `21:9`, `9:21`
461
+ - `resolution` (string, optional): Video resolution (default: "720p")
462
+ - `480p`: Faster generation
463
+ - `720p`: Balanced quality and speed
464
+ - `1080p`: Highest quality
465
+ - `duration` (string, optional): Video duration in seconds 2-12 (default: "5")
466
+ - `camera_fixed` (boolean, optional): Whether to fix camera position (default: false)
467
+ - `seed` (integer, optional): Random seed for reproducible results (default: -1 for random)
468
+ - `enable_safety_checker` (boolean, optional): Enable content safety checking (default: true)
469
+ - `end_image_url` (string, optional): URL of ending image (image-to-video only)
470
+ - `callBackUrl` (string, optional): URL for task completion notifications
471
+
472
+ **Examples:**
473
+
474
+ Text-to-video (lite quality):
475
+ ```json
476
+ {
477
+ "prompt": "A serene sailing boat gently sways in the harbor at dawn, surrounded by soft Impressionist hues of pink and orange",
478
+ "quality": "lite",
479
+ "aspect_ratio": "16:9",
480
+ "duration": "5"
481
+ }
482
+ ```
483
+
484
+ Image-to-video (pro quality):
485
+ ```json
486
+ {
487
+ "prompt": "A golden retriever dashing through shallow surf at the beach, splashes frozen in time",
488
+ "image_url": "https://example.com/golden-retriever.jpg",
489
+ "quality": "pro",
490
+ "resolution": "1080p",
491
+ "duration": "6",
492
+ "camera_fixed": false
493
+ }
494
+ ```
495
+
496
+ Video with specific ending frame:
497
+ ```json
498
+ {
499
+ "prompt": "A traveler crosses an endless desert toward a glowing archway",
500
+ "image_url": "https://example.com/desert-traveler.jpg",
501
+ "end_image_url": "https://example.com/archway.jpg",
502
+ "quality": "pro",
503
+ "duration": "8"
504
+ }
505
+ ```
506
+
507
+ **Key Features:**
508
+ - **Unified Interface**: Single tool for both text-to-video and image-to-video
509
+ - **Smart Mode Detection**: Automatically detects mode based on presence of `image_url`
510
+ - **Quality Options**: Lite for speed, Pro for quality
511
+ - **Flexible Aspect Ratios**: Support for vertical, horizontal, and square formats
512
+ - **Camera Control**: Option to fix camera position for stable shots
513
+ - **Reproducible Results**: Seed control for consistent output
514
+ - **Safety Features**: Built-in content safety checking
515
+
516
+ **Note**: The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. Video generation typically takes 2-5 minutes depending on quality and complexity.
517
+
518
+ ### 13. `runway_aleph_video`
519
+ Transform videos using Runway Aleph video-to-video generation with AI-powered editing.
520
+
521
+ **Parameters:**
522
+ - `prompt` (string, required): Text prompt describing desired video transformation (max 1000 chars)
523
+ - `videoUrl` (string, required): URL of the input video to transform
524
+ - `waterMark` (string, optional): Watermark text to add to the video (max 100 chars, default: "")
525
+ - `uploadCn` (boolean, optional): Whether to upload to China servers (default: false)
526
+ - `aspectRatio` (enum, optional): Output video aspect ratio (default: "16:9")
527
+ - Options: `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9`
528
+ - `seed` (integer, optional): Random seed for reproducible results (1-999999)
529
+ - `referenceImage` (string, optional): URL of reference image for style guidance
530
+ - `callBackUrl` (string, optional): URL for task completion notifications
531
+
532
+ **Examples:**
533
+
534
+ Basic video transformation:
535
+ ```json
536
+ {
537
+ "prompt": "Transform this video into a cinematic anime style with vibrant colors",
538
+ "videoUrl": "https://example.com/input-video.mp4",
539
+ "aspectRatio": "16:9"
540
+ }
541
+ ```
542
+
543
+ Advanced transformation with reference image:
544
+ ```json
545
+ {
546
+ "prompt": "Apply the artistic style of the reference image to this video",
547
+ "videoUrl": "https://example.com/cooking-video.mp4",
548
+ "referenceImage": "https://example.com/van-gogh-painting.jpg",
549
+ "seed": 123456,
550
+ "waterMark": "My Channel"
551
+ }
552
+ ```
553
+
554
+ Vertical video for social media:
555
+ ```json
556
+ {
557
+ "prompt": "Convert to a dreamy, ethereal style with soft lighting",
558
+ "videoUrl": "https://example.com/landscape-video.mp4",
559
+ "aspectRatio": "9:16",
560
+ "uploadCn": false
561
+ }
562
+ ```
563
+
564
+ **Key Features:**
565
+ - **Video-to-Video Transformation**: Transform existing videos with AI-powered editing
566
+ - **Style Transfer**: Apply artistic styles from text prompts or reference images
567
+ - **Aspect Ratio Control**: Convert between horizontal, vertical, and square formats
568
+ - **Reproducible Results**: Seed control for consistent transformations
569
+ - **Watermark Support**: Add custom watermarks to transformed videos
570
+ - **Reference Guidance**: Use reference images to guide the transformation style
571
+
572
+ **Note**: The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. Video-to-video transformation typically takes 3-8 minutes depending on complexity and length.
573
+
574
+ ### 14. `wan_video`
575
+ Generate videos using Alibaba Wan 2.5 models (unified tool for both text-to-video and image-to-video).
576
+
577
+ **Parameters:**
578
+ - `prompt` (string, required): Text prompt for video generation (max 800 chars)
579
+ - `image_url` (string, optional): URL of input image for image-to-video generation (if not provided, uses text-to-video)
580
+ - `aspect_ratio` (string, optional): Video aspect ratio for text-to-video (default: "16:9")
581
+ - Options: `16:9`, `9:16`, `1:1`
582
+ - `resolution` (string, optional): Video resolution (default: "1080p")
583
+ - `720p`: Faster generation
584
+ - `1080p`: Higher quality
585
+ - `duration` (string, optional): Video duration for image-to-video (default: "5")
586
+ - Options: `5`, `10` seconds
587
+ - `negative_prompt` (string, optional): Negative prompt to describe content to avoid (max 500 chars, default: "")
588
+ - `enable_prompt_expansion` (boolean, optional): Enable prompt rewriting using LLM (default: true)
589
+ - `seed` (integer, optional): Random seed for reproducible results
590
+ - `callBackUrl` (string, optional): URL for task completion notifications
591
+
592
+ **Examples:**
593
+
594
+ Text-to-video generation:
595
+ ```json
596
+ {
597
+ "prompt": "A dimly lit jazz bar at night, wooden tables glowing under warm pendant lights. Patrons sip drinks and chat quietly while a three-piece band performs on stage. The saxophone player stands under a spotlight, gleaming instrument reflecting the light. No dialogue. Ambient audio: smooth live jazz music with saxophone and piano, clinking glasses, low murmur of audience conversations.",
598
+ "aspect_ratio": "16:9",
599
+ "resolution": "1080p",
600
+ "enable_prompt_expansion": true,
601
+ "seed": 42
602
+ }
603
+ ```
604
+
605
+ Image-to-video generation:
606
+ ```json
607
+ {
608
+ "prompt": "The same woman from the reference image looks directly into the camera, takes a breath, then smiles brightly and speaks with enthusiasm: 'Have you heard? Alibaba Wan 2.5 API is now available on Kie.ai!'",
609
+ "image_url": "https://example.com/portrait.jpg",
610
+ "duration": "5",
611
+ "resolution": "1080p",
612
+ "negative_prompt": "blurry, low quality",
613
+ "seed": 123
614
+ }
615
+ ```
616
+
617
+ **Key Features:**
618
+ - **Unified Interface**: Single tool for both text-to-video and image-to-video
619
+ - **Smart Mode Detection**: Automatically detects mode based on presence of `image_url`
620
+ - **Prompt Expansion**: LLM-powered prompt rewriting for better results with short prompts
621
+ - **Flexible Resolutions**: 720p for speed, 1080p for quality
622
+ - **Aspect Ratio Control**: Support for horizontal, vertical, and square formats (text-to-video)
623
+ - **Duration Control**: 5 or 10 second options for image-to-video
624
+ - **Negative Prompts**: Fine-tune results by specifying what to avoid
625
+ - **Reproducible Results**: Seed control for consistent output
626
+
627
+ **Note**: The `callBackUrl` is optional and will use the `KIE_AI_CALLBACK_URL` environment variable if not provided. Video generation typically takes 2-6 minutes depending on resolution and complexity.
628
+
629
+ ## Why Developers Choose Kie.ai Over Alternatives
630
+
631
+ ### 💸 **Better Value Than Fal.ai**
632
+ - **Lower costs** for the same premium AI models
633
+ - **Pay-as-you-go pricing** - no monthly commitments
634
+ - **Free trial** to test before you buy
635
+
636
+ ### 🛠️ **Developer Experience**
637
+ - **Single API key** for all models
638
+ - **Documentation** with examples
639
+ - **Simple integration** - get started in minutes
640
+ - **24/7 support** from technical team
641
+
642
+ ### 🚀 **Performance**
643
+ - **99.9% uptime**
644
+ - **Fast response times** (25.2s average)
645
+ - **High concurrency** for production workloads
646
+ - **Reliable results**
647
+
648
+ ### 🔒 **Security**
649
+ - **Encryption** for your data
650
+ - **GDPR compliant** data handling
651
+ - **Private prompts and results**
652
+ - **Regular security updates**
653
+
654
+ ### 🎯 **Platform**
655
+ - **Latest AI models** as they're released
656
+ - **Backward compatible** API
657
+ - **Feature updates** based on feedback
658
+ - **Active development**
234
659
 
235
660
  ## API Endpoints
236
661
 
@@ -245,6 +670,11 @@ The server interfaces with these Kie.ai API endpoints:
245
670
  - **Nano Banana Status**: `GET /api/v1/jobs/recordInfo`
246
671
  - **Suno Music Generation**: `POST /api/v1/generate` ✅ **VALIDATED**
247
672
  - **Suno Music Status**: `GET /api/v1/generate?taskId=XXX` ✅ **VALIDATED**
673
+ - **ElevenLabs TTS Generation**: `POST /api/v1/jobs/createTask` ✅ **VALIDATED**
674
+ - **ElevenLabs TTS Status**: `GET /api/v1/jobs/recordInfo` ✅ **VALIDATED**
675
+ - **ElevenLabs Sound Effects**: `POST /api/v1/jobs/createTask` ✅ **VALIDATED**
676
+ - **ByteDance Seedance Video**: `POST /api/v1/jobs/createTask` ✅ **VALIDATED**
677
+ - **ByteDance Seedance Status**: `GET /api/v1/jobs/recordInfo` ✅ **VALIDATED**
248
678
 
249
679
  All endpoints follow official Kie.ai API documentation.
250
680
 
@@ -256,7 +686,7 @@ The server uses SQLite to track tasks:
256
686
  CREATE TABLE tasks (
257
687
  id INTEGER PRIMARY KEY AUTOINCREMENT,
258
688
  task_id TEXT UNIQUE NOT NULL,
259
- api_type TEXT NOT NULL, -- 'nano-banana', 'nano-banana-edit', 'veo3', 'suno'
689
+ api_type TEXT NOT NULL, -- 'nano-banana', 'nano-banana-edit', 'veo3', 'suno', 'elevenlabs-tts', 'elevenlabs-tts-turbo', 'elevenlabs-sound-effects', 'bytedance-seedance-video'
260
690
  status TEXT DEFAULT 'pending',
261
691
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
262
692
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
@@ -265,6 +695,142 @@ CREATE TABLE tasks (
265
695
  );
266
696
  ```
267
697
 
698
+ ## Database & Task Management
699
+
700
+ The server includes a built-in SQLite database for persistent task tracking and management.
701
+
702
+ ### **Database Features**
703
+
704
+ - **🔄 Persistent Storage**: Tasks survive server restarts
705
+ - **📊 Complete History**: Track all generation tasks and their results
706
+ - **⚡ Smart Caching**: Local database reduces API calls for status checks
707
+ - **🔍 Full Audit Trail**: Complete lifecycle tracking for every task
708
+ - **🎯 Intelligent Routing**: Database provides api_type for correct endpoint selection
709
+
710
+ ### **Task Lifecycle**
711
+
712
+ ```
713
+ 1. Task Created → INSERT (status: 'pending')
714
+ 2. API Processing → UPDATE (status: 'processing')
715
+ 3. API Complete → UPDATE (status: 'completed', result_url: '...')
716
+ 4. API Failed → UPDATE (status: 'failed', error_message: '...')
717
+ ```
718
+
719
+ ### **Available Task Management Tools**
720
+
721
+ #### **1. `list_tasks`**
722
+ List all tasks in the database with optional limit.
723
+
724
+ ```json
725
+ {
726
+ "limit": 50 // optional, default 100
727
+ }
728
+ ```
729
+
730
+ **Response:**
731
+ ```json
732
+ {
733
+ "tasks": [
734
+ {
735
+ "id": 1,
736
+ "task_id": "281e5b0*********************f39b9",
737
+ "api_type": "veo3",
738
+ "status": "completed",
739
+ "created_at": "2025-01-14T10:30:00.000Z",
740
+ "updated_at": "2025-01-14T10:35:00.000Z",
741
+ "result_url": "https://file.aiquickdraw.com/custom-page/akr/video.mp4",
742
+ "error_message": null
743
+ }
744
+ ]
745
+ }
746
+ ```
747
+
748
+ #### **2. `get_task_status`**
749
+ Get detailed status of a specific task, combining local database with live API data.
750
+
751
+ ```json
752
+ {
753
+ "task_id": "281e5b0*********************f39b9"
754
+ }
755
+ ```
756
+
757
+ **Response:**
758
+ ```json
759
+ {
760
+ "task_id": "281e5b0*********************f39b9",
761
+ "api_type": "veo3",
762
+ "status": "completed",
763
+ "local_status": "completed",
764
+ "api_status": "success",
765
+ "created_at": "2025-01-14T10:30:00.000Z",
766
+ "updated_at": "2025-01-14T10:35:00.000Z",
767
+ "result_url": "https://file.aiquickdraw.com/custom-page/akr/video.mp4",
768
+ "api_data": {
769
+ "state": "success",
770
+ "resultJson": "{\"resultUrls\":[\"https://file.aiquickdraw.com/custom-page/akr/video.mp4\"]}",
771
+ "costTime": 180000,
772
+ "completeTime": 1757584164490
773
+ }
774
+ }
775
+ ```
776
+
777
+ ### **Database Configuration**
778
+
779
+ #### **Environment Variables**
780
+ ```bash
781
+ # Custom database file location (optional)
782
+ KIE_AI_DB_PATH=./custom_tasks.db
783
+
784
+ # Default: ./tasks.db in current working directory
785
+ ```
786
+
787
+ #### **Database Behavior**
788
+ - **Auto-initialization**: Creates tables and indexes on first run
789
+ - **Indexing**: Optimized queries on `task_id` and `status` fields
790
+ - **Thread-safe**: Uses SQLite serialization for concurrent access
791
+ - **Persistent**: Data survives server restarts
792
+ - **Inspectable**: Can be opened with any SQLite client tool
793
+
794
+ ### **Smart Status Checking**
795
+
796
+ The `get_task_status` tool uses intelligent routing:
797
+
798
+ 1. **Query Local Database**: Fast lookup of task metadata
799
+ 2. **API Status Check**: Calls appropriate endpoint based on `api_type`
800
+ 3. **Database Update**: Stores latest status from API response
801
+ 4. **Combined Response**: Merges local and API data for complete picture
802
+
803
+ ### **API Type Routing**
804
+
805
+ The database `api_type` field determines which Kie.ai endpoint to query:
806
+
807
+ | api_type | Endpoint | Purpose |
808
+ |----------|----------|---------|
809
+ | `veo3` | `/veo/record-info` | Veo3 video generation |
810
+ | `nano-banana` | `/jobs/recordInfo` | Image generation |
811
+ | `nano-banana-edit` | `/jobs/recordInfo` | Image editing |
812
+ | `nano-banana-upscale` | `/jobs/recordInfo` | Image upscaling |
813
+ | `suno` | `/generate/record-info` | Music generation |
814
+ | `elevenlabs-tts` | `/jobs/recordInfo` | Text-to-speech |
815
+ | `elevenlabs-tts-turbo` | `/jobs/recordInfo` | Turbo TTS |
816
+ | `elevenlabs-sound-effects` | `/jobs/recordInfo` | Sound effects |
817
+ | `bytedance-seedance-video` | `/jobs/recordInfo` | Video generation |
818
+
819
+ ### **Task Status Values**
820
+
821
+ - **`pending`**: Task created, waiting for API processing
822
+ - **`processing`**: API is actively processing the task
823
+ - **`completed`**: Task finished successfully, result available
824
+ - **`failed`**: Task failed, error message available
825
+
826
+ ### **Best Practices**
827
+
828
+ - **Use `list_tasks`** to get overview of all generation activity
829
+ - **Use `get_task_status`** for detailed progress tracking
830
+ - **Monitor `updated_at`** to see when status last changed
831
+ - **Check `error_message`** for failed tasks to debug issues
832
+ - **Use `result_url`** to access completed generation results
833
+
268
834
  ## Usage Examples
269
835
 
270
836
  ### Basic Image Generation
@@ -295,6 +861,79 @@ curl -X POST http://localhost:3000/tools/call \
295
861
  }'
296
862
  ```
297
863
 
864
+ ## Real-World Use Cases
865
+
866
+ ### 🎬 **Content Creation Agencies**
867
+ ```bash
868
+ # Generate social media video content
869
+ veo3_generate_video: "A trendy coffee shop with latte art, cinematic lighting"
870
+
871
+ # Create product photography
872
+ nano_banana_generate: "Luxury watch on marble surface, professional product shot"
873
+
874
+ # Add background music
875
+ suno_generate_music: "Upbeat corporate background music, 2 minutes"
876
+ ```
877
+
878
+ ### 🎮 **Game Development Studios**
879
+ ```bash
880
+ # Generate game assets
881
+ nano_banana_generate: "Fantasy sword with glowing runes, game asset style"
882
+
883
+ # Create character voiceovers
884
+ elevenlabs_tts: "Welcome, brave adventurer! Your quest begins now."
885
+
886
+ # Design sound effects
887
+ elevenlabs_ttsfx: "Magical spell casting with sparkles and energy"
888
+ ```
889
+
890
+ ### 📱 **Mobile App Developers**
891
+ ```bash
892
+ # Generate app icons and illustrations
893
+ nano_banana_generate: "Modern minimalist app icon for fitness tracker"
894
+
895
+ # Create tutorial videos
896
+ bytedance_seedance_video: "Screen recording showing app features, clean interface"
897
+
898
+ # Add narration
899
+ elevenlabs_tts: "Tap here to get started with your new profile"
900
+ ```
901
+
902
+ ### 🏢 **Enterprise Applications**
903
+ ```bash
904
+ # Generate training materials
905
+ veo3_generate_video: "Professional office environment, employee training scenario"
906
+
907
+ # Create corporate presentations
908
+ nano_banana_edit: "Add company logo to presentation slide, maintain professional style"
909
+
910
+ # Produce marketing content
911
+ suno_generate_music: "Corporate background music for promotional video"
912
+ ```
913
+
914
+ ### 🎨 **Creative Professionals**
915
+ ```bash
916
+ # Artistic projects
917
+ bytedance_seedance_video: "Abstract art coming to life, vibrant colors flowing"
918
+
919
+ # Photography enhancement
920
+ nano_banana_upscale: "Portrait photo, 4x enhancement with face restoration"
921
+
922
+ # Audio production
923
+ elevenlabs_sound_effects: "Nature soundscape with birds and gentle wind"
924
+ ```
925
+
926
+ ## Success Stories
927
+
928
+ ### 🚀 **Startup Reduces AI Costs**
929
+ *"Switched from multiple AI services to Kie.ai and cut our monthly AI budget from $2,000 to $600. The unified API simplified our codebase."* - CTO, Content Startup
930
+
931
+ ### ⚡ **Agency Speeds Up Delivery**
932
+ *"Our video production timeline went from 2 weeks to 3 days using Veo 3. Clients like the quality and we handle more projects."* - Creative Director, Marketing Agency
933
+
934
+ ### 🎵 **Music Producer Scales Work**
935
+ *"Suno API lets us generate custom background music for client videos in minutes instead of days. It improved our workflow."* - Producer, Video Production Company
936
+
298
937
  ## Error Handling
299
938
 
300
939
  The server handles these HTTP error codes from Kie.ai:
@@ -368,6 +1007,29 @@ For issues related to:
368
1007
  - **Kie.ai API**: Contact support@kie.ai or check https://docs.kie.ai/
369
1008
  - **API Keys**: Visit https://kie.ai/api-key
370
1009
 
1010
+ ## 🚀 Start Building with Kie.ai
1011
+
1012
+ Developers are using Kie.ai for their AI media generation:
1013
+
1014
+ ### 🎯 **Get Started**
1015
+ 1. **Get your free API key** at [kie.ai/api-key](https://kie.ai/api-key)
1016
+ 2. **Install the MCP server**: `npm install @felores/kie-ai-mcp-server`
1017
+ 3. **Generate your first AI content** in minutes
1018
+
1019
+ ### 💡 **Benefits**
1020
+ - ✅ **Free trial** - Test models before paying
1021
+ - ✅ **Lower pricing** than Fal.ai and Replicate.com
1022
+ - ✅ **99.9% uptime**
1023
+ - ✅ **24/7 support**
1024
+ - ✅ **Simple integration**
1025
+
1026
+ ### 🌟 **AI Content Generation**
1027
+ Kie.ai provides access to advanced AI models at competitive pricing.
1028
+
1029
+ **Start your project today.** 🚀
1030
+
1031
+ ---
1032
+
371
1033
  ## License
372
1034
 
373
1035
  MIT License - see LICENSE file for details.