Magic Hour API
Magic Hour provides a REST API (beta) for generating and editing video, images, and audio using AI. Webhook documentation can be found…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Magic Hour provides a REST API (beta) for generating and editing video, images, and audio using AI.
Webhook documentation can be found here.
If you have any questions, please reach out to us via discord.
Authentication
Every request requires an API key.
To get started, first generate your API key here.
Then, add the Authorization header to the request.
| Key | Value |
|---|---|
| Authorization | Bearer mhk_live_apikey |
> Warning: API generation and editing requests consume account credits. Cost varies by tool, model, and settings; see API pricing.
Endpoints 43
Video Projects
- GETGet video details
/v1/video-projects/:idCheck the progress of a video project. The downloads field is populated after a successful render. Statuses queued — waiting to start rendering — in progress… - DELETEDelete video
/v1/video-projects/:idPermanently delete the rendered video. This action is not reversible, please be sure before deleting. - POSTAI Talking Photo
/v1/ai-talking-photoCreate a talking photo video from an image and an audio file. - POSTAI UGC Ad Generator
/v1/ai-ugc-adCreate a spoken UGC video from a prepared image and script. Returns a project ID; poll GET /v1/video-projects/{id} for status and downloads. To compose an… - POSTAI Video Editor
/v1/ai-video-editorWhat this API does Create the same Video Editor you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to… - POSTAI Video Translator
/v1/ai-video-translatorWhat this API does Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it… - POSTAI Video Upscaler
/v1/ai-video-upscalerWhat this API does Create the same Video Upscaler you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to… - POSTAnimation
/v1/animationCreate a Animation video. The estimated frame cost is calculated based on the fps and end_seconds input. - POSTAudio-to-Video
/v1/audio-to-videoWhat this API does Create the same Audio To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to… - POSTAuto Subtitle Generator
/v1/auto-subtitle-generatorAutomatically generate subtitles for your video in multiple languages. - POSTCharacter Replace
/v1/character-replaceWhat this API does Create the same Character Replace you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it… - POSTFace Swap Video
/v1/face-swapWhat this API does Create the same Face Swap you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your… - POSTImage-to-Video
/v1/image-to-videoWhat this API does Create the same Image To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to… - POSTLip Sync
/v1/lip-syncWhat this API does Create the same Lip Sync you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your… - POSTText-to-Video
/v1/text-to-videoWhat this API does Create the same Text To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to… - POSTVideo-to-Video
/v1/video-to-videoWhat this API does Create the same Video To Video you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to…
Image Projects
- GETGet image details
/v1/image-projects/:idCheck the progress of a image project. The downloads field is populated after a successful render. Statuses queued — waiting to start rendering — in progress… - DELETEDelete image
/v1/image-projects/:idPermanently delete the rendered image(s). This action is not reversible, please be sure before deleting. - POSTAI Clothes Changer
/v1/ai-clothes-changerChange outfits in photos in seconds with just a photo reference. Each photo costs 25 credits. - POSTAI Face Editor
/v1/ai-face-editorEdit facial features of an image using AI. Each edit costs 1 frame. The height/width of the output image depends on your subscription. Please refer to our… - POSTAI GIF Generator
/v1/ai-gif-generatorCreate an AI GIF. Each GIF costs 50 credits. - POSTAI Image Editor
/v1/ai-image-editorEdit images with AI. - POSTAI Headshot Generator
/v1/ai-headshot-generatorCreate a 4:5 AI headshot. Each headshot costs 50 credits. - POSTAI Image Generator
/v1/ai-image-generatorCreate an AI image with advanced model selection and quality controls. - POSTAI Image Upscaler
/v1/ai-image-upscalerUpscale your image using AI. Each 2x upscale costs 50 credits for balanced/creative modes, and 25 credits for preserve. 4x upscale costs 200 and 100 credits… - POSTAI Meme Generator
/v1/ai-meme-generatorCreate an AI generated meme. Each meme costs 10 credits. - POSTAI QR Code Generator
/v1/ai-qr-code-generatorCreate an AI QR code. Each QR code costs 0 credits. - POSTBody Swap
/v1/body-swapSwap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2.1 (2k/4k). Credits depend on resolution (from 50 credits at 640px upward). - POSTFace Swap Photo
/v1/face-swap-photoCreate a face swap photo. Each photo costs 10 credits. The height/width of the output image depends on your subscription. Please refer to our pricing page for… - POSTHead Swap
/v1/head-swapSwap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set max_resolution lower than your plan… - POSTImage Background Remover
/v1/image-background-removerRemove background from image. Each image costs 5 credits. - POSTPhoto Colorizer
/v1/photo-colorizerColorize image. Each image costs 10 credits.
Audio Projects
- GETList voices
/v1/voicesList the voices available for text-to-speech. Use a voice's id as style.voice_name in the AI Voice Generator API. To fetch the next page, pass the response's… - GETGet audio details
/v1/audio-projects/:idCheck the progress of a audio project. The downloads field is populated after a successful render. Statuses queued — waiting to start rendering — in progress… - DELETEDelete audio
/v1/audio-projects/:idPermanently delete the rendered audio file(s). This action is not reversible, please be sure before deleting. - POSTAI Music Generator
/v1/ai-music-generatorGenerate music from a description, with optional custom lyrics or instrumental-only output. Costs 1 credits per requested second. Returns a project ID; poll… - POSTAI Voice Cloner
/v1/ai-voice-clonerClone a voice from an audio sample and generate speech. * Each character costs 0.1 credits. * The cost is rounded up to the nearest whole number - POSTAI Voice Generator
/v1/ai-voice-generatorGenerate speech from text. Each character costs 0.1 credits. The cost is rounded up to the nearest whole number.
Files
- GETList saved items
/v1/saved-itemsReturns active saved items owned by the authenticated account, newest first. Each item includes every saved asset with a durable file_path for reuse in… - POSTGenerate asset upload urls
/v1/files/upload-urlsGenerates a list of pre-signed upload URLs for the assets required. This API is only necessary if you want to upload to Magic Hour's storage. Refer to the… - GETGet face detection details
/v1/face-detection/:idGet the details of a face detection task. Use this API to get the list of faces detected in the image or video to use in the face swap photo or face swap… - POSTFace Detection
/v1/face-detectionDetect faces in an image or video. Use this API to get the list of faces detected in the image or video to use in the face swap photo or face swap video API…
Account
- GETGet account details
/v1/accountGet the current credit balance and subscription details of the account that owns the API key.
API details
- Base URL
https://api.magichour.ai- Authentication
- A bearer token in the Authorization header
- Operations
- 43 operations on 40 pathsPOST 33GET 7DELETE 3
- Main resources
- Image Projects 16Video Projects 16Audio Projects 6Files 4Account 1
- Response formats
application/json- Description format
- OpenAPI 3.0.2, API version
beta - Links
- OpenAPI document · Terms of service
- Listed from
- Magichour's published OpenAPI description
How to test the Magic Hour API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Magic Hour API collection, without the publisher's secrets.
- Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Get video details” (GET /v1/video-projects/:id), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Magic Hour API?
Magic Hour provides a REST API (beta) for generating and editing video, images, and audio using AI. Webhook documentation can be found… It is listed under AI & machine learning and has 43 endpoints.
Who publishes the Magic Hour API?
It is listed from Magic Hour AI's public API description (an OpenAPI document), not published by Magic Hour AI on Swastik Codes. Anyone who controls magichour.ai can claim the profile by adding a DNS TXT record.
What is the base URL of the Magic Hour API?
Requests go to https://api.magichour.ai. Endpoint paths are added to this base URL.
How do I authenticate with the Magic Hour API?
With A bearer token in the Authorization header.
How many endpoints does the Magic Hour API have?
43 operations on 40 paths (33 POST, 7 GET, 3 DELETE). The largest groups are Image Projects, Video Projects, Audio Projects, Files.
Is forking the Magic Hour API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.