1. Solutions
PixVerse Platform Docs
  • Get Started
    • What Is PixVerse AI?
    • Model Capability Map
    • Billing and Usage
    • Quick Start
    • Contact Us
    • Privacy and Data Protection
  • API
    • Preparation
      • Start Here
      • Concurrency Rules
      • Query Task Status
      • Error Codes
      • FAQ
      • Webhook Callbacks
      • Upload Image
      • Upload Media (Video and Audio)
      • Verify Uploaded Audio
      • Get Effect Template List
      • Get TTS Speaker List
      • Get Restyle Effect List
      • Query Task Status
      • Get Account Balance
      • Usage Deduction Query
      • Create Custom Voice
      • Delete Custom Voice
    • Core Capabilities
      • Text-to-Video
      • Image-to-Video and Video Templates
      • First and Last Frame Video
      • Reference-to-Video (Fusion)
      • Multi-Transition Video
      • Video Extend
      • Image Template Generation
      • Get Image Generation Result
    • Solutions
      • Video Upscale
        POST
      • Video Restyle
        POST
      • Lipsync
        POST
      • Video Edit (Modify)
        POST
      • Image Avatar
        POST
      • Select Video Mask
        POST
      • Sound Effect
        POST
      • Subject Replacement (Swap)
        POST
      • Motion Control (Mimic)
        POST
      • One-click Real Estate Video
        POST
      • One-click VibeMV
        POST
  • Pricing
    • PixVerse API Pricing
  • Changelog
    • Changelog
  1. Solutions

Select Video Mask

POST
/openapi/v2/video/mask/selection
Identify candidate regions before Swap or selected-region Modify. Use exactly one source. Reuse the same source, returned keyframe_id, and selected mask_id in the next request. Preview URLs are not input IDs. An empty mask_info means no region was detected; try another frame.

Request

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Successful response.
Bodyapplication/json

🟠400
🟠401
Request Request Example
Shell
curl --location 'https://app-api.pixverse.ai/openapi/v2/video/mask/selection' \
--header 'API-KEY: your-api-key' \
--header 'Ai-trace-id: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Content-Type: application/json' \
--data '{
    "source_video_id": 123456794,
    "keyframe_id": 1
}'
Response Response Example
200 - Illustrative region selection
{
    "ErrCode": 0,
    "ErrMsg": "Success",
    "Resp": {
        "keyframe_id": 1,
        "keyframe_url": "https://example.com/frame.png",
        "credits": 2,
        "mask_info": [
            {
                "mask_id": "123456789",
                "mask_name": "subject",
                "mask_url": "https://example.com/mask.png"
            }
        ]
    }
}
Previous
Image Avatar
Next
Sound Effect