Create new video
Use this endpoint to create a new video. Check the parameters for details.
https://api.animationapi.com/v1/videosAPI Key authentication using Bearer token.
Generate an API key from your dashboard and include it in the Authorization header.
Format: Authorization: Bearer your_api_key_here
In: header
The unique id of the Template. Can be copied from the project detail page.
uuidThe version of the Template. Can be obtained from the template's version view.
11 <= valueThe format of the output video.
Note: Frame rate for gif output is 12, For mp4 and webm see fps property.
"mp4" | "webm" | "gif"Sets the output video frame rate if selected format is mp4 or webm.
2424 | 30The modifications needed on pages and the corresponding layers.
The source url for the audio fo the output video.
urlAny metadata that you need to store e.g. ID of a record in your DB.
Response Body
curl -X POST "https://api.animationapi.com/v1/videos" \ -H "Content-Type: application/json" \ -d '{ "template_id": "ffffa434-0000-0000-b290-0b30ad82d5d3", "format": "mp4" }'{
"status": "PROCESSING",
"id": "4209a434-0000-0000-b290-0b30ad82d5d3",
"self": "https://api.animationapi.com/v1/videos/4209a434-0000-0000-b290-0b30ad82d5d3",
"video_url": "https://assets.animationapi.com/91786334-0000-0000-b290-0b30ad82d5d3/vid_tEeYdfDgtTL9YSqAndjer.mp4",
"metadata": "string",
"created_at": "2025-06-26T00:00:00.000Z",
"updated_at": "2025-06-26T00:00:00.000Z"
}{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid JSON in request body"
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "API key required. Please provide your API key in the Authorization header as 'Bearer your_api_key'"
}
}{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Insufficient credits to generate video. Please add credits to your account.",
"details": "Required: 10 credits, Available: 3 credits"
}
}{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "You don't have permission to access this resource"
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Video not found",
"details": "No video found with ID: video_123"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "fps",
"code": "INVALID_VALUE",
"message": "fps must be one of: 12, 24, 30",
"value": 60
}
]
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded",
"details": "You have exceeded the maximum number of requests per minute",
"retry_after": 60,
"limit": 100,
"remaining": 0,
"reset": 1640995200
}
}{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"details": "Please try again later or contact support if the problem persists"
}
}{
"error": {
"code": "MAINTENANCE_MODE",
"message": "Service is currently under maintenance",
"details": "Scheduled maintenance in progress. Please try again later.",
"retry_after": 3600
}
}