---
title: "Animation"
method: POST
path: "/v1/animation"
tags: ["Video Projects"]
---

# Animation

`POST /v1/animation`

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

## Request body

- object
  - `name` string — Give your video a custom name for easy identification.
  - `fps` number, required — The desire output video frame rate
  - `end_seconds` number, float, required — This value determines the duration of the output video.
  - `height` integer, required — The height of the final output video. The maximum height depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
  - `width` integer, required — The width of the final output video. The maximum width depends on your subscription. Please refer to our [pricing page](https://magichour.ai/pricing) for more details
  - `style` object, required — Defines the style of the output video
    - `art_style` 'Custom' | 'Painterly Illustration' | 'Vibrant Matte Illustration' | 'Traditional Watercolor' | 'Cyberpunk' | 'Ink and Watercolor Portrait' | 'Intricate Abstract Lines Portrait' | '3D Render' | 'Old School Comic' | 'Bold Colored Illustration' | 'Synthwave' | 'Minimal Cold Futurism' | 'Futuristic Anime' | 'Cinematic Miyazaki' | 'Studio Ghibli Film Still' | 'Soft Delicate Matte Portrait' | 'Cinematic Landscape' | 'Landscape Painting' | 'Photograph' | 'Jackson Pollock' | 'Cubist' | 'Abstract Minimalist' | 'Impressionism' | 'Van Gogh' | 'Woodcut' | 'Oil Painting' | 'Vintage Japanese Anime' | 'Pixar' | 'Cosmic' | 'Pixel Art' | 'Fantasy' | 'Arcane' | 'Sin City' | 'Double Exposure' | 'Painted Cityscape' | '90s Streets' | 'Overgrown' | 'Postapocalyptic' | 'Spooky' | 'Miniatures' | 'Low Poly' | 'Art Deco' | 'Inkpunk' | 'Dark Graphic Illustration' | 'Dark Watercolor' | 'Faded Illustration' | 'Directed by AI', required — The art style used to create the output video
    - `art_style_custom` string — Describe custom art style. This field is required if `art_style` is `Custom`
    - `camera_effect` 'Simple Zoom Out' | 'Simple Zoom In' | 'Bounce Out' | 'Spin Bounce' | 'Rolling Bounces' | 'Rise and Climb' | 'Dramatic Zoom In' | 'Dramatic Zoom Out' | 'Sway Out' | 'Boost Zoom In' | 'Boost Zoom Out' | 'Heartbeat' | 'Bounce in Place' | 'Earthquake Bounce' | 'Slice Bounce' | 'Bounce In And Out' | 'Jump' | 'Road Trip' | 'Traverse' | 'Rubber Band' | 'Rodeo' | 'Accelerate' | 'Speed of Light' | 'Drift Spin' | 'Vertigo' | 'Cog in the Machine' | 'Quadrant' | 'Tron' | 'Pusher' | 'Roll In' | 'Hesitate In' | 'Zoom In - Audio Sync' | 'Pulse - Audio Sync' | 'Aggressive Zoom In - Audio Sync' | 'Roll In - Audio Sync' | 'Zoom Out - Audio Sync' | 'Aggressive Zoom Out - Audio Sync' | 'Sway Out - Audio Sync' | 'Bounce and Spin - Audio Sync' | 'Zoom In and Spin - Audio Sync' | 'Vertigo - Audio Sync' | 'Bounce Out - Audio Sync' | 'Earthquake Bounce - Audio Sync' | 'Pusher - Audio Sync' | 'Evolve - Audio Sync' | 'Devolve - Audio Sync' | 'Slideshow' | 'Pan Left' | 'Pan Right' | 'Tilt Up' | 'Tilt Down' | 'Directed by AI', required — The camera effect used to create the output video
    - `prompt_type` 'custom' | 'use_lyrics' | 'ai_choose', required — * `custom` - Use your own prompt for the video. * `use_lyrics` - Use the lyrics of the audio to create the prompt. If this option is selected, then `assets.audio_source` must be `file` or `youtube`. * `ai_choose` - Let AI write the prompt. If this option is selected, then `assets.audio_source` must be `file` or `youtube`.
    - `prompt` string — The prompt used for the video. Prompt is required if `prompt_type` is `custom`. Otherwise this value is ignored
    - `transition_speed` integer, required — Change determines how quickly the video's content changes across frames. * Higher = more rapid transitions. * Lower = more stable visual experience.
  - `assets` object, required — Provide the assets for animation.
    - `audio_source` 'none' | 'file' | 'youtube', required — Optionally add an audio source if you'd like to incorporate audio into your video
    - `audio_file_path` string — The path of the input audio. This field is required if `audio_source` is `file`. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
    - `youtube_url` string, uri — Using a youtube video as the input source. This field is required if `audio_source` is `youtube`
    - `image_file_path` string — An initial image to use a the first frame of the video. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.

## Response `200`

Success

- object — Success
  - `id` string, required — Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
  - `credits_charged` integer, 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.

## Other responses

- `400` — Invalid Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/magichourhq/apis/magic-hour-api.md) · [All operations](https://skmtc.net/magichourhq/apis/magic-hour-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/magichourhq/magic-hour-api/versions/941298cfb29f/schema)
