API
Finished MP4s upload to your bucket. Save credentials once in Settings (encrypted in the DB), or pass them per request.
| Mode | When |
|---|---|
| Saved bucket | Settings → Storage, then omit storage or pass integration_id |
| Inline | storage.inline on the request (job-scoped, not stored) |
| Master key | Owner CLARITY_API_KEY only → platform .env R2 |
curl -sS -X POST "$MANIMOTION_API/video/request" \
-H "Content-Type: application/json" \
-H "x-api-key: $MANIMOTION_KEY" \
-d '{
"prompt": "Visualize gradient descent",
"storage": {
"integration_id": "clxxxxxxxx"
}
}'{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued",
"cached": false,
"video_url": null,
"engine": null
}curl -sS -X POST "$MANIMOTION_API/video/request" \
-H "Content-Type: application/json" \
-H "x-api-key: $MANIMOTION_KEY" \
-d '{
"prompt": "Explain Fourier series from waves to frequency",
"storage": {
"inline": {
"provider": "r2",
"bucket": "my-lectures",
"access_key_id": "YOUR_R2_ACCESS_KEY",
"secret_access_key": "YOUR_R2_SECRET",
"account_id": "YOUR_CLOUDFLARE_ACCOUNT_ID",
"public_url": "https://cdn.example.com"
}
}
}'{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued",
"cached": false,
"video_url": null,
"engine": null
}| Provider | Required |
|---|---|
| r2 | bucket, access_key_id, secret_access_key, account_id (+ public_url) |
| s3 / minio / backblaze / custom_s3 | bucket, keys, region; endpoint for MinIO/custom; force_path_style for MinIO |
Always set public_url so video_url is browser-playable.
SECRET_ENCRYPTION_KEY must match on both sides (≥32 chars)