Magic Hour

App · 12 actions

Generate videos, images and audio and check the resulting projects.

Actions

ActionWhat it does
Estimate audio creditsPreview the credit cost for an audio operation.
Estimate image creditsPreview the credit cost for an image operation.
Estimate video creditsPreview the credit cost for a video operation.
Generate a videoCreate a video from a written prompt.
Generate an imageCreate an image from a written prompt.
Generate musicCreate a music track from a written prompt.
Get a video projectCheck video generation status and retrieve available downloads.
Get an accountRead your plan and credit balance.
Get an audio projectCheck audio generation status and retrieve available downloads.
Get an image projectCheck image generation status and retrieve available downloads.
List saved itemsBrowse saved Magic Hour items.
List voicesRead the available voice catalog.

Estimate audio credits

Preview the credit cost for an audio operation.

Inputs

TooltooltextRequired
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 countcharacter_countnumber
The number of characters in the `style.prompt` of the create request. Used by `ai-voice-generator`, `ai-voice-cloner`.
Durationdurationnumber
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

TooltooltextRequired
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.
Modelmodeltext
The `model` of the create request. Used by `ai-image-generator`, `ai-image-editor`.
Resolutionresolutiontext
The `resolution` of the create request. Used by `ai-image-generator`, `ai-image-editor`, `body-swap`. One of `640px`, `1k`, `2k`, `4k`.
Image countimage_countnumber
The `image_count` of the create request. Used by `ai-image-generator`, `ai-image-editor`. Defaults to 1.
Scale factorscale_factornumber
The `scale_factor` of the create request. Used by `ai-image-upscaler`. One of `2`, `4`.
Modemodetext
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

TooltooltextRequired
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 secondsend_secondsnumberRequired
The `end_seconds` of the create request. Used by every tool.
Start secondsstart_secondsnumber
The `start_seconds` of the create request, for tools whose create request has it. Defaults to 0.
Modelmodeltext
Model.
Resolutionresolutiontext
Resolution.
Audioaudiotrue/false
The `audio` of the create request. Used by `image-to-video`, `text-to-video`. Defaults to `false`.
Has video referencehas_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 keyidempotency_keytext
Idempotency key.
Namenametext
Give your video a custom name for easy identification.
End secondsend_secondsnumberRequired
The total duration of the output video in seconds. Supported durations depend on the chosen model:.From 1 to 60.
Aspect ratioaspect_ratiotext
Determines the aspect ratio of the output video.One of: 16:9, 9:16, 1:1.
Resolutionresolutiontext
Resolution.One of: 360p, 480p, 720p, 1080p, 4k.
Modelmodeltext
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.
Audioaudiotrue/false
Whether to include audio in the video. Defaults to `false` if not specified.
PromptprompttextRequired
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 keyidempotency_keytext
Idempotency key.
Namenametext
Give your image a custom name for easy identification.
Image countimage_countnumberRequired
Number of images to generate. Maximum varies by model.From 1 to 16.
Modelmodeltext
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 ratioaspect_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.
Resolutionresolutiontext
Maximum resolution (longest edge) for the output image.One of: auto, 640px, 1k, 2k, 4k.
PromptprompttextRequired
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 keyidempotency_keytext
Idempotency key.
Namenametext
Give your audio a custom name for easy identification.
DurationdurationnumberRequired
Requested track duration in seconds, from 15 to 300. Determines credits charged.From 15 to 300.
PromptprompttextRequired
Describe what you want to generate.
Instrumentalinstrumentaltrue/false
Create a track without vocals.
Lyricslyricstext
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 IDproject_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 IDproject_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 IDproject_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

Typetypetext
Only return saved items of this type.One of: character, reference, voice, moodboard, brand_kit (Brand kit).
Limitlimitnumber
Maximum number of saved items to return. Defaults to 20.From 1 to 100.
Cursorcursortext
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

Limitlimitnumber
Maximum number of voices to return. Defaults to 20.From 1 to 100.
Cursorcursortext
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"
      }
    ]
  }
}

On this page