Skip to main content

Generate video

Create AI-generated videos for demos, marketing, tutorials, and screenshot animations. Videos are uploaded to cloud storage and returned as public URLs.
This endpoint requires session-based authentication. You must be signed in with a valid user account. All requests must include the Content-Type: application/json header.
Video generation can take up to 5 minutes per request (maxDuration: 300). Plan for long response times when integrating this endpoint.

Create a video

POST /api/generate-video
Generate a video based on the specified type and parameters.

Request body

FieldTypeRequiredDescription
typestringYesVideo type. One of demo, marketing, screenshot, or tutorial.
agentNamestringWhen type is demoName of the agent to feature in the demo video
agentDescriptionstringWhen type is demoDescription of the agent’s capabilities
productNamestringWhen type is marketingName of the product to promote
featuresarrayWhen type is marketingList of product features to highlight
imageUrlstringWhen type is screenshotURL of the screenshot image to animate
descriptionstringWhen type is screenshotDescription of the animation to apply
topicstringWhen type is tutorialTutorial topic
stepsarrayWhen type is tutorialOrdered list of tutorial steps

Example requests

Demo video

{
  "type": "demo",
  "agentName": "SupportBot",
  "agentDescription": "An AI agent that handles customer support tickets"
}

Marketing video

{
  "type": "marketing",
  "productName": "Agentbot",
  "features": ["AI-powered agents", "Multi-channel support", "Onchain payments"]
}

Screenshot animation

{
  "type": "screenshot",
  "imageUrl": "https://example.com/dashboard.png",
  "description": "Zoom into the analytics panel and highlight key metrics"
}

Tutorial video

{
  "type": "tutorial",
  "topic": "Setting up your first agent",
  "steps": ["Create an account", "Configure your agent", "Connect a channel", "Go live"]
}

Response

Returns the public URL of the generated video:
{
  "url": "https://public.blob.vercel-storage.com/videos/1712345678901.mp4"
}
The video is returned as an MP4 file hosted on cloud storage with public access.

Errors

CodeDescription
400Invalid video type. Must be demo, marketing, screenshot, or tutorial.
401Unauthorized — you must be signed in
500Video generation or upload failed

Error response

{
  "error": "Invalid video type"
}