# Kieai

AI API platform providing video generation (Veo3, Kling, Runway, Luma), image generation (Flux, Nano Banana), music creation (Suno), and LLM capabilities with pay-as-you-go pricing

- **Category:** artificial intelligence
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 35
- **Triggers:** 0
- **Slug:** `KIEAI`
- **Version:** 20260407_00

## Tools

### Add Instrumental to Vocal Track

**Slug:** `KIEAI_ADD_INSTRUMENTAL`

Add AI-generated instrumental accompaniment to an existing vocal track. Use when you need to generate instrumental music to accompany a vocal recording, allowing customization of style, mood, and creative parameters. The task completion will be notified via the callback URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | string | Yes | Music styles/tags to include in the generated instrumental. Comma-separated list of music genres or characteristics. |
| `model` | string | No | AI model version to use. Options: V4_5PLUS, V5, V5_5. Default: V4_5PLUS |
| `title` | string | Yes | Title of the generated music/instrumental. |
| `upload_url` | string | Yes | URL of the audio file to add accompaniment to. Must be a publicly accessible MP3 or audio file URL. |
| `audio_weight` | number | No | Relative weight of audio elements (0-1, 2 decimals). Controls how much the original audio influences the output. |
| `callback_url` | string | Yes | URL for receiving task completion updates via webhook. |
| `style_weight` | number | No | Style adherence strength (0-1, 2 decimals). Higher values make the output closer to the specified style. |
| `vocal_gender` | string | No | Vocal preference for the instrumental generation. Use 'm' for male or 'f' for female. |
| `negative_tags` | string | Yes | Music styles/characteristics to exclude from the generated instrumental. |
| `weirdness_constraint` | number | No | Creative deviation level (0-1, 2 decimals). Higher values produce more creative/unusual results. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add vocals to instrumental

**Slug:** `KIEAI_ADD_VOCALS`

Add AI-generated vocals to an existing instrumental music track. Use this action when you want to add singing or vocal tracks to accompany an existing instrumental audio file. The action submits a vocal generation task and returns a task ID that can be used to track the generation status. This action is asynchronous - use the returned taskId to poll for completion via the callback URL or check task status separately.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("V4_5PLUS" | "V5" | "V5_5") | No | Available AI model versions for vocal generation. |
| `style` | string | Yes | Music style (e.g., jazz, electronic, classical, pop) |
| `title` | string | Yes | Music title displayed in player interface and file name |
| `prompt` | string | Yes | Prompt for generating audio; describes audio content and guides vocal singing style |
| `upload_url` | string | Yes | URL of the uploaded audio file to add vocals to |
| `audio_weight` | number | No | Relative weight of audio elements (0-1) |
| `callback_url` | string | Yes | URL for receiving task completion updates |
| `style_weight` | number | No | Adherence strength to specified style (0-1, 2 decimal places) |
| `vocal_gender` | string ("m" | "f") | No | Voice gender preference for vocals. |
| `negative_tags` | string | Yes | Excluded music styles to avoid in generated music |
| `weirdness_constraint` | number | No | Creative/experimental deviation level (0-1) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Market Task

**Slug:** `KIEAI_CREATE_MARKET_TASK`

Create a task for unified model access through the Market API. Submit tasks to any supported AI model (Kling, Sora2, Hailuo, Wan, Google, Ideogram, ElevenLabs, etc.) through a single unified interface. Specify the model and its input parameters, then receive a task ID to poll for completion. Use this action when you need to generate content (text-to-speech, images, video, etc.) via Kie.ai's unified Market API with access to multiple AI providers through one endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input` | object | Yes | Input parameters for the model. Parameters vary by model type - see model-specific documentation. |
| `model` | string | Yes | Model identifier in format 'provider/model-name'. Examples: 'elevenlabs/text-to-speech-multilingual-v2', 'kling/video-generation', 'ideogram/image-generation', 'wan/video-generation'. |
| `call_back_url` | string | No | Optional URL to receive a callback when the task completes. Must be a valid HTTPS URL. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create music video from generated audio

**Slug:** `KIEAI_CREATE_MUSIC_VIDEO`

Create a music video (MP4) combining generated music with visuals. Use this action when you need to generate an MP4 music video from previously generated music tracks. The action requires a task ID from the music generation process and an audio ID for the specific track. The video generation is async - results are delivered to the specified callback URL. Once the video is ready, the callback URL receives a POST request with: - code: 0 for success, 500 for error - data.task_id: The unique task identifier - data.video_url: The video URL (valid for 14 days)

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `author` | string | No | Artist/creator name displayed as signature on video cover. Maximum 50 characters |
| `task_id` | string | Yes | Unique identifier of the music generation task, returned from Generate Music or Extend Music endpoints |
| `audio_id` | string | Yes | Unique identifier of the specific audio track to visualize, returned in callback data after music generation completes |
| `domain_name` | string | No | Website or brand shown as watermark at bottom of video. Maximum 50 characters |
| `call_back_url` | string | Yes | URL to receive task completion updates via POST request with JSON payload containing video file location |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Execute GPT Codex

**Slug:** `KIEAI_EXECUTE_GPT_CODEX`

Access GPT Codex capabilities through the KIE.AI Market API. Use when you need to leverage advanced code understanding and generation abilities via the Codex model for tasks such as code completion, refactoring, bug explanation, or general programming assistance. The action supports both single-turn queries (plain string input) and multi-turn conversations (list of message objects with roles). Optional features include configurable reasoning depth, web search for up-to-date information, and function calling for structured tool use. Note: Web search and function tools are mutually exclusive and cannot be used together in the same request. When streaming is enabled (stream=True), the response is delivered incrementally via SSE events.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `input` | string | Yes | The input to send to the model. Can be a plain string for a single-turn query, or a list of message objects for multi-turn conversations. Each message requires a role ('user', 'assistant', 'system', 'developer', 'tool') and content. |
| `model` | string ("gpt-5-codex" | "gpt-5.1-codex" | "gpt-5.2-codex" | "gpt-5.3-codex" | "gpt-5.4-codex") | Yes | The GPT Codex model to use. Options: gpt-5-codex, gpt-5.1-codex, gpt-5.2-codex, gpt-5.3-codex, gpt-5.4-codex |
| `tools` | array | No | Tools to enable for the model. Can include web_search ('{"type": "web_search"}') or function definitions. Web search and function tools are mutually exclusive and cannot be used together in the same request. |
| `stream` | boolean | No | Enable real-time SSE streaming when set to True. When False (default), the full response is returned at once. Streaming returns incremental deltas rather than the complete response. |
| `reasoning` | object | No | Reasoning configuration for the Codex model. |
| `tool_choice` | string | No | Controls how the model selects tools. Set to 'auto' when using function tools. Must not be set when using web_search alone. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extend Suno Music

**Slug:** `KIEAI_EXTEND_MUSIC`

Extend an existing Suno music track with additional AI-generated content. Use this action when you need to extend or modify existing music by creating a continuation or variation based on the provided audio ID and parameters. The action submits a generation request and returns a task ID that can be used to track the progress via callback. Note: When defaultParamFlag is false, provide custom parameters (prompt, styleWeight, etc.) to control the extension behavior. When defaultParamFlag is true, provide continueAt, style, and title instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("V4" | "V4_5" | "V4_5PLUS" | "V4_5ALL" | "V5" | "V5_5") | Yes | The AI model version to use for music generation. |
| `style` | string | No | Music style specification (e.g., 'pop', 'rock', 'jazz'). Only required when defaultParamFlag is true. |
| `title` | string | No | Track title for the extended music. Only required when defaultParamFlag is true. |
| `prompt` | string | No | Description of the desired extension content. This instructs the AI on what kind of continuation or variation to create. Required when defaultParamFlag is false. |
| `audioId` | string | Yes | The unique identifier of the audio track to extend. |
| `personaId` | string | No | Custom persona ID for personalized generation style. |
| `continueAt` | number | No | Start time point in seconds for the extension. Only required when defaultParamFlag is true. |
| `audioWeight` | number | No | Weight given to the original audio's characteristics. Value between 0 and 1. |
| `callBackUrl` | string | Yes | URL to receive task completion notifications. The API will send a callback when the generation is complete. |
| `styleWeight` | number | No | Controls how closely the style should match. Value between 0 and 1. |
| `vocalGender` | string ("m" | "f") | No | Vocal gender options for music generation. |
| `negativeTags` | string | No | Styles or traits to exclude from the generated music. |
| `defaultParamFlag` | boolean | Yes | Controls parameter source. When true, uses default parameters and requires continueAt, style, and title. When false, uses custom parameters provided in the request. |
| `weirdnessConstraint` | number | No | Controls creative randomness. Value between 0 and 1, where 0 is conventional and 1 is highly experimental. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Extend Veo Video

**Slug:** `KIEAI_EXTEND_VEO_VIDEO`

Extend an existing Veo3.1 video with additional AI-generated content. Continues a previously generated video by adding new frames that seamlessly follow the original video. Use this action when you need to extend a video generated through the Veo3.1 API with additional content. After submission, poll 'Get Veo Video Details' using the returned taskId to check extension status until completion. Note: Video extension is asynchronous. You will receive a taskId in the response that must be used to poll for completion status. Only videos generated through the Veo3.1 API can be extended, and videos generated after 1080P cannot be extended.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("fast" | "quality") | No | Generation mode for the video extension. 'fast' provides quicker generation, 'quality' provides higher quality but slower generation. |
| `seeds` | integer | No | Random seed for reproducible generation. If not specified, a random seed will be assigned. Range: 10000-99999. |
| `prompt` | string | Yes | Text prompt describing the extended video content. Include detailed descriptions of how the video should continue. |
| `taskId` | string | Yes | Task ID of the original video generation task to extend. Must be a video generated through the Veo3.1 API. |
| `watermark` | string | No | Optional watermark text to add to the generated video extension. |
| `call_back_url` | string | No | Optional HTTPS URL to receive a POST callback when the video extension completes. Must accept JSON payloads. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Aleph Video

**Slug:** `KIEAI_GENERATE_ALEPH_VIDEO`

Generate AI video using Runway Aleph model from text prompts. Creates high-quality video content based on detailed text descriptions, optionally with reference video or image inputs. Use when you need to generate a video from a text description (text-to-video) or transform an existing video with AI (video-to-video). After submission, poll 'Get Aleph Video Details' using the returned taskId to check generation status until completion. Note: Video generation is asynchronous. You will receive a taskId in the response that must be used to poll for completion status. Generated videos are available for 14 days after completion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `seed` | integer | No | Random seed for reproducible generation. If not specified, a random seed will be used. Using the same seed with identical parameters may produce similar results. |
| `prompt` | string | Yes | Descriptive text prompt guiding the AI video generation. Include specific details about the subject, action, style, lighting, camera movement, and setting for best results. |
| `uploadCn` | boolean | No | Upload method for the generated video. Set to true to upload to Alibaba Cloud OSS (for China region), or false for overseas R2 storage. |
| `videoUrl` | string | No | Reference video URL for video-to-video generation. The Aleph model will use this as the base and apply the prompt's style and modifications. |
| `waterMark` | string | No | Optional watermark text to add to the generated video. If empty or not provided, no watermark is added. |
| `aspectRatio` | string ("16:9" | "9:16" | "4:3" | "3:4" | "1:1" | "21:9") | No | Video aspect ratio for Aleph generation. |
| `callBackUrl` | string | No | Optional HTTPS URL to receive a POST callback when the video generation completes. The callback payload includes video URLs and task information. |
| `referenceImage` | string | No | Reference image URL to influence the output style, content, or composition. The generated video will incorporate elements from both the reference image and the prompt. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Music Cover

**Slug:** `KIEAI_GENERATE_COVER`

Generate a personalized cover version of a song using AI. Use when you want to create AI-generated variations or custom covers of existing music tracks. Each music task can only generate one Cover. Cover images are typically valid for 14 days. The action returns a task ID that can be used to track the generation progress. The callback URL will receive a POST request when cover generation completes, containing the task ID and generated image URLs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | The original music task ID returned by the music generation interface. This identifies the source song to create a cover from. |
| `call_back_url` | string | Yes | A valid URL to receive completion notifications via POST request when the cover generation is finished. Must be accessible and able to receive POST requests. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Flux Kontext Image

**Slug:** `KIEAI_GENERATE_FLUX_KONTEXT_IMAGE`

Generate or edit images using the Flux Kontext model. Supports both text-to-image generation and image editing modes. Use when you need to create new images from text descriptions or edit existing images with AI-powered transformations. The API returns a task ID that can be used to poll for completion status. Generated images expire after 14 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("flux-kontext-pro" | "flux-kontext-max") | No | Available Flux Kontext models. |
| `prompt` | string | Yes | Text description for image generation or editing. English language prompts are recommended for best results. Supports text-to-image generation and image editing modes. |
| `watermark` | string | No | Optional watermark identifier to embed in the generated image. The watermark will be visible in the output if provided. |
| `input_image` | string | No | URL of an existing image to use as a reference for editing mode. When provided, the model will edit the input image rather than generating from scratch. Leave empty for text-to-image generation. |
| `aspect_ratio` | string ("21:9" | "16:9" | "4:3" | "1:1" | "3:4" | "9:16") | No | Supported aspect ratios for image generation. |
| `callback_url` | string | No | Optional URL to receive a callback notification when the generation task is complete. The callback will be sent as a POST request with the task result. |
| `output_format` | string ("jpeg" | "png") | No | Supported output formats for generated images. |
| `safety_tolerance` | integer | No | Moderation tolerance level from 0 (strictest) to 6 (most permissive). Lower values filter more content, higher values allow more creative freedom. Defaults to 2. |
| `enable_translation` | boolean | No | Whether to automatically translate non-English prompts to English. Set to false if your prompt is already in English to avoid unnecessary translation. Defaults to true. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate GPT-4o Image

**Slug:** `KIEAI_GENERATE_GPT4O_IMAGE`

Generate images using the GPT-4o image generation model. Creates AI-generated images from text prompts. Use when you need to create new images from text descriptions. The API returns a task ID that should be polled using the 'Get GPT-4o Image Details' action to check completion status and retrieve the generated image URLs. Generated images are stored for 14 days and download URLs are valid for 20 minutes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `size` | string ("1:1" | "3:2" | "2:3") | Yes | Aspect ratio of the output image. Supported values: 1:1 (square, good for social media/avatars), 3:2 (landscape, good for photos/banners), 2:3 (portrait, good for mobile wallpapers/posters). |
| `prompt` | string | Yes | Text description for the image to generate. Be specific and detailed for best results. English language prompts are recommended. |
| `mask_url` | string | No | URL of a mask image for partial editing. Black areas in the mask will be edited; white areas remain unchanged. Only used when filesUrl is also provided. |
| `files_url` | array | No | List of input image URLs for editing mode (max 5 images). When provided, the model will edit these images rather than generating from scratch. Leave empty for text-to-image generation. |
| `is_enhance` | boolean | No | Whether to enable automatic prompt enhancement. When true, the API will improve and expand your prompt for better results. Defaults to false. |
| `n_variants` | integer | No | Number of image variants to generate. Valid values: 1, 2, or 4. Each variant will have a slightly different interpretation of the prompt. |
| `callback_url` | string | No | Optional webhook URL to receive a POST callback when the generation task is complete. The callback will contain the task result with image URLs. |
| `fallback_model` | string ("FLUX_MAX" | "GPT_IMAGE_1") | No | Fallback model options when primary model is unavailable. |
| `enable_fallback` | boolean | No | Whether to enable automatic fallback to an alternative model if the primary model is unavailable. Defaults to false. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate AI Lyrics

**Slug:** `KIEAI_GENERATE_LYRICS`

Generate creative lyrics using AI. Creates new song lyrics based on the provided prompt, style, and other parameters. Use when you want to create AI-generated song lyrics for a music track or need creative lyrical content. The action returns a task ID that can be used to track the generation progress. When generation completes, the callback URL will receive a POST request with the generated lyrics data including 2-3 lyric variations with titles. Note: Generated lyrics are retained for 14 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `prompt` | string | Yes | Description of desired lyrics content. Maximum 200 characters. Specific themes, moods, styles, or story elements yield better results. |
| `call_back_url` | string | Yes | A valid URL to receive completion notifications via POST request when the lyrics generation is finished. Must be accessible and able to receive POST requests. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate MIDI

**Slug:** `KIEAI_GENERATE_MIDI`

Generate MIDI file from audio or music generation. Converts audio tracks to MIDI format for use in digital audio workstations. Use when you need to convert separated audio stems (from vocal/instrument separation) into MIDI files for further music production workflows. This action requires a valid taskId from a prior vocal separation operation and a callback URL to receive completion notifications. Prerequisites: Must first use the Vocal & Instrument Stem Separation API to separate audio before generating MIDI.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Task ID from completed vocal separation. This is a required field that identifies the separated audio task. |
| `audioId` | string | No | Specifies which separated audio track to generate MIDI from. If not provided, generates from all tracks. |
| `callBackUrl` | string | Yes | URL to receive MIDI generation completion notifications. This is a required field. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Music Style

**Slug:** `KIEAI_GENERATE_MUSIC_STYLE`

Boost or enhance music style parameters for improved music generation. Use when you need to generate or enhance music style descriptions to influence AI music generation. The content field should contain a concise description of the desired music style. Returns a task ID that can be used to track the generation progress and credits information for the request.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | Yes | Style description for music generation. Concise description of the desired music style. Example: 'Pop, Mysterious' |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Sounds

**Slug:** `KIEAI_GENERATE_SOUNDS`

Generate sound effects or audio clips based on a text description. Creates AI-generated audio sounds with configurable parameters like tempo, key, and looping. Use this action when you need to generate sound effects, short audio clips, or ambient sounds for projects. The action submits a generation request and returns a task ID that can be used to track progress via polling or callback. Supports BPM control (1-300), musical key selection (e.g., Cm, D#m, Any), looping option, and optional lyrics capture. The generated sounds are typically valid for 14 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("V5" | "V5_5") | No | Available models for sound generation. |
| `prompt` | string | Yes | Text description of the sound to generate. Limited to 500 characters. |
| `sound_key` | string | No | Musical key for the sound (e.g., 'Cm', 'D#m', 'Any'). |
| `sound_loop` | boolean | No | Whether the generated sound should loop seamlessly. Defaults to false. |
| `grab_lyrics` | boolean | No | Whether to capture lyrics subtitles from the generated sound. Defaults to false. |
| `sound_tempo` | integer | No | BPM (beats per minute) for the sound. Must be between 1 and 300. |
| `call_back_url` | string | No | Callback URL to receive task completion notifications when the generation is finished. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Timestamped Lyrics

**Slug:** `KIEAI_GENERATE_TIMESTAMPED_LYRICS`

Retrieve synchronized lyrics with timestamps for a music track. Gets lyrics with time markers for karaoke-style synchronization. Use this action when you need to display synchronized lyrics for a generated music track or implement karaoke-style highlighting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | Unique identifier of the music generation task, returned from 'Generate Music' or 'Extend Music' endpoints. |
| `audio_id` | string | Yes | Unique identifier of the specific audio track for which to retrieve lyrics. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Generate Veo Video

**Slug:** `KIEAI_GENERATE_VEO_VIDEO`

Generate AI video using Google Veo3.1 model from text prompts or images. Creates high-quality video content based on detailed text descriptions or by animating provided images. Use when you need to generate a video from a text description (text-to-video) or animate one or more reference images (image-to-video). After submission, poll 'Get Veo Video Details' using the returned taskId to check generation status until completion. Note: Video generation is asynchronous. You will receive a taskId in the response that must be used to poll for completion status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string ("veo3" | "veo3_fast") | No | Veo model to use for generation. 'veo3' provides higher quality but slower generation. 'veo3_fast' generates faster with slightly reduced quality. |
| `seeds` | integer | No | Random seed for reproducible generation. If not specified, a random seed will be assigned. Range: 10000-99999. |
| `prompt` | string | Yes | Text prompt describing the desired video content. Include detailed descriptions of the scene, actions, camera movements, and visual style for best results. |
| `imageUrls` | array | No | List of image URLs (1-2 images) for image-to-video mode. Required when generationType is 'FIRST_AND_LAST_FRAMES_2_VIDEO' or 'REFERENCE_2_VIDEO'. Images must be publicly accessible. |
| `watermark` | string | No | Optional watermark text to add to the generated video. |
| `aspect_ratio` | string ("16:9" | "9:16" | "Auto") | No | Video aspect ratio. '16:9' for landscape, '9:16' for portrait, 'Auto' for automatic detection based on content. |
| `call_back_url` | string | No | Optional HTTPS URL to receive a POST callback when the video generation completes. Must accept JSON payloads. |
| `generation_type` | string ("TEXT_2_VIDEO" | "FIRST_AND_LAST_FRAMES_2_VIDEO" | "REFERENCE_2_VIDEO") | No | Video generation mode. |
| `enable_translation` | boolean | No | Whether to automatically translate the prompt to English. Defaults to true for optimal results. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Account Credits

**Slug:** `KIEAI_GET_ACCOUNT_CREDITS`

Retrieve the current credit balance for your KIE.AI account. Use when you need to check available credits before making API requests or monitor account usage. This action is read-only and does not modify any data.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Aleph Video Details

**Slug:** `KIEAI_GET_ALEPH_VIDEO_DETAILS`

Retrieves details and status of an Aleph video generation task. Returns task information including current status (generating, success, or failed) and video URLs when complete. Use this action when checking the progress of a video generation task or retrieving the final video output after completion. This is a polling endpoint—call periodically until task completion. Note: Generated videos are only available for 14 days. The resultVideoUrl and resultImageUrl are only present when successFlag is 1 (success).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique task identifier for the Aleph video generation task. Obtain this from the response when creating a video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Cover Details

**Slug:** `KIEAI_GET_COVER_DETAILS`

Get the status and details of a cover song generation task. Use when you need to check the progress of a cover generation task or retrieve the generated cover image URLs after completion. The response includes the task status (pending, generating, success, or failed), creation and completion timestamps, and the generated cover image URLs when the task is complete. Poll this endpoint to track task progress until successFlag indicates completion (1) or failure (3).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | The cover generation task ID to retrieve status and details for. This is returned when a cover generation task is initiated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Flux Kontext Image Details

**Slug:** `KIEAI_GET_FLUX_KONTEXT_IMAGE_DETAILS`

Retrieve the status and details of a Flux Kontext image generation task. Use this action when you need to check the progress of an image generation task, get the generated image URL upon completion, or diagnose why a task failed. The task status (successFlag) indicates: - 0 (GENERATING): Task is still processing - 1 (SUCCESS): Task completed with image URL in response field - 2 (CREATE_TASK_FAILED): Task creation failed - 3 (GENERATE_FAILED): Task created but image generation failed

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | The unique task identifier returned from the Flux Kontext image generation endpoint |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get GPT-4o Image Details

**Slug:** `KIEAI_GET_GPT4O_IMAGE_DETAILS`

Retrieves details and status of a GPT-4o image generation task. Returns task information including current status (generating, success, or failed) and image URLs when complete. Use when checking the progress of an image generation task or retrieving the final image output after completion. This is a polling endpoint—call periodically until task completion. Note: Image generation tasks return URLs that are available only for a limited time. Download images promptly after task completion.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique task identifier for the image generation task. Obtain this from the response when creating an image generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Lyrics Details

**Slug:** `KIEAI_GET_LYRICS_DETAILS`

Retrieves the status and details of a lyrics generation task. Returns the generated lyrics text when the task is complete. Use this action to poll for lyrics generation results after submitting a lyrics generation request. The task status can be: PENDING (waiting), SUCCESS (complete), or various error states. If the status is SUCCESS, check the response.data.response.data field for the generated lyrics.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique identifier of the lyrics generation task. This ID is returned when creating a lyrics generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Market Task Details

**Slug:** `KIEAI_GET_MARKET_TASK_DETAILS`

Retrieves the status and details of a Market API task by its task ID. Use when you need to check the progress or outcome of a previously submitted task, such as after creating a task with a Market API action or when polling for completion. This action queries the unified Market API job status endpoint.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | The unique identifier of the task to query. This ID is returned when a task is created via the Market API. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get MIDI Details

**Slug:** `KIEAI_GET_MIDI_DETAILS`

Retrieves details and status of a MIDI generation task. Returns MIDI data including detected instruments, notes, timing, and velocity when the task is complete. Use when checking the progress of a MIDI generation task or retrieving the final MIDI output after completion. This is a polling endpoint—call periodically until task completion. Note: MIDI records are retained for 14 days. When using vocal separation with type 'split_stem', the midiData field may be empty. Check errorCode and errorMessage fields when successFlag indicates failure.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Task ID returned from the MIDI generation request. This is a required field to identify the MIDI generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Music Details

**Slug:** `KIEAI_GET_MUSIC_DETAILS`

Get the status and details of a Suno music generation task including generated audio URLs and metadata. Use this action when you need to check the completion status of a music generation task, retrieve audio URLs for download or playback, or monitor the progress of a previously submitted generation request. Poll this endpoint until status reaches SUCCESS or an error state. Note that instrumental tracks will not include lyrics data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique identifier of the music generation task to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Music Video Details

**Slug:** `KIEAI_GET_MUSIC_VIDEO_DETAILS`

Retrieves details and status of a music video generation task. Returns task information including current status (PENDING, SUCCESS, or failed) and video URL when complete. Use when checking the progress of a music video generation task or retrieving the final video output after completion. This is a polling endpoint—call periodically until task completion. Note: Video records are only available within 14 days after generation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | Unique task identifier for the music video generation task. Obtain this from the response when creating a music video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Runway Video Details

**Slug:** `KIEAI_GET_RUNWAY_VIDEO_DETAILS`

Retrieves details and status of a Runway video generation task. Returns comprehensive task information including the current state (wait, queueing, generating, success, or fail) and video URLs when the task is complete. Use this action when checking the progress of a Runway video generation task or retrieving the final video output after completion. This is a polling endpoint—call periodically until the task reaches a terminal state. Note: Video URLs returned in the response are valid for 14 days. For extension tasks, the parentTaskId field indicates the original generation task.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique task identifier for the video generation or extension task. Obtain this from the response when creating a video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Timestamped Lyrics Status

**Slug:** `KIEAI_GET_TIMESTAMPED_LYRICS_STATUS`

Retrieve the status and results of a timestamped lyrics generation task. Use this action when you need to check the completion status of a previously initiated timestamped lyrics generation request, or to retrieve the lyrics data with word-level timestamps for karaoke-style synchronization. Note: The data field will be populated once the task completes successfully.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | Unique identifier of the music generation task, returned from 'Generate Music' or 'Extend Music' endpoints. |
| `audio_id` | string | Yes | Unique identifier of the specific audio track for which to retrieve lyrics. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Veo 1080p Video

**Slug:** `KIEAI_GET_VEO1080P_VIDEO`

Retrieve the 1080p high-definition version of a completed Veo3.1 video generation. Use when you need to download the HD version of a video after the initial generation is complete. The 1080p conversion typically takes 1-3 minutes after the original generation completes. Note: Poll this endpoint every 20-30 seconds until the video is ready. If the task is still processing, the API will return an appropriate error. The original generation task must be successful before requesting the 1080p version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `index` | integer | No | Zero-based index of the video to retrieve in 1080p. Use when the generation produced multiple videos. Defaults to 0 if not specified. |
| `taskId` | string | Yes | Unique task identifier for the video generation task. Obtain this from the response when creating a video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Veo 4K Video

**Slug:** `KIEAI_GET_VEO4K_VIDEO`

Retrieve the 4K ultra-high-definition version of a completed Veo3.1 video generation. Use when you need to download the 4K version of a video after the original generation is complete. The 4K conversion typically takes longer than the 1080p conversion (approximately 2-5 minutes) after the original generation completes. Use this action when you have a completed video generation task and want to access the premium 4K quality output. Poll this endpoint every 30-45 seconds until the video is ready. The original generation task must be successful before requesting the 4K version.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `index` | integer | No | Zero-based index of the video to retrieve in 4K. Use when the generation produced multiple videos. Defaults to 0 if not specified. |
| `taskId` | string | Yes | Unique task identifier for the video generation task. Obtain this from the response when creating a video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Veo Video Details

**Slug:** `KIEAI_GET_VEO_VIDEO_DETAILS`

Retrieves details and status of a Veo3.1 video generation task. Returns task information including current status (generating, success, or failed) and video URLs when complete. Use when checking the progress of a video generation task or retrieving the final video output after completion. This is a polling endpoint—call periodically until task completion. Note: Videos generated with fallback model cannot be upgraded to 1080P. Records are only available within 14 days.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `taskId` | string | Yes | Unique task identifier for the video generation task. Obtain this from the response when creating a video generation task. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get WAV Details

**Slug:** `KIEAI_GET_WAV_DETAILS`

Retrieves the status and download URL for a WAV conversion task. Returns task information including current status (PENDING, SUCCESS, or failed) and the WAV audio URL when complete. Use when checking the progress of a WAV conversion task or retrieving the final audio output after completion. This is a polling endpoint—call periodically until task completion. Note: WAV files are retained for 14 days. The audioWavUrl is only available when successFlag is SUCCESS.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `task_id` | string | Yes | Unique identifier of the WAV conversion task. Obtain this from the response when initiating a WAV conversion. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Music Section

**Slug:** `KIEAI_REPLACE_MUSIC_SECTION`

Replace a specific section of a Suno music track with new AI-generated content. Use this action when you need to modify a portion of an existing music track by replacing it with newly generated content while preserving the rest of the track. The action submits a replacement request and returns a task ID that can be used to track progress via callback. Constraints: - The replacement duration (infillEndS - infillStartS) must be between 6 and 60 seconds. - The replacement cannot exceed 50% of the original music's total duration. - This action is irreversible once submitted.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | string | Yes | Music style tags to apply to the replacement (e.g., jazz, electronic, pop, rock). |
| `title` | string | Yes | Music title for the modified track. |
| `prompt` | string | Yes | Prompt for generating the replacement segment. Describes the desired content for the new section. |
| `taskId` | string | Yes | Original task ID (parent task) to identify the source music. This is the task ID returned when the original track was generated. |
| `audioId` | string | Yes | Unique audio track identifier to replace. This is the specific audio ID of the track you want to modify. |
| `fullLyrics` | string | No | Complete lyrics for the entire track after modification. Use this if you want to update the lyrics along with the section replacement. |
| `infillEndS` | number | Yes | End time in seconds for the replacement section. Must be greater than infillStartS. The replacement duration should be between 6 and 60 seconds. |
| `callBackUrl` | string | No | Callback URL for receiving task completion notifications. The API will send a webhook when the generation is complete. |
| `infillStartS` | number | Yes | Start time in seconds for the replacement section. Must be less than infillEndS and at least 0. |
| `negativeTags` | string | No | Music styles to exclude from the replacement (e.g., Rock, Metal). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Separate Vocals from Audio

**Slug:** `KIEAI_SEPARATE_VOCALS`

Separates vocals and instruments from an audio track using AI-powered audio source separation. Use this action when you need to extract vocals from an instrumental track, create karaoke versions of songs, isolate vocals for remixing, or generate instrumentals for sampling. The action supports two separation modes: 'separate_vocal' (2 stems - vocal and instrumental) and 'split_stem' (up to 12 stems). Results are delivered via callback URL, and audio URLs remain accessible for 14 days. Note: Re-submitting the same track deducts credits again with no caching.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("separate_vocal" | "split_stem") | No | Type of separation mode. Use 'separate_vocal' for 2 stems (vocal + instrumental) at 10 credits, or 'split_stem' for up to 12 stems (vocals, backing vocals, drums, bass, guitar, keyboard, strings, brass, woodwinds, percussion, synth, FX) at 50 credits. |
| `task_id` | string | Yes | ID of the original music generation task. This identifies the parent task that generated the audio. |
| `audio_id` | string | Yes | The specific audio track ID to process for vocal separation. |
| `call_back_url` | string | Yes | URL to receive task completion notifications. The API will send a callback when processing is complete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
