KIE.AI
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
Market
File Upload APICommon API
Market
File Upload APICommon API
  1. Veo3.1 API
  • Getting Started with KIE API (Important)
  • Market
  • Image Models
    • Seedream
      • Seedream3.0 - Text to Image
      • Seedream4.0 - Text to Image
      • Seedream4.0 - Edit
      • Seedream4.5 - Text to Image
      • Seedream4.5 - Edit
    • Z-image
      • Z-Image
    • Google
      • Google - Nano Banana 2
      • Google - imagen4-fast
      • Google - imagen4-ultra
      • Google - imagen4
      • Google - Nano Banana Edit
      • Google - Nano Banana
      • Google - Nano Banana Pro
    • Flux-2
      • Flux-2 - Pro Image to Image
      • Flux-2 - Pro Text to Image
      • Flux-2 - Image to Image
      • Flux-2 - Text to Image
    • Grok Imagine
      • Grok Imagine - Text to Image
      • Grok Imagine - image to image
      • Grok Imagine - Image Upscale
    • GPT Image
      • GPT Image-1.5 - Text to Image
      • GPT Image-1.5 - Image to Image
    • Topaz
      • Topaz - Image Upscale
    • Recraft
      • Recraft - Remove Background
      • Recraft - Crisp Upscale
    • Ideogram
      • Ideogram - V3 Reframe
      • Ideogram - Character Edit
      • Ideogram - Character Remix
      • Ideogram - Character
    • Qwen
      • Qwen - Text to Image
      • Qwen - Image to Image
      • Qwen - Image Edit
    • 4o Image API
      • 4o Image API Quickstart
      • 4o Image Generation Callbacks
      • Generate 4o Image
      • Get 4o Image Details
      • Get Direct Download URL
    • Flux Kontext API
      • Flux Kontext API Quickstart
      • Image Generation or Editing Callbacks
      • Generate or Edit Image
      • Get Image Details
  • Video Models
    • Grok Imagine
      • Grok Imagine Text to Video
      • Grok Imagine Image to Video
    • Kling
      • Kling 2.6 Text to Video
      • Kling 2.6 Image to Video
      • Kling - V2.5 Turbo Image to Video Pro
      • Kling - V2.5 Turbo Text to Video Pro
      • Kling AI Avatar Standard
      • Kling AI Avatar Pro
      • Kling V2.1 Master Image to Video
      • Kling V2.1 Master Text to Video
      • Kling V2.1 Pro
      • Kling V2.1 Standard
      • Kling 2.6 motion-control
      • kling-3.0 motion-control
      • Kling 3.0
    • Bytedance
      • Bytedance Seedance 1.5 Pro
      • Bytedance V1 Pro Fast Image to Video
      • Bytedance V1 Pro Image to Video
      • Bytedance - V1 Pro Text to Video
      • Bytedance - V1 Lite Image to Video
      • Bytedance - V1 Lite Text to Video
    • Hailuo
      • Hailuo 2.3 Pro Image to Video
      • Hailuo 2.3 Standard Image to Video
      • Hailuo Pro Text to Video
      • Hailuo Pro Image to Video
      • Hailuo Standard Text to Video
      • Hailuo Standard Image to Video
    • Sora2
      • Sora2 - Image to Video
      • Sora2 - Text to Video
      • Sora2 - Pro Image to Video
      • Sora2 - Pro Text to Video
      • Sora2 - Watermark Remover
      • Sora2 - Pro Storyboard
      • Sora2 - Characters
      • Sora2 - Characters Pro
    • Wan
      • Wan 2.6 - Image to Video
      • Wan 2.6 - Text to Video
      • Wan 2.6 - Video to Video
      • Wan - Image to Video
      • Wan - Text to Video
      • Wan - 2.2 A14B Speech to Video Turbo
      • Wan - Animate Move
      • Wan - Animate Replace
      • Wan - 2.6-flash-image-to-video
      • Wan - 2-6-flash-video-to-video
    • Topaz
      • Topaz - Video Upscale
    • Infinitalk
      • Infinitalk - From Audio
    • Runway API
      • Runway API Quickstart
      • AI Video Generation Callbacks
      • AI Video Extension Callbacks
      • Aleph
        • Aleph Video Generation Callbacks
        • Generate Aleph Video
        • Get Aleph Video Details
      • Generate AI Video
      • Get AI Video Details
      • Extend AI Video
  • Music Models
    • ElevenLabs
      • elevenlabs/audio-isolation
      • elevenlabs/sound-effect-v2
      • elevenlabs/speech-to-text
      • elevenlabs/text-to-dialogue-v3
      • elevenlabs/text-to-speech-multilingual-v2
      • elevenlabs/text-to-speech-turbo-2-5
  • Chat Models
    • GPT
      • GPT-5-2
    • Claude
      • Claude Sonnet 4.5
      • Claude Opus 4.5
    • Gemini
      • Gemini 3 Pro
      • Gemini 2.5 Flash
      • Gemini 2.5 Pro
  • Veo3.1 API
    • Veo3.1 API Quickstart
    • Veo3.1 Video Generation Callbacks
    • Get 4K Video Callbacks
    • Generate Veo3.1 Video
      POST
    • Extend Veo3.1 Video
      POST
    • Get 1080P Video
      GET
    • Get 4K Video
      POST
    • Get Veo3.1 Video Details
      GET
  • Suno API
    • Suno API Quickstart
    • Music Generation
      • Music Generation Callbacks
      • Music Extension Callbacks
      • Audio Upload and Cover Callbacks
      • Audio Upload and Extension Callbacks
      • Add Instrumental Callbacks
      • Add Vocals Callbacks
      • Music Cover Generation Callbacks
      • Replace Music Section Callbacks
      • Generate Music
      • Extend Music
      • Upload And Cover Audio
      • Upload And Extend Audio
      • Add Instrumental to Music
      • Add Vocals to Music
      • Get Music Task Details
      • Get Timestamped Lyrics
      • Boost Music Style
      • Generate Music Cover
      • Get Cover Generation Details
      • Replace Music Section
      • Generate Persona
      • Generate Mashup Music
    • Lyrics Generation
      • Lyrics Generation Callbacks
      • Generate Lyrics
      • Get Lyrics Task Details
    • WAV Conversion
      • Convert to WAV Callbacks
      • Convert to WAV Format
      • Get WAV Conversion Details
    • Vocal Removal
      • Audio Separation Callbacks
      • MIDI Generation Callbacks
      • Vocal & Instrument Stem Separation
      • Get Vocal Separation Details
      • Generate MIDI from Audio
      • Get MIDI Generation Details
    • Music Video Generation
      • Music Video Generation Callbacks
      • Create Music Video
      • Get Music Video Details
  • Get Task Details
    GET
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
Market
File Upload APICommon API
Market
File Upload APICommon API
  1. Veo3.1 API

Veo3.1 Video Generation Callbacks

The system will call this callback to notify results when video generation is completed
When you submit a video generation task to the Veo3.1 API, you can set a callback address through the callBackUrl parameter. After the task is completed, the system will automatically push the results to your specified address.

Callback Mechanism Overview#

The callback mechanism avoids the need for you to poll the API for task status, as the system will actively push task completion results to your server.
Webhook Security: To ensure the authenticity and integrity of callback requests, we strongly recommend implementing webhook signature verification. See our Webhook Verification Guide for detailed implementation steps.

Callback Timing#

The system will send callback notifications in the following situations:
Video generation task completed successfully
Video generation task failed
Error occurred during task processing

Callback Method#

HTTP Method: POST
Content Type: application/json
Timeout Setting: 15 seconds

Callback Request Format#

After the task is completed, the system will send a POST request to your callBackUrl in the following format:
Success Callback
Failure Callback
Fallback Failed Callback
Fallback Success Callback
{
  "code": 200,
  "msg": "Veo3.1 video generated successfully.",
  "data": {
    "taskId": "veo_task_abcdef123456",
    "promptJson": "{\"aspectRatio\":\"16:9\",\"callBackUrl\":\"\\https://b7af305f36d6.ngrok-free.app/api/v1/modify/test\",\"enableFallback\":false,\"enableTranslation\":true,\"model\":\"veo3_fast\",\"prompt\":\"cat\"}",
    "info": {
      "resultUrls": ["http://example.com/video1.mp4"],
      "originUrls": ["http://example.com/original_video1.mp4"],
      "resolution": "1080p"
    },
    "fallbackFlag": false
  }
}

Status Code Description#

Parameter Description#

ParameterTypeRequiredDescription
codeintegerYesCallback status code indicating task processing result
msgstringYesStatus message providing detailed status description
data.taskIdstringYesTask ID, consistent with the taskId returned when you submitted the task
data.info.resultUrlsarrayNoGenerated video URL array (returned only on success)
data.info.originUrlsarrayNoOriginal video URL array (returned only on success), only has value when aspect_ratio is not 16:9
data.info.resolutionstringNoVideo resolution information (returned only on success), indicates the resolution of the generated video
data.fallbackFlagbooleanNoWhether generated using fallback model. true means backup model was used, false means primary model was used

Status Code Details#

Status CodeDescription
200Success - Video generation task successfully
400Client error - Prompt flagged for content policies, non-English prompt detected, failed to fetch image due to access limits, or unsafe image upload
422Fallback failed - Request rejected by Flow despite fallback enabled (e.g., minor upload, prominent people upload, or content policy violations)
500Internal error - Please try again later, internal error or timeout
501Failed - Video generation task failed

Fallback Functionality Description#

The fallback functionality is an intelligent backup generation mechanism. When the primary model encounters specific errors, it automatically switches to a backup model to continue generation, improving task success rates.

Enabling Conditions#

The fallback functionality requires the following conditions to be met simultaneously:
1.
enableFallback parameter is set to true in the request
2.
Aspect ratio is 16:9
3.
One of the following specific errors occurs:
public error minor upload
Your prompt was flagged by Website as violating content policies
public error prominent people upload

Fallback Limitations#

Resolution: Fallback-generated videos are created in 1080p resolution by default and cannot be accessed via the Get 1080P Video endpoint
Image Requirements: If using image-to-video generation, images must be in 16:9 ratio, otherwise automatic cropping will occur
Credit Calculation: Successful fallback has different credit consumption, please see https://kie.ai/pricing for pricing details

Error Handling#

Fallback Enabled: Automatically switch to backup model when specific errors occur, task continues execution
Fallback Not Enabled: Returns 422 status code when specific errors occur, suggesting to enable fallback functionality
The fallback functionality only takes effect in specific error scenarios. For other types of errors (such as insufficient credits, network issues, etc.), the fallback functionality will not be activated.

Callback Reception Examples#

Here are example codes for receiving callbacks in popular programming languages:
Node.js
Python
PHP

Best Practices#

Callback URL Configuration Recommendations
1.
Use HTTPS: Ensure callback URL uses HTTPS protocol to guarantee data transmission security
2.
Verify Source: Verify the legitimacy of request sources in callback processing
3.
Idempotent Processing: The same taskId may receive multiple callbacks, ensure processing logic is idempotent
4.
Quick Response: Callback processing should return 200 status code as soon as possible to avoid timeout
5.
Asynchronous Processing: Complex business logic should be processed asynchronously to avoid blocking callback response
6.
Timely Download: Video URLs have certain validity period, please download and save promptly
7.
Array Handling: resultUrls and originUrls are direct array formats that can be iterated directly
8.
English Prompts: Ensure using English prompts to avoid language-related errors
Important Reminders
Callback URL must be publicly accessible
Server must respond within 15 seconds, otherwise it will be considered timeout
After 3 consecutive retry failures, the system will stop sending callbacks
Only English prompts are supported, please ensure prompts use English
Please ensure the stability of callback processing logic to avoid callback failures due to exceptions
Properly handle content review errors to ensure input content complies with platform policies
resultUrls and originUrls return direct array formats that can be iterated directly
originUrls only has value when aspect_ratio is not 16:9
Pay attention to image upload security checks to avoid uploading unsafe images

Troubleshooting#

If you don't receive callback notifications, please check the following:
Network Connection Issues
Server Response Issues
Content Format Issues
Video Processing Issues
Content Review Issues
Generation Quality Issues

Veo3.1 Specific Notes#

Veo3.1 Video Generation Features
Veo3.1 AI video generation functionality has the following characteristics:
1.
High-Quality Generation: Veo3.1 provides high-quality AI video generation capabilities
2.
Multiple Aspect Ratio Support: Supports various aspect ratios, provides original video when not 16:9
3.
English Prompts: Only supports English prompts, please ensure input is in English
4.
Content Safety: Strict content review mechanism to ensure generated content is safe and compliant
5.
Flexible Output: resultUrls may contain multiple video files
6.
Original Preservation: When aspect ratio is not 16:9, original size video will be preserved

Alternative Solutions#

If you cannot use the callback mechanism, you can also use polling:
Poll Query Results
Use the Get Veo3.1 Video Details interface to periodically query task status, recommend querying every 30 seconds.
Previous
Veo3.1 API Quickstart
Next
Get 4K Video Callbacks
Built with