1. Guides
PixVerse Platform Docs
  • Overview
    • Introduction to PixVerse API 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
    • Get template list
    • Avatar
  • 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
      • Upscale Video
      • Avatar generation
    • Image generation
      • Image template generation
      • Get Image generation
    • Upload Image
    • Get user credit balance
    • Upload Video&audio
    • Get template list
    • Create Custom Voice
    • Delete Custom Voice
  • Troubleshooting
    • FAQ
    • Common errors and Solutions
    • Error codes
  • Resources
    • Support
    • Changelogs
    • PixVerse MCP
    • Terms of Service
    • Privacy policy
  1. Guides

Avatar

The Image Avatar endpoint uses an uploaded portrait image, an avatar model, and a voice source to generate a video. The image must first be uploaded through the image upload endpoint to obtain an img_id. The voice can come from uploaded finished audio, a built-in TTS voice, or a custom TTS voice.

API-based Image Avatar#

Create an Image Avatar: Image Avatar API Documentation
Upload an image: Upload Image API Documentation
Upload finished audio or a voice sample: Upload Video & Audio API Documentation
Query TTS voices: Get Speech (Lipsync) TTS List API Documentation
Create a custom voice: Create Custom Voice API Documentation
Delete a custom voice: Delete Custom Voice API Definition
Query video status: Get Video Generation Status API Documentation

Prerequisites#

Before you begin, make sure you have:
A valid PixVerse API key;
A unique Ai-Trace-Id for each request;
An img_id returned by the image upload endpoint;
One of the following two voice sources:
A finished-audio media_id returned by the media upload endpoint;
A TTS script and a valid speaker_id.
The image upload endpoint supports:
A local image file uploaded through image;
An image URL submitted through image_url.
Both methods are used only to obtain an img_id. You cannot pass an image file or image URL directly to the Image Avatar generation endpoint. The image upload endpoint supports png, webp, jpeg, and jpg files up to 20MB and within 10000px.

Quick Start#

1. Upload an Image and Obtain img_id
2. Prepare the Voice
3. Create an Image Avatar Task
4. Query the Generation Status and Get the Video
5. Delete a Custom Voice You No Longer Need (Optional)

Step-by-Step Guide#

Step 1: Upload an Image#

Call the Upload Image API and submit the image through either of the following fields:
FieldTypeUsage Rule
imagebinaryUse when uploading a local image file
image_urlstringUse when uploading through an image URL
Use either image or image_url, but not both. Regardless of which method you use, the next step uses only the Resp.img_id returned by the endpoint.

Step 2: Prepare the Voice#

An Image Avatar task supports two voice sources:
Voice SourceRequest FieldsProcessing Rule
Uploaded finished audioaudio_media_idUses the finished audio directly to drive lip movement; TTS is not performed
TTSlip_sync_tts_content + lip_sync_tts_speaker_idUses the selected built-in or custom voice to read the script and drive lip movement
The voice fields must follow these rules:
Use either audio_media_id or lip_sync_tts_content, but not both;
If neither is provided, the endpoint returns a missing voice source error;
If both are provided, the endpoint returns a voice source conflict error;
When using TTS, lip_sync_tts_content must contain 30–200 characters;
lip_sync_tts_speaker_id can be a valid built-in voice ID, a custom voice ID, or auto to use the default voice;
If the voice does not exist or the current account cannot access it, the endpoint returns a parameter error.

Step 3: Create an Image Avatar Task#

Endpoint:
Headers:
FieldTypeRequiredDescription
API-KEYstringYesAPI authentication
Ai-Trace-IdstringYesUse a unique value for each request
Content-TypestringYesMust be application/json
Request Body:
FieldTypeRequirementDescription
img_idint64RequiredImage resource ID returned by the image upload endpoint; only one image is supported
qualitystringRequiredCurrently supports 360p, 540p, 720p, and 1080p
promptstringOptionalDescribes the person's movement, pose, expression, or other visual requirements
audio_media_idint64Conditionally requiredUploaded finished-audio media_id; use either this field or lip_sync_tts_content
lip_sync_tts_contentstringConditionally requiredTTS script containing 30–200 characters; use either this field or audio_media_id
lip_sync_tts_speaker_idstringConditionally requiredBuilt-in or custom voice ID used for TTS; auto is also supported
webhook_idstringOptionalUses a webhook already configured on the platform

Use Uploaded Finished Audio#

{
  "img_id": 1233333,
  "quality": "720p",
  "prompt": "The person keeps both hands folded and remains still.",
  "audio_media_id": 23424143
}

Use a Built-in or Default TTS Voice#

{
  "img_id": 1233333,
  "quality": "720p",
  "prompt": "The person keeps both hands folded and remains still.",
  "lip_sync_tts_content": "Good evening, everyone.",
  "lip_sync_tts_speaker_id": "auto"
}

Use a Custom TTS Voice#

{
  "img_id": 1233333,
  "quality": "720p",
  "prompt": "The person keeps both hands folded and remains still.",
  "lip_sync_tts_content": "Good evening, everyone.",
  "lip_sync_tts_speaker_id": "speaker_custom_123"
}
Do not pass audio_media_id in this case. The voice sample is used only when creating the custom voice. The Image Avatar task references only the speaker_id returned by the custom voice creation endpoint or TTS voice list endpoint.
Successful response fields:
FieldTypeDescription
ErrCodeint0 indicates success
ErrMsgstringError message
Resp.video_idint64Generation task ID
Resp.creditsintCredits consumed or estimated for this task

Step 4: Query the Status and Get the Video#

Call the Get Video Generation Status API:
statusMeaningAction
1Generation succeededUse Resp.url to access the video
5Generation in progressContinue polling
7Content moderation failedStop polling
8Generation failedStop polling

Custom Voice Lifecycle#

1.
Upload a sample: Call the media upload endpoint and obtain the sample audio's Resp.media_id. The sample audio must be shorter than 30 seconds.
2.
Create a voice: Call POST /openapi/v2/video/tts_speaker, pass the sample media_id as audio_media_id, and obtain Resp.speaker_id.
3.
Query voices: Call GET /openapi/v2/video/lip_sync/tts_list. Pass speaker_type=custom to query the current user's custom voices, and identify a voice by the returned speaker_id and name.
4.
Use a voice: When creating an Image Avatar task, pass the custom speaker_id to lip_sync_tts_speaker_id together with lip_sync_tts_content.
5.
Delete a voice: Call DELETE /openapi/v2/video/tts_speaker/{speaker_id}. This endpoint does not have a request body.
Field flow:
StageField ObtainedUsed In the Next Step
Upload a voice sampleResp.media_idaudio_media_id in the custom voice creation request
Create a custom voiceResp.speaker_idlip_sync_tts_speaker_id in the Image Avatar request
Query the voice listResp.data[].speaker_idReselect or confirm an available custom voice
Delete a custom voicespeaker_idPath parameter of the DELETE endpoint

If a Custom Voice Cannot Be Used#

Confirm that the custom voice creation endpoint returned ErrCode=0 and that you obtained Resp.speaker_id;
Query the voice list with speaker_type=custom and confirm that the voice belongs to the current API account;
Pass the returned speaker_id unchanged to lip_sync_tts_speaker_id, together with lip_sync_tts_content;
Do not pass the sample media_id used for voice creation to the Image Avatar TTS request.

Calling Rules Checklist#

The generation request accepts only the img_id returned by the image upload endpoint, not an image file or image URL;
Both img_id and quality are required;
The finished-audio field is audio_media_id;
Finished audio and a TTS script cannot be used in the same request;
When using TTS, pass both lip_sync_tts_content and lip_sync_tts_speaker_id;
The supported resolutions are 360p, 540p, 720p, and 1080p;
The custom voice deletion endpoint does not have a request body.
Previous
Get template list
Next
Rate limit