Skip to main content
POST
/
api
/
v1
/
runway
/
generate
Generate AI Video
curl --request POST \
  --url https://api.kie.ai/api/v1/runway/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A fluffy orange cat dancing energetically in a colorful room with disco lights",
  "imageUrl": "https://example.com/cat-image.jpg",
  "model": "runway-duration-5-generate",
  "waterMark": "kie.ai",
  "callBackUrl": "https://api.example.com/callback"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6"
  }
}

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

  • prompt describes what you want to show in the video
  • imageUrl provides visual reference for AI
  • aspectRatio determines video orientation (vertical or horizontal)
  • duration control the video duration (5 or 10 seconds), where if a 10-second video is selected, 1080p resolution cannot be selected
  • quality video resolution (720p or 1080p), where if 1080p is selected, 10-second video cannot be generated
  • waterMark video 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

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. 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

application/json
prompt
string
required

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.

Example:

"A fluffy orange cat dancing energetically in a colorful room with disco lights"

duration
number
required

Video duration, optional values are 5 or 10. If 10-second video is selected, 1080p resolution cannot be used

Example:

"5"

quality
string
required

Video resolution, optional values are 720p or 1080p. If 1080p is selected, 10-second video cannot be generated

Example:

"720p"

imageUrl
string

Optional reference image URL to base the video on. When provided, the AI will create a video animating or extending this image.

Example:

"https://example.com/cat-image.jpg"

aspectRatio
enum<string>

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.

Available options:
16:9,
4:3,
1:1,
3:4,
9:16
Example:

"9:16"

waterMark
string

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.

Example:

"kie.ai"

callBackUrl
string

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
Example:

"https://api.example.com/callback"

Response

Request successful

code
enum<integer>

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
Available options:
200,
401,
404,
422,
451,
455,
500
msg
string

Error message when code != 200

Example:

"success"

data
object
I