1. Guides
PixVerse Platform Docs
  • Overview
    • Introduce to PixVerse Platform
    • Quick Start
    • How does the API work?
    • How to get API key?
    • PixVerse-api-llm.txt
  • Models
    • Model Overview
    • Capability matrix
    • C1
    • V6
    • Pricing
  • Guides
    • Get video generation status
    • Check account balance
    • Subscribe API plans
    • Text-to-video
    • Image-to-video
    • Video Effects
    • Image template
    • Transition(First-last frame Feature)
    • Extend
    • Modify
    • Sound effects
    • Speech(Lip sync)
    • Lip sync TTS speaker list
    • Fusion(Reference to video)
    • Restyle
    • Multi-transition
    • Swap
    • Motion Control(Mimic)?
    • Webhook integration
  • API Reference
    • Rate limit
    • Video Generation
      • Text-to-Video generation
      • Image-to-Video generation
      • Template video generation
      • Transition(First-last frame) generation
      • Speech(Lipsync) generation
      • Get Speech(Lipsync) tts list
      • Fusion(reference to video) generation
      • Multi-transition video generation
      • Restyle video generation
      • Restyle effect list
      • Swap mask generation
      • Swap video generation
      • Sound effect generation
      • Extend generation
      • Get Video Generation Status
      • Motion Control (Mimic) generation
      • Modify generation
    • Image generation
      • Image template generation
      • Get Image generation
    • Upload Image
    • Get user credit balance
    • Upload Video&audio
  • Troubleshooting
    • FAQ
    • Common errors and Solutions
    • Error codes
  • Resources
    • Support
    • Change Logs
    • PixVerse MCP
    • Term of Service
    • Privacy policy
  1. Guides

Webhook integration

What is a Webhook?#

A Webhook is used to notify your system when the status of a video generation task changes.
When the task status changes, the PixVerse AI API platform will automatically send the result back to your server.

Supported Features#

Below is the list of features currently supported by Webhooks. More PixVerse AI API features will be supported in the future.
Feature (Endpoint)Supported
text-to-video video/text/generate✅
image-to-video video/image/generate✅

How to Use#

Step 1: Create a webhook_id
Create a webhook_id by visiting the Webhook Management Page.
image.png
Step 2: Add webhook_id to the generation request
Step 3: Verify the webhook request and return ok

Webhook Signature Guide#

Overview#

To ensure the security and integrity of Webhook requests, all Webhook deliveries include signature information.
Clients should verify each request signature to prevent request forgery and data tampering.

Request Format#

HTTP Method#

POST

Content-Type#

application/json

Request Headers#

Header NameTypeDescription
Webhook-TimestampstringUnix timestamp (seconds)
Webhook-Noncestring32-character random string
Webhook-SignaturestringRequest signature (Base64-encoded HMAC-SHA256)
Ai-Trace-IdstringRequest trace ID
Content-TypestringFixed value application/json

Request Body#

Business data in JSON format. Example:
{
  "id": "123456789",
  "status": 1,
  "url": "https://example.com/video.mp4",
  "size": 10.5,
  "has_audio": true,
  "credits": 100
}

Signature Verification Algorithm#

Step 1: Build the string to sign#

The string to sign consists of three parts, joined by newline characters (\n):
{timestamp}\n{nonce}\n{url_encoded_payload}
Description:
timestamp: obtained from the Webhook-Timestamp header
nonce: obtained from the Webhook-Nonce header
url_encoded_payload: JSON body encoded as a URL query string

Step 2: URL-encode the payload#

Convert each field in the JSON body into key=value format and join them with &.

Step 3: Generate the signature#

Use HMAC-SHA256 with your Secret Key, then encode the result using Base64.
signature = Base64(HMAC-SHA256(secret_key, sign_string))

Step 4: Compare signatures#

Compare the calculated signature with Webhook-Signature from the request headers.

Code Examples#

Python#

Go#

Node.js#

Java#

Response Requirements#

Successful Response#

When the webhook is successfully received, you must return:
ItemRequirement
HTTP Status Code200
Response Bodyok (lowercase, no extra characters)
Example
HTTP/1.1 200 OK
Content-Type: text/plain

ok

Failed Response#

If the status code is not 200 or the body is not ok, the system will retry the webhook.

Retry Mechanism#

If delivery fails, retries will be attempted with the following intervals:
AttemptInterval
12 seconds
210 seconds
330 seconds
41 minute
55 minutes
615 minutes
71 hour
84 hours

Security Recommendations#

1.
Always verify the signature before processing logic.
2.
Validate timestamps to prevent replay attacks.
3.
Use HTTPS for webhook endpoints.
4.
Store the Secret Key securely.
5.
Use time-safe comparison functions.
6.
Ensure idempotency by deduplicating events using id.

FAQ#

Q: What should I do if signature verification fails?#

1.
Verify the Secret Key
2.
Check URL encoding consistency
3.
Confirm the string-to-sign format
4.
Verify boolean value formatting (true / false)

If you have any other questions, please contact technical support.
Previous
Motion Control(Mimic)?
Next
Rate limit