Documentation Index Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
Use this file to discover all available pages before exploring further.
Video generation is asynchronous by design. This recipe shows the minimum application loop you need for a production-safe integration.
1. Create the job
cURL
TypeScript
Python
Go
C#
PHP
Ruby
curl https://api.phaseo.app/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1-lite",
"prompt": "A cinematic sunrise over a mountain lake",
"webhook": {
"url": "https://example.com/api/video-webhook",
"events": ["video.completed", "video.failed"],
"secret": "whsec_your_signing_secret"
}
}'
Store the returned video_id immediately.
2. Poll status until terminal
Your worker or application can poll:
cURL
TypeScript
Python
Go
C#
PHP
Ruby
curl https://api.phaseo.app/v1/videos/VIDEO_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Use polling for your own control loop even if you also enable webhooks. That gives you a direct way to recover if a webhook destination is temporarily unavailable.
3. Consume webhook deliveries
The current async webhook payloads are normalized around:
the job identifier
lifecycle status
delivery status summary
recent delivery attempts
whether signing is enabled
Design your webhook consumer to:
verify the signature
treat deliveries as retryable and idempotent
fetch the latest job status if the webhook payload and local state disagree
4. Read the final output
When the job reaches a completed terminal state, fetch content from:
GET /v1/videos/{video_id}/content
If your application only needs a download URL, use the dedicated download-url surface where supported by the endpoint.
5. What to monitor
job lifecycle status
webhook delivery success and retry counts
last delivery HTTP status
failure timestamps and error messages
These signals should live together in your internal async-job dashboard so operations can distinguish generation failures from webhook-delivery failures.