Skip to main content

video models

Dream Machine API / enabling state of the art video generation from texts or images

Want to allow your users to create breathtaking videos from a simple text prompt or an image? Checkout out PiAPI's Dream Machine API - start generating high-quality videos today!

เริ่มต้นเลย!

Dream Machine API Pricing

Pay-as-you-go access through PiAPI.

Dream Machine API

$0.20-$0.40/video

Developer-ready API access

Get started

Create your API key

Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.

Top up credits

Add credits on the billing page when you are ready to scale beyond the free tier.

Call the API

POST your first task following the API docs, then poll the task until the result is ready.

Iterate in the playground

Prototype prompts and settings in the the playground above before wiring them into your product.

curl -X POST 'https://api.piapi.ai/api/v1/task' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "luma",
    "task_type": "video_generation",
    "input": {
      "prompt": "A cinematic slow push through a misty mountain valley at sunrise.",
      "duration": 5,
      "aspect_ratio": "16:9"
    }
  }'

# → { "task_id": "9d5a…", "status": "pending" }