Skip to main content

Text to Video

Generate videos from text. Create cinematic sequences, animations, and visual stories with advanced video generation models.

Text to Video

Generate videos from text. Create cinematic sequences, animations, and visual stories with advanced video generation models.

Video generation typically takes longer than image generation. Be prepared for longer processing times depending on video length and quality settings.

Step 1: Generate a Video

Make a POST request to /generate/video with your prompt and video parameters. The API returns a job ID immediately.
curl -X POST https://api.krea.ai/generate/video \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a majestic eagle soaring over snow-capped mountains at sunrise",
    "duration": 5,
    "width": 1280,
    "height": 720,
    "fps": 24
  }'
Replace with your API TokenTo replace the YOUR_API_TOKEN placeholder in the above examples, you’ll need to generate an API token in krea.ai/settings/api-tokens. Follow the instructions on the API Keys & Billing page if you need help.
Example Response
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "created_at": "2025-01-15T10:30:00.000Z",
  "estimated_time": "60-120 seconds"
}

Step 2: Poll for Results

Video generation takes longer than image generation. Poll /jobs/{job_id} every 5 seconds to check progress.
Webhooks available!Set up webhooks to receive notifications when jobs complete. See the Webhooks guide to get started.
curl -X GET https://api.krea.ai/jobs/YOUR_JOB_ID \
  -H "Authorization: Bearer YOUR_API_TOKEN"
Example Completed Response
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "created_at": "2025-01-15T10:30:00.000Z",
  "completed_at": "2025-01-15T10:31:45.000Z",
  "result": {
    "video_url": "https://krea.ai/generations/your-video.mp4",
    "thumbnail_url": "https://krea.ai/generations/your-video-thumb.jpg",
    "duration": 5.0,
    "width": 1280,
    "height": 720,
    "fps": 24
  }
}
Webhooks available!Set up webhooks to receive notifications when jobs complete. See the Webhooks guide to get started.

Common Parameters

For a list of detailed parameters for all models, see the Model APIs page.
ParameterTypeDescription
promptstringDetailed description of the video content
durationnumberVideo length in seconds (3-10)
widthnumberVideo width in pixels (256-1920)
heightnumberVideo height in pixels (256-1080)
fpsnumberFrames per second (12, 24, or 30)
seednumberRandom seed for reproducible results
modelstringVideo generation model to use
Prompt Tips for Better Videos:
  • Be specific about motion and camera movement
  • Describe the scene, lighting, and atmosphere
  • Mention timing (e.g., “slowly panning”, “quick zoom”)
  • Include style references (e.g., “cinematic”, “documentary style”)
Video generation consumes more compute units than image generation. Check your API Keys & Billing to monitor consumption.