Motion Poster API
Generate motion posters programmatically via API key auth. Credits are billed to the key owner.
1) Create an API key
Authenticate using Authorization: Bearer <key> (or x-api-key: <key>).
Open API Keys2) Upload an image (optional)
start_image must be a public URL accessible by the AI provider.
export BASE_URL="https://your-domain.com"
export API_KEY="sk-..."
curl -X POST "$BASE_URL/api/storage/upload-image" \
-H "Authorization: Bearer $API_KEY" \
-F "files=@./poster.png"3) Generate a motion poster video
curl -X POST "$BASE_URL/api/ai/generate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mediaType": "video",
"scene": "image-to-video",
"provider": "replicate",
"model": "kwaivgi/kling-v2.6",
"prompt": "A cinematic slow push-in, subtle parallax, soft lighting",
"options": {
"start_image": "https://public-url-to-your-image.png",
"duration": 5,
"aspect_ratio": "16:9",
"generate_audio": false
}
}'On success, you’ll get data.taskId. Use it to poll status.
4) Poll status and get the video URL
curl -X POST "$BASE_URL/api/ai/query" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "<id from /api/ai/generate>" }'Notes
- API calls are billed to the API key owner.
- If you see no auth or insufficient credits, sign in and top up credits.
- Store the returned videoUrl on your side; provider URLs may expire.
API keys
Create/copy your API keys here, then use them in the curl examples.
API Keys
Sign in to create API keys and call the generation endpoints (credits are billed to the key owner).
Sign in to create an API key