Video Projects

Create a Animation video. The estimated frame cost is calculated based on the fps and end_seconds input.

post/v1/animation

Request

  • Base URL
    https://api.magichour.ai
  • URL
    https://api.magichour.ai/v1/animation
  • Auth
    HTTP bearer

Request body

namestring

Give your video a custom name for easy identification.

fpsnumber required

The desire output video frame rate

end_secondsnumber float required

This value determines the duration of the output video.

heightinteger required

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

widthinteger required

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

Example request

{
  "name": "My Animation video",
  "fps": 12,
  "end_seconds": 5,
  "height": 512,
  "width": 512,
  "style": {
    "art_style": "Painterly Illustration",
    "art_style_custom": "Watercolor painting with soft pastel colors",
    "camera_effect": "Simple Zoom In",
    "prompt_type": "custom",
    "prompt": "Cyberpunk city",
    "transition_speed": 5
  },
  "assets": {
    "audio_source": "file",
    "audio_file_path": "api-assets/id/1234.mp3",
    "image_file_path": "api-assets/id/1234.png"
  }
}

Response

Success

idstring required

Unique ID of the video. Use it with the Get video Project API to fetch status and downloads.

credits_chargedinteger required

The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.

If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Example response

{
  "id": "cuid-example",
  "credits_charged": 450
}

Changes

    • info

      added the non-success response with the status

    • info

      removed the Not Found enum value from the response property for the response status

    • info

      removed the Unauthorized enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the non-success response with the status