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

Text-to-video

The Text-to-Video API transforms textual descriptions into dynamic video content. This guide will walk you through the process of generating videos from text prompts.

Overview#

The Text-to-Video endpoint allows you to create videos by providing a text description (prompt) and various customization parameters. Our AI model interprets your text prompt and generates a video that matches your description.
Endpoint: POST https://app-api.pixverse.ai/openapi/v2/video/text/generate
API Reference : https://docs.platform.pixverse.ai/text-to-video-generation-13016634e0

Prerequisites#

Before you begin, make sure you have:
A valid PixVerse API key
A different Ai-trace-id for each unique request
An active subscription plan with available credits or purchased credits
A clear text description of the video you want to generate

Quick-start#

1: Text-to-video generation task
2: Check generation status & download

Step-by-Step Guide#

1. Craft Your Text Prompt#

The quality of your prompt significantly impacts the generated video. Here are some tips:
Be specific and descriptive
Include details about scene, movement, lighting, and atmosphere
Keep prompts between 25-200 words for optimal results

Examples of Effective Prompts:#

✅ Good prompt: "A serene mountain lake at sunrise, with mist rising from the water. The camera slowly pans across the lake, capturing the golden sunlight reflecting on the surface. Birds fly overhead as the morning unfolds."
❌ Less effective prompt: "Mountain lake sunrise"

2. Prepare Your API Request#

Construct your API request with the appropriate parameters:

3. Parameter Details#

https://docs.platform.pixverse.ai/how-to-use-text-to-video-882970m0

4. Handle the API Response#

The API returns a JSON response with a video_id:
{
  "ErrCode": 0,
  "ErrMsg": "success",
  "Resp": {
    "video_id": 0
  }
}

5. Check Generation Status#

After creating the task, you will receive a video_id
Query periodically Get Video Generation Status API using this video_id
The status will change from 5 to 1 when processing is complete
  {
 "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"
 }
}

6. Download the Generated Video#

You can access a generated video with "url"
"url" is only valid when status=1
  {
 "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"
 }
}

Troubleshooting#

Common issue#

1.
Your video is stuck in "Generating" status and hasn't completed after a long wait.
Please check if you're using the same AI-trace-ID for every request. This is the most common cause of this issue.
2.
Status codes: 1: Generation successful; 5: Waiting for generation; 7: Content moderation failure; 8: Generation failed;
If you encounter status code 7, it means your generated video was filtered by our content moderation system. Please modify your parameters and try again. Any credits used for filtered videos will be automatically refunded to your account.

Common error codes#

400/500 status : Incorrect code
400013 : Invalid binding request: incorrect parameter type or value
400017 : Invalid parameter
500044 : Reached the limit for concurrent generations.
Previous
Subscribe API plans
Next
Image-to-video