### Install uv (Windows) Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Installs the uv package manager on Windows systems using PowerShell. ```powershell powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -------------------------------- ### One-Click Video Style Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Generate videos in a specific style. This example uses a watercolor style for blooming flowers. ```text Generate a watercolor-style video of blooming flowers with bright, dreamy colors. ``` -------------------------------- ### One-Click Video Theme Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Quickly generate videos of specific themes without detailed descriptions. This example uses a futuristic technology theme. ```text Generate a video with a futuristic technology theme, including neon lights and holographic projections. ``` -------------------------------- ### Image to Video Generation Request Example Source: https://docs.platform.pixverse.ai/image-to-video-generation-13016633e0 This example demonstrates the structure of a request to generate a video from an image. It includes parameters for duration, image ID, model, prompt, and quality. Optional parameters for motion mode, camera movement, template ID, sound effects, and lip-sync TTS are commented out. ```json { "duration": 5, "img_id": 0, "model": "v6", "motion_mode": "normal", //"camera_movement": "zoom_in", //Use this field to apply camera movement if needed. "prompt": "string", "quality": "720p", //"template_id": 302325299692608, //Use this field to apply template which you activated //"sound_effect_switch":true, //"sound_effect_content":"", //"lip_sync_tts_switch":true, //"lip_sync_tts_content":"", //"lip_sync_tts_speaker_id":"", "seed": 0 } ``` -------------------------------- ### Install uv (Mac/Linux) Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Installs the uv package manager on macOS and Linux systems using a curl command. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Find UVX Installation Path on Windows Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Run this command in the Windows terminal to locate the UVX installation path, which is necessary for resolving 'spawn uvx ENOENT' errors. ```batch where uvx ``` -------------------------------- ### Script + Video Scene Description Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Create structured videos using detailed scene descriptions. Specify parameters like aspect ratio, quality, and duration. ```text Scene: A beach in the early morning. The sun is rising, casting golden reflections on the sea. Footprints stretch across the sand. Gentle waves leave white foam as they retreat. A small boat slowly sails across the calm sea in the distance. Aspect Ratio: 16:9, Quality: 540p, Duration: 5 seconds. ``` -------------------------------- ### Script + Video Shot-by-Shot Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Generate videos from a storyboard with specified format, quality, and motion parameters. Claude Desktop also supports storyboard image input. ```text Generate a video based on this storyboard: - Start: Top-down shot of a coffee cup with steam rising - Close-up: Ripples and texture on the coffee surface - Transition: Stirring creates a vortex - End: An open book and glasses next to the cup Format: 1:1 square, Quality: 540p, Motion: fast ``` -------------------------------- ### Text-to-Video Basic Prompt Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Use natural language prompts to generate videos. This is a basic example without specific parameters. ```text Generate a video of a sunset over the ocean. Golden sunlight reflects on the water as waves gently hit the shore. ``` -------------------------------- ### Image Upload Response Structure Source: https://docs.platform.pixverse.ai/image-to-video-882971m0 Example response structure after successfully uploading an image. ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "img_id": 0, "img_url": "string" } } ``` -------------------------------- ### Creative + Video Story Prompt Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Generate a short video concept based on an image, imagining it as the opening scene of a movie. ```text If this street photo is the opening scene of a movie, what happens next? Provide a short video concept. ``` -------------------------------- ### Example Request Body for Mimic Generation Source: https://docs.platform.pixverse.ai/motion-control-mimic-generation-28748523e0 An example JSON payload for the Motion Control (Mimic) generation API. It specifies the image ID, video media ID, and desired quality for the video generation. ```json { "video_media_id": 0, "img_id": 0, "quality": "360p" } ``` -------------------------------- ### Creative + Video Style Transfer Example Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Combine AI creativity with video generation by reinterpreting an image in a specific style and providing a video prompt. ```text This is a photo of a cityscape. Reinterpret it with a retro style and provide a video prompt. ``` -------------------------------- ### Sound Effect Generation Request Example Source: https://docs.platform.pixverse.ai/sound-effect-generation-19884196e0 An example JSON payload for the sound effect generation API. It includes parameters like source video ID, original sound switch, and specific sound effect content. ```json { "source_video_id": 123123, "original_sound_switch": true, "sound_effect_content": "" } ``` -------------------------------- ### Example Success Response for Mimic Generation Source: https://docs.platform.pixverse.ai/motion-control-mimic-generation-28748523e0 A sample successful response from the Motion Control (Mimic) generation API. It includes the generated video ID and remaining credit. ```json { "ErrCode": 0, "ErrMsg": "Success", "Resp": { "video_id": 0, "credit":0 } } ``` -------------------------------- ### Audio Upload Response Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Example JSON response after successfully uploading an audio file. It includes the media_id, media_type, and a URL for the uploaded audio. ```json { "ErrCode": 0, "ErrMsg": "success", "Resp": { "media_id": 0, "media_type": "audio", "url": "https://media.pixverse.ai/111111.mp3" } } ``` -------------------------------- ### Webhook Request Body Example Source: https://docs.platform.pixverse.ai/webhook-integration-1905378m0 This is an example of the JSON payload that can be sent in a webhook request. ```json { "id": "123456789", "status": 1, "url": "https://example.com/video.mp4", "size": 10.5, "has_audio": true, "credits": 100 } ``` -------------------------------- ### Initiate Mimic Generation Task Source: https://docs.platform.pixverse.ai/motion-controlmimic-1982936m0 Start a video generation task using the Mimic API. This requires the media_id of the source video and an image ID, along with the desired quality. The response includes a video_id for tracking the task. ```bash curl --location 'https://app-api.pixverse.ai/openapi/v2/video/mimic/generate' \ --header 'Ai-Trace-Id: different-ai-trace-id-for-each-unique-request' \ --header 'API-KEY: your-api-key' \ --header 'Content-Type: application/json' \ --data '{ "video_media_id":0, "img_id":0, "quality": "360p" }' ``` ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "video_id": 0, "credit":10 } } ``` -------------------------------- ### Generate Video with Background Music Source: https://docs.platform.pixverse.ai/sound-effects-1337980m0 This example shows how to enable and specify background music content when generating a video using the Pixverse AI API. Ensure the API-KEY and Ai-trace-id are correctly set. ```bash curl --location --request POST 'https://app-api.pixverse.ai/openapi/v2/video/img/generate' \ --header 'API-KEY:123123' \ --header 'Ai-trace-id: 123123' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "duration": 5, \ "img_id": 0, \ "model": "v3.5", \ "motion_mode": "normal", \ "negative_prompt": "string", \ "prompt": "string", \ "quality": "540p", \ "seed": 0, \ "template_id": 302325299692608, \ "sound_effect_switch":true, \ "sound_effect_content":"", \ "water_mark": false \ }' ``` -------------------------------- ### Get Video Generation Status API Response Source: https://docs.platform.pixverse.ai/fusionreference-to-video-1339253m0 This JSON structure represents the response from the Get Video Generation Status API, showing the current status of the video generation process. A status of '1' indicates successful completion. ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "create_time": "string", "id": 0, "modify_time": "string", "negative_prompt": "string", "outputHeight": 0, "outputWidth": 0, "prompt": "string", "resolution_ratio": 0, "seed": 0, "size": 0, "status": 5, "style": "string", "url": "string" } } ``` -------------------------------- ### Copy UVX to Local Bin for Mac/Linux Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Use this command to copy the UVX executable to the system's binary directory on Mac or Linux to resolve 'spawn uvx ENOENT' errors. ```bash sudo cp ./uvx /usr/local/bin ``` -------------------------------- ### Call Get User Credit Balance Endpoint Source: https://docs.platform.pixverse.ai/check-account-balance-906361m0 Use this cURL command to make a GET request to the PixVerse API to retrieve your account balance. Ensure you replace 'YOUR_API_KEY' with your actual API key and provide a unique 'ai-trace-id'. ```bash curl --location --request GET 'https://app-api.pixverse.ai/openapi/v2/account/balance' \ --header 'API-KEY:' \ --header 'ai-trace-id: 1' ``` -------------------------------- ### Get TTS List Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Retrieves a list of available Text-to-Speech (TTS) speakers and their details. ```APIDOC ## GET /openapi/v2/video/lip_sync/tts_list ### Description Fetches a list of available TTS speakers for use in lip-sync generation. ### Method GET ### Endpoint `https://app-api.pixverse.ai/openapi/v2/video/lip_sync/tts_list` ### Headers - **API-KEY**: `your-api-key` - **Ai-trace-id**: `different-ai-trace-id-for-each-unique-request` - **Content-Type**: `application/json` ### Query Parameters - **page_num** (int) - Optional - The page number to retrieve. - **page_size** (int) - Optional - The number of items per page. ### Response (Response structure for TTS list not explicitly detailed in the source, but expected to contain speaker information.) ``` -------------------------------- ### Get Restyle List Source: https://docs.platform.pixverse.ai/restyle-1624871m0 Retrieves a list of available restyle effects that can be applied to videos. ```APIDOC ## GET /openapi/v2/video/restyle/list ### Description Retrieves a list of available restyle effects. This endpoint is useful for discovering predefined visual styles that can be applied to videos. ### Method GET ### Endpoint `https://app-api.pixverse.ai/openapi/v2/video/restyle/list` ### Parameters No parameters are required for this endpoint. ### Response #### Success Response (200) (Response structure not detailed in the source, but typically would include a list of restyle options with their IDs and names.) ``` -------------------------------- ### Text-to-Video Advanced Prompt with Parameters Source: https://docs.platform.pixverse.ai/pixverse-mcp-972890m0 Generate videos with specific parameters such as aspect ratio, quality, duration, motion mode, and negative prompts. ```text Generate a night cityscape video with the following parameters: Content: Skyscraper lights twinkling under the night sky, with car lights forming streaks on the road Aspect Ratio: 16:9 Quality: 540p Duration: 5 seconds Motion Mode: normal Negative Prompts: blur, shaking, text ``` -------------------------------- ### Get user credit balance Source: https://docs.platform.pixverse.ai/llms.txt Retrieves the current credit balance for the authenticated user. ```APIDOC ## Get user credit balance ### Description Retrieves the current credit balance for the authenticated user. ### Endpoint /get-user-credit-balance ### Method GET ``` -------------------------------- ### Get Image generation Source: https://docs.platform.pixverse.ai/llms.txt Retrieves information or the generated image from an image generation task. ```APIDOC ## Get Image generation ### Description Retrieves information or the generated image from an image generation task. ### Endpoint /get-image-generation ### Method GET ``` -------------------------------- ### Fusion (Reference to Video) API Request Source: https://docs.platform.pixverse.ai/fusionreference-to-video-1339253m0 Construct this cURL command to generate a video using reference images and a prompt. The 'image_references' array specifies subjects and backgrounds with their respective 'img_id' and 'ref_name'. The prompt uses '@' to reference 'ref_name'. ```bash curl --location 'https://app-api.pixverse.ai/openapi/v2/video/fusion/generate' \ --header 'API-KEY: your-api-key' \ --header 'Ai-trace-id: your-Ai-trace-id' \ --header 'Content-Type: application/json' \ --data-raw '{ "image_references": [ {"type": "subject", "img_id": 0, "ref_name": "dog"}, {"type": "background", "img_id": 0, "ref_name": "room"} ], "prompt": "@dog plays at @room", "model": "v4.5", "duration": 5, "quality": "540p", "aspect_ratio": "16:9", "seed": 123456789 }' ``` -------------------------------- ### GET /openapi/v2/account/balance Source: https://docs.platform.pixverse.ai/check-account-balance-906361m0 Retrieves the remaining account credits (monthly and package) associated with your API key. ```APIDOC ## GET /openapi/v2/account/balance ### Description Retrieves the remaining account credits, including monthly membership credits and credits purchased in packages. ### Method GET ### Endpoint `https://app-api.pixverse.ai/openapi/v2/account/balance` ### Parameters #### Headers - **API-KEY** (string) - Required - Your PixVerse API key. - **ai-trace-id** (string) - Required - A unique identifier for each request. ### Request Example ```bash curl --location --request GET 'https://app-api.pixverse.ai/openapi/v2/account/balance' \ --header 'API-KEY: YOUR_API_KEY' \ --header 'ai-trace-id: 1' ``` ### Response #### Success Response (200) - **ErrCode** (integer) - Error code, 0 indicates success. - **ErrMsg** (string) - Error message, "success" indicates success. - **Resp** (object) - Response object containing account balance details. - **account_id** (integer) - The account identifier. - **credit_monthly** (integer) - Remaining credits for the monthly membership. - **credit_package** (integer) - Remaining credits from purchased packages. #### Response Example ```json { "ErrCode": 0, "ErrMsg": "success", "Resp": { "account_id": 0, "credit_monthly": 1069020, "credit_package": 3630 } } ``` ``` -------------------------------- ### Image-to-Video or Extend Generation Parameters Source: https://docs.platform.pixverse.ai/video-effects-796054m0 Use this JSON body when generating videos with image-to-video or extend modes. Ensure the 'template_id' and 'prompt' are correctly set. ```json { "duration": 5, "img_id": 0, "model": "v4.5", "motion_mode": "normal", "negative_prompt": "string", "prompt": "Muscle Surge", "quality": "540p", "seed": 0, "template_id": 308621408717184, } ``` -------------------------------- ### Text-to-video generation task Source: https://docs.platform.pixverse.ai/text-to-video-882970m0 Initiates the video generation process by sending a text prompt and configuration parameters to the API. ```APIDOC ## POST /openapi/v2/video/text/generate ### Description Initiates the video generation process by sending a text prompt and configuration parameters to the API. ### Method POST ### Endpoint https://app-api.pixverse.ai/openapi/v2/video/text/generate ### Parameters #### Request Body - **aspect_ratio** (string) - Optional - The aspect ratio of the video (e.g., "16:9"). - **duration** (integer) - Optional - The duration of the video in seconds. - **model** (string) - Optional - The model version to use for generation (e.g., "v4.5"). - **motion_mode** (string) - Optional - The motion mode for the video (e.g., "normal"). - **negative_prompt** (string) - Optional - A prompt describing what to exclude from the video. - **prompt** (string) - Required - The text description of the video to generate. - **quality** (string) - Optional - The desired quality of the video (e.g., "540p"). - **seed** (integer) - Optional - The seed for random generation. - **water_mark** (boolean) - Optional - Whether to include a watermark. ### Request Example ```json { "aspect_ratio": "16:9", "duration": 5, "model": "v4.5", "motion_mode": "normal", "negative_prompt": "string", "prompt": "string", "quality": "540p", "seed": 0, "water_mark": false } ``` ### Response #### Success Response (200) - **ErrCode** (integer) - Error code, 0 indicates success. - **ErrMsg** (string) - Error message, empty if successful. - **Resp** (object) - Response object containing video details. - **video_id** (integer) - The unique identifier for the generated video. #### Response Example ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "video_id": 0 } } ``` ``` -------------------------------- ### Get TTS Speaker List Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Retrieves a list of available Text-to-Speech (TTS) speakers for use in lip-sync generation. ```APIDOC ## GET /openapi/v2/video/lip_sync/tts_list ### Description Retrieves a list of available TTS speakers. ### Method GET ### Endpoint `https://app-api.pixverse.ai/openapi/v2/video/lip_sync/tts_list` ### Headers - **API-KEY**: `your-api-key` - **Ai-trace-id**: `different-ai-trace-id-for-each-unique-request` - **Content-Type**: `application/json` ### Request Body ```json { "page_num": 0, "page_size": 0 } ``` ### Parameters #### Query Parameters - **page_num** (int) - Optional - How many pages you want to get. - **page_size** (int) - Optional - How many data entries per page. ### Response (Response structure for TTS list not provided in source, only parameters are listed.) ``` -------------------------------- ### Get Speech(Lipsync) tts list Source: https://docs.platform.pixverse.ai/llms.txt Retrieves a list of available Text-to-Speech (TTS) voices for Speech/Lipsync generation. ```APIDOC ## Get Speech(Lipsync) tts list ### Description Retrieves a list of available Text-to-Speech (TTS) voices for Speech/Lipsync generation. ### Endpoint /get-speechlipsync-tts-list ### Method GET ``` -------------------------------- ### Generate Speech (Lip Sync) Task Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Initiate a lip-sync generation task using either a video_id or video_media_id, and an audio_media_id or TTS content. Specify TTS speaker if needed. ```bash curl --location --request POST 'https://app-api.pixverse.ai/openapi/v2/video/lip_sync/generate' \ --header 'API-KEY: your-api-key' \ --header 'Ai-trace-id: different-ai-trace-id-for-each-unique-request' \ --header 'Content-Type: application/json' \ --data-raw '{ \ "source_video_id: 0, \ "video_media_id": 0, \ "audio_media_id":0, \ "lip_sync_tts_speaker_id": "auto", \ "lip_sync_tts_content": "hello this is harry, where are you from?" \ }' ``` -------------------------------- ### Multi-transition Video Generation API Request Source: https://docs.platform.pixverse.ai/multi-transition-1740835m0 Submit a request to generate a video using the Multi-transition feature. Provide keyframes with durations and prompts, along with the desired model and quality. ```bash curl --location --request POST 'https://app-api.pixverse.ai/openapi/v2/video/multi_transition/generate' \ --header 'API-KEY: your-api-key' \ --header 'Ai-trace-id: your-ai-trace-id' \ --header 'Content-Type: application/json' \ --data-raw '{ "multi_transition": [ {"img_id":0, "duration":3, "prompt":""}, {"img_id":0, "duration":3, "prompt":""}, {"img_id":0, "duration":3, "prompt":""}, {"img_id":0, "duration":3, "prompt":""}, {"img_id":0, "duration":0, "prompt":""} ], "model": "v5", "quality": "360p" }' ``` ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "video_id": 0, "credit":10 } } ``` -------------------------------- ### API Response for Video Generation Task Source: https://docs.platform.pixverse.ai/fusionreference-to-video-1339253m0 This is an example of the JSON response received after initiating a video generation task, containing a 'video_id' for tracking. ```json { "ErrCode": 0, "ErrMsg": "success", "Resp": { "video_id": 0 } } ``` -------------------------------- ### Transition Generation (First/Last Frame) Source: https://docs.platform.pixverse.ai/c1-2067883m0 Generates video transitions using the C1 model, based on specified first and last frames. Supports various resolutions and durations, with optional audio generation. ```APIDOC ## POST transition/generate ### Description Generates video transitions by specifying the first and last frames using the C1 model. ### Method POST ### Endpoint `/transition/generate` ### Parameters #### Request Body - **model** (string) - Required - Must be "c1" - **prompt** (string) - Required - Maximum 5000 characters - **duration** (int) - Required - Integer from 1 to 15 seconds - **quality** (string) - Required - Supported values: "360p", "540p", "720p", "1080p" - **first_frame_img** (int) - Required - ID of the first frame image - **last_frame_img** (int) - Required - ID of the last frame image - **generate_audio_switch** (boolean) - Optional - true/false - **seed** (int) - Optional - Integer from 0 to 2147483647 ``` -------------------------------- ### Generate Speech Lip Sync with Audio Media Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Initiate a lip-sync generation task using a provided video media ID and an audio media ID. This method is suitable when you have both video and audio files pre-uploaded. ```bash curl --location --request POST 'https://app-api.pixverse.ai/openapi/v2/video/lip_sync/generate' \ --header 'API-KEY: your-api-key' \ --header 'Ai-trace-id: different-ai-trace-id-for-each-unique-request' --header 'Content-Type: application/json' \ --data-raw '{ "source_video_id: 0, "video_media_id": 0, "audio_media_id":0, "lip_sync_tts_speaker_id": "auto", "lip_sync_tts_content": "hello this is harry, where are you from?" }' ``` -------------------------------- ### Get Video Generation Status and Download URL Source: https://docs.platform.pixverse.ai/speechlip-sync-1268530m0 Checks the status of a video generation task and retrieves the download URL if the generation is successful. ```APIDOC ## GET /openapi/v2/video/result/{video_id} ### Description Retrieves the status and download URL of a generated video. ### Method GET ### Endpoint `https://app-api.pixverse.ai/openapi/v2/video/result/{video_id}` ### Headers - **API-KEY**: `your-api-key` - **Ai-trace-id**: `different-ai-trace-id-for-each-unique-request` ### Parameters #### Path Parameters - **video_id** (int) - Required - The ID of the video to check. ### Response #### Success Response (200) - **ErrCode** (int) - Error code, 0 for success. - **ErrMsg** (string) - Error message. - **Resp** (object) - **create_time** (string) - The creation time of the video. - **id** (int) - The ID of the video. - **modify_time** (string) - The last modification time of the video. - **negative_prompt** (string) - The negative prompt used during generation. - **outputHeight** (int) - The output height of the video. - **outputWidth** (int) - The output width of the video. - **prompt** (string) - The prompt used during generation. - **resolution_ratio** (int) - The resolution ratio of the video. - **seed** (int) - The seed used during generation. - **size** (int) - The size of the video file. - **status** (int) - The status of the generation: 1: Generation successful, 5: In progress, 7: Moderation failed, 8: Generation failed. - **style** (string) - The style used during generation. - **url** (string) - The download URL of the video (accessible when status is 1). ### Response Example ```json { "ErrCode": 0, "ErrMsg": "string", "Resp": { "create_time": "string", "id": 0, "modify_time": "string", "negative_prompt": "string", "outputHeight": 0, "outputWidth": 0, "prompt": "string", "resolution_ratio": 0, "seed": 0, "size": 0, "status": 1, "style": "string", "url": "string" } } ``` ```