Magic Hour
App · 12 actions
Generate videos, images and audio and check the resulting projects.
Actions
| Action | What it does |
|---|---|
| Estimate audio credits | Preview the credit cost for an audio operation. |
| Estimate image credits | Preview the credit cost for an image operation. |
| Estimate video credits | Preview the credit cost for a video operation. |
| Generate a video | Create a video from a written prompt. |
| Generate an image | Create an image from a written prompt. |
| Generate music | Create a music track from a written prompt. |
| Get a video project | Check video generation status and retrieve available downloads. |
| Get an account | Read your plan and credit balance. |
| Get an audio project | Check audio generation status and retrieve available downloads. |
| Get an image project | Check image generation status and retrieve available downloads. |
| List saved items | Browse saved Magic Hour items. |
| List voices | Read the available voice catalog. |
Estimate audio credits
Preview the credit cost for an audio operation.
Inputs
- Tool
tooltextRequired - The create endpoint to price, named by its path. For example `ai-voice-generator` for `POST /v1/ai-voice-generator`.One of:
ai-voice-generator,ai-voice-cloner,ai-music-generator. - Character count
character_countnumber - The number of characters in the `style.prompt` of the create request. Used by `ai-voice-generator`, `ai-voice-cloner`.
- Duration
durationnumber - The `duration` of the create request. Used by `ai-music-generator`.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"estimated_credits": 1
}
}Estimate image credits
Preview the credit cost for an image operation.
Inputs
- Tool
tooltextRequired - The create endpoint to price, named by its path. For example `ai-image-editor` for `POST /v1/ai-image-editor`.One of:
ai-image-generator,ai-image-editor,ai-image-upscaler,body-swap,head-swap,face-swap-photo,ai-clothes-changer,ai-face-editor,ai-gif-generator,ai-headshot-generator, and 4 more. - Model
modeltext - The `model` of the create request. Used by `ai-image-generator`, `ai-image-editor`.
- Resolution
resolutiontext - The `resolution` of the create request. Used by `ai-image-generator`, `ai-image-editor`, `body-swap`. One of `640px`, `1k`, `2k`, `4k`.
- Image count
image_countnumber - The `image_count` of the create request. Used by `ai-image-generator`, `ai-image-editor`. Defaults to 1.
- Scale factor
scale_factornumber - The `scale_factor` of the create request. Used by `ai-image-upscaler`. One of `2`, `4`.
- Mode
modetext - The `style.mode` of the create request. Used by `ai-image-upscaler`. One of `preserve`, `balanced`, `creative`. Defaults to `balanced`.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"estimated_credits": 1
}
}Estimate video credits
Preview the credit cost for a video operation.
Inputs
- Tool
tooltextRequired - The create endpoint to price, named by its path. For example `image-to-video` for `POST /v1/image-to-video`.One of:
image-to-video,text-to-video,ai-ugc-ad,ai-video-editor,character-replace,audio-to-video,ai-video-translator,ai-video-upscaler,face-swap,auto-subtitle-generator. - End seconds
end_secondsnumberRequired - The `end_seconds` of the create request. Used by every tool.
- Start seconds
start_secondsnumber - The `start_seconds` of the create request, for tools whose create request has it. Defaults to 0.
- Model
modeltext - Model.
- Resolution
resolutiontext - Resolution.
- Audio
audiotrue/false - The `audio` of the create request. Used by `image-to-video`, `text-to-video`. Defaults to `false`.
- Has video reference
has_video_referencetrue/false - Whether any of the create request's `references` is a video. Used by `text-to-video`. Defaults to `false`.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"estimated_credits": 1
}
}Generate a video
Create a video from a written prompt.
Inputs
- Idempotency key
idempotency_keytext - Idempotency key.
- Name
nametext - Give your video a custom name for easy identification.
- End seconds
end_secondsnumberRequired - The total duration of the output video in seconds. Supported durations depend on the chosen model:.From 1 to 60.
- Aspect ratio
aspect_ratiotext - Determines the aspect ratio of the output video.One of:
16:9,9:16,1:1. - Resolution
resolutiontext - Resolution.One of:
360p,480p,720p,1080p,4k. - Model
modeltext - The AI model to use for video generation.One of:
default,minimax-h3,kling-4.0,kling-3.0,ltx-2.5,wan-2.2,seedance-2.5,wan-3.0,seedance-2.0-mini,veo3.1, and 15 more. - Audio
audiotrue/false - Whether to include audio in the video. Defaults to `false` if not specified.
- Prompt
prompttextRequired - Describe what you want to generate.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"credits_charged": 1,
"id": "example"
}
}Generate an image
Create an image from a written prompt.
Inputs
- Idempotency key
idempotency_keytext - Idempotency key.
- Name
nametext - Give your image a custom name for easy identification.
- Image count
image_countnumberRequired - Number of images to generate. Maximum varies by model.From 1 to 16.
- Model
modeltext - The AI model to use for image generation. Each model has different capabilities and costs.One of:
default,z-image-turbo,gpt-image-2,qwen-image-2.1,flux-2-klein,flux-3-klein,nano-banana-2.1,nano-banana-pro,krea-2,seedream-v5-pro, and 9 more. - Aspect ratio
aspect_ratiotext - The aspect ratio of the output image(s). If not specified, defaults to `1:1` (square).One of:
1:1,16:9,9:16. - Resolution
resolutiontext - Maximum resolution (longest edge) for the output image.One of:
auto,640px,1k,2k,4k. - Prompt
prompttextRequired - Describe what you want to generate.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"credits_charged": 1,
"id": "example"
}
}Generate music
Create a music track from a written prompt.
Inputs
- Idempotency key
idempotency_keytext - Idempotency key.
- Name
nametext - Give your audio a custom name for easy identification.
- Duration
durationnumberRequired - Requested track duration in seconds, from 15 to 300. Determines credits charged.From 15 to 300.
- Prompt
prompttextRequired - Describe what you want to generate.
- Instrumental
instrumentaltrue/false - Create a track without vocals.
- Lyrics
lyricstext - Lyrics for the new track.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"credits_charged": 1,
"id": "example"
}
}Get a video project
Check video generation status and retrieve available downloads.
Inputs
- Project ID
project_idtextRequired - Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"created_at": "example",
"credits_charged": 1,
"downloads": [
{
"expires_at": "example",
"url": "example"
}
],
"enabled": true,
"end_seconds": 1,
"error": {
"code": "example",
"message": "example"
},
"fps": 1,
"height": 1,
"id": "example",
"name": "example",
"start_seconds": 1,
"status": "draft",
"type": "example",
"width": 1
}
}Get an account
Read your plan and credit balance.
Inputs
None.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"auto_reload": {
"status": "disabled"
},
"credits": 1,
"email": "example",
"id": "example",
"subscription": {
"billing_interval": "month",
"cancel_at_period_end": true,
"current_period_end": "example",
"discount": {},
"name": "example",
"price": {},
"status": "active"
},
"tier": "free"
}
}Get an audio project
Check audio generation status and retrieve available downloads.
Inputs
- Project ID
project_idtextRequired - Unique ID of the audio project. This value is returned by all of the POST APIs that create an audio.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"created_at": "example",
"credits_charged": 1,
"downloads": [
{
"expires_at": "example",
"url": "example"
}
],
"enabled": true,
"error": {
"code": "example",
"message": "example"
},
"id": "example",
"name": "example",
"status": "draft",
"type": "example"
}
}Get an image project
Check image generation status and retrieve available downloads.
Inputs
- Project ID
project_idtextRequired - Unique ID of the image project. This value is returned by all of the POST APIs that create an image.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"created_at": "example",
"credits_charged": 1,
"downloads": [
{
"expires_at": "example",
"url": "example"
}
],
"enabled": true,
"error": {
"code": "example",
"message": "example"
},
"id": "example",
"image_count": 1,
"name": "example",
"status": "draft",
"type": "example"
}
}List saved items
Browse saved Magic Hour items.
Inputs
- Type
typetext - Only return saved items of this type.One of:
character,reference,voice,moodboard,brand_kit(Brand kit). - Limit
limitnumber - Maximum number of saved items to return. Defaults to 20.From 1 to 100.
- Cursor
cursortext - Opaque pagination cursor from the previous response's next_cursor.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"items": [
{
"assets": [
{}
],
"id": "example",
"name": "example",
"type": "character"
}
],
"next_cursor": "example"
}
}List voices
Read the available voice catalog.
Inputs
- Limit
limitnumber - Maximum number of voices to return. Defaults to 20.From 1 to 100.
- Cursor
cursortext - Opaque pagination cursor from the previous response's next_cursor.
Outputs
dataobject- The response from Magic Hour.
Example output
{
"data": {
"next_cursor": "example",
"voices": [
{
"avatar_url": "example",
"id": "example",
"name": "example",
"preview_url": "example"
}
]
}
}