POST
/
v1
/
animation
curl --request POST \
  --url https://api.magichour.ai/v1/animation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Animation video",
  "fps": 12,
  "end_seconds": 15,
  "height": 960,
  "width": 512,
  "style": {
    "art_style": "Painterly Illustration",
    "art_style_custom": "<string>",
    "camera_effect": "Simple Zoom Out",
    "prompt_type": "custom",
    "prompt": "Cyberpunk city",
    "transition_speed": 5
  },
  "assets": {
    "audio_source": "file",
    "audio_file_path": "api-assets/id/1234.mp3",
    "youtube_url": "<string>",
    "image_file_path": "api-assets/id/1234.png"
  }
}'
{
  "id": "clx7uu86w0a5qp55yxz315r6r",
  "estimated_frame_cost": 450
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Body
fps
number
required

The desire output video frame rate

Required range: x >= 1
Example:

12

end_seconds
number
required

The end time of the input video in seconds

Required range: x >= 0.1
Example:

15

height
integer
required

The height of the final output video. The maximum height depends on your subscription. Please refer to our pricing page for more details

Required range: x >= 64
Example:

960

width
integer
required

The width of the final output video. The maximum width depends on your subscription. Please refer to our pricing page for more details

Required range: x >= 64
Example:

512

style
object
required

Defines the style of the output video

assets
object
required

Provide the assets for animation.

name
string
default:Animation - dateTime

The name of video

Example:

"Animation video"

Response

200
application/json

Success

id
string
required

Unique ID of the video. This value can be used in the get video project API to fetch additional details such as status

Example:

"clx7uu86w0a5qp55yxz315r6r"

estimated_frame_cost
integer
required

Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes

Example:

450