Usage Guide
- Create short videos (5-10 seconds) using AI visualization
- Generate videos based on text descriptions or reference images
- Suitable for social media content, digital art, or concept visualization
Parameter Details
promptdescribes what you want to show in the videoimageUrlprovides visual reference for AIaspectRatiodetermines video orientation (vertical or horizontal)durationcontrol the video duration (5 or 10 seconds), where if a 10-second video is selected, 1080p resolution cannot be selectedqualityvideo resolution (720p or 1080p), where if 1080p is selected, 10-second video cannot be generatedwaterMarkvideo watermark text content, empty string means no watermark
Developer Notes
- Generated videos are stored for 14 days before automatic deletion
- For text-only generation, aspect ratio must be explicitly specified
Authorizations
All APIs require authentication via Bearer Token.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Body
Descriptive text that guides the AI video generation. Be specific about subject, action, style, and setting. When used with an image, describes how to animate or modify the image content. Maximum length is 1800 characters.
"A fluffy orange cat dancing energetically in a colorful room with disco lights"
Video duration, optional values are 5 or 10. If 10-second video is selected, 1080p resolution cannot be used
"5"
Video resolution, optional values are 720p or 1080p. If 1080p is selected, 10-second video cannot be generated
"720p"
Optional reference image URL to base the video on. When provided, the AI will create a video animating or extending this image.
"https://example.com/cat-image.jpg"
Video aspect ratio parameter. Required parameter for text-to-video generation requests. This parameter is invalid when imageUrl is passed, and the aspect ratio will ultimately be determined by the provided image.
16:9, 4:3, 1:1, 3:4, 9:16 "9:16"
Video watermark text content. An empty string indicates no watermark, while a non-empty string will display the specified text as a watermark in the bottom right corner of the video.
"kie.ai"
The URL to receive AI video generation task completion updates. Required for all video generation requests.
- System will POST task status and results to this URL when video generation completes
- Callback includes generated video URLs, cover images, and task information
- Your callback endpoint should accept POST requests with JSON payload containing video results
- For detailed callback format and implementation guide, see Video Generation Callbacks
- Alternatively, use the Get AI Video Details endpoint to poll task status
"https://api.example.com/callback"
Response
Request successful
Response status code
- 200: Success - Request has been processed successfully
- 401: Unauthorized - Authentication credentials are missing or invalid
- 404: Not Found - The requested resource or endpoint does not exist
- 422: Validation Error - The request parameters failed validation checks.The request parameters are incorrect, please check the parameters.
- 451: Unauthorized - Failed to fetch the image. Kindly verify any access limits set by you or your service provider.
- 455: Service Unavailable - System is currently undergoing maintenance
- 500: Server Error - An unexpected error occurred while processing the request
200, 401, 404, 422, 451, 455, 500 Error message when code != 200
"success"
