Magic Hour

v0.1.2
io.github.magichourhq/magic-hour Checked 5 days ago Published 7 days ago

Create and edit images and video, generate music, and retrieve existing audio projects.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_workflow_guide Choose a media workflow

Returns required inputs, ordered steps, example requests and review criteria for supported Magic Hour workflows. Use when planning a generation, not to run one. Requires authentication but does not check account eligibility or spend credits.

ParameterTypeDescription
workflow *stringChoose the workflow matching the task and supplied inputs. Returns static planning guidance, not an account eligibility or cost quote.

upload_chatgpt_image Upload attached image

Uploads a PNG, JPEG or WebP image attached in ChatGPT to the connected Magic Hour account. Use this for native ChatGPT photo attachments instead of asking the chat's file runtime to PUT bytes to get_upload_urls. Pass the returned file_path to the existing image or video generation tool. Accepts one image up to 20 MiB. Does not generate media or spend generation credits.

ParameterTypeDescription
image *objectThe native attached image. ChatGPT supplies download_url and file_id; direct MCP callers must supply that file object, not a bare file ID, filename or local path.

upload_chatgpt_media Upload attached media

Uploads one native ChatGPT attachment to the connected Magic Hour account: PNG/JPEG/WebP images, MP4/MOV/WebM video, or MP3/WAV/M4A/FLAC/Ogg/WebM audio, up to 20 MiB. Set media_type to the attachment's actual kind, not the requested output: image, video or audio. For multiple references, call separately and keep each returned file_path paired with the intended input. Pass the real attachment through the file parameter; a bare file ID, filename or chat-local path is not the raw MCP file object. Does not generate media or spend generation credits.

ParameterTypeDescription
file *objectNative ChatGPT attachment object containing download_url and file_id.
media_type *stringActual input attachment kind: image, video or audio, not the desired output kind.

ping Ping

Checks that the Magic Hour server is reachable. Use for connectivity troubleshooting; it does not validate API credentials or account access. Makes no media or project changes.

create_credit_checkout Create Credit Checkout

Returns a checkout link for a one-time credit pack purchase on the connected Magic Hour account. Pass credit_shortfall from an insufficient_credits refusal to start with enough packs. Charges nothing; the user pays on the checkout page. Show checkout_url unchanged.

ParameterTypeDescription
credit_shortfallCredits the refused request is missing.
pack_countCredit packs to start with, when the user names a number. Takes priority over credit_shortfall.

wait_for_video_project Wait for Video Project

Polls an existing video project until it completes, fails, is canceled, or times out. Read-only. After a timeout, use the same project ID to resume checking. Use signed download URLs unchanged. In ChatGPT, show Magic Hour's result card for playback and download when the video completes.

ParameterTypeDescription
id *stringExisting project ID returned by the matching creation tool. Reuse this ID after a wait timeout.
include_inline_downloadsbooleanReserved for compatibility. Video waits return download links, never inline video, regardless of this value.
max_inline_downloadsintegerReserved for compatibility. Video waits do not inline downloads; leave at zero.
poll_interval_secondsnumberSeconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds.
timeout_secondsnumberMaximum seconds for this wait call, finite and greater than zero. Timeout does not cancel the project or start another generation.

wait_for_image_project Wait for Image Project

Polls an image project until it completes, errors, is canceled or times out. Use with the id returned by an image create tool. Read-only; returns the project and download URLs, with optional inline image previews sharing an 8 MiB total limit. After a timeout, resume with the same id rather than creating another generation. Use signed download URLs exactly as returned.

ParameterTypeDescription
id *stringExisting project ID returned by the matching creation tool. Reuse this ID after a wait timeout.
include_inline_downloadsbooleanWhether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails.
max_bytes_per_downloadintegerPositive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL.
max_inline_downloadsintegerMaximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit.
poll_interval_secondsnumberSeconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds.
timeout_secondsnumberMaximum seconds for this wait call, finite and greater than zero. Timeout does not cancel the project or start another generation.

wait_for_audio_project Wait for Audio Project

Polls an audio project until it completes, errors, is canceled or times out. Use with the id returned by an audio create tool. Read-only; returns the project and download URLs, with optional inline audio previews sharing an 8 MiB total limit. After a timeout, resume with the same id rather than creating another generation. Use signed download URLs exactly as returned.

ParameterTypeDescription
id *stringExisting project ID returned by the matching creation tool. Reuse this ID after a wait timeout.
include_inline_downloadsbooleanWhether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails.
max_bytes_per_downloadintegerPositive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL.
max_inline_downloadsintegerMaximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit.
poll_interval_secondsnumberSeconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds.
timeout_secondsnumberMaximum seconds for this wait call, finite and greater than zero. Timeout does not cancel the project or start another generation.

fetch_image_download Fetch Image Download

Fetch a completed project's image as inline MCP image content for compatible clients. Use the exact signed download URL, including query parameters. Requires HTTPS at the configured Magic Hour media host. Read-only; inline content is limited to 8 MiB, or a smaller requested max_bytes. Returns the original-file download link when the media exceeds this limit. For playback or downloads in ChatGPT, open Magic Hour’s result card with get_image_project or wait_for_image_project using the existing project ID. When this tool shows a result card in ChatGPT, use its Download control. Do not put the s…

ParameterTypeDescription
download_url *stringExact HTTPS URL from a completed project’s downloads or exact_download_urls. Preserve all query parameters; must use the configured Magic Hour media host.
max_bytesintegerPositive maximum inline download bytes, capped at 8388608 bytes (8 MiB). Larger files return an original-file download link.

fetch_audio_download Fetch Audio Download

Fetch a completed project's audio as inline MCP audio content for compatible clients. Use the exact signed download URL, including query parameters. Requires HTTPS at the configured Magic Hour media host. Read-only; inline content is limited to 8 MiB, or a smaller requested max_bytes. Returns the original-file download link when the media exceeds this limit. For playback or downloads in ChatGPT, open Magic Hour’s result card with get_audio_project or wait_for_audio_project using the existing project ID. When this tool shows a result card in ChatGPT, use its Download control. Do not put the s…

ParameterTypeDescription
download_url *stringExact HTTPS URL from a completed project’s downloads or exact_download_urls. Preserve all query parameters; must use the configured Magic Hour media host.
max_bytesintegerPositive maximum inline download bytes, capped at 8388608 bytes (8 MiB). Larger files return an original-file download link.

fetch_video_download Fetch Video Download

Fetch a completed project's video as an embedded MCP binary resource for compatible clients. Use the exact signed download URL, including query parameters. Requires HTTPS at the configured Magic Hour media host. Read-only; inline content is limited to 8 MiB, or a smaller requested max_bytes. Returns the original-file download link when the media exceeds this limit. For playback or downloads in ChatGPT, open Magic Hour’s result card with get_video_project or wait_for_video_project using the existing project ID. When this tool shows a result card in ChatGPT, use its Download control. Do not pu…

ParameterTypeDescription
download_url *stringExact HTTPS URL from a completed project’s downloads or exact_download_urls. Preserve all query parameters; must use the configured Magic Hour media host.
max_bytesintegerPositive maximum inline download bytes, capped at 8388608 bytes (8 MiB). Larger files return an original-file download link.

get_account_info Get account info

Returns credit balance and subscription details for the connected account. Use to inspect account information before choosing generation settings. Use tier, not the subscription name or credit balance, for plan access. Read-only; this is not a request-specific cost quote or model-eligibility check.

checkout_create Create checkout

Create a Stripe Checkout link for the account that owns the API key. Nothing is charged until the checkout is completed in a browser.

ParameterTypeDescription
type *stringWhat to buy. `credit_pack` is a one-time credit purchase.
credit_shortfallnumberCredits a blocked request is missing, e.g. `credit_shortfall` from a 402 response. The checkout starts with enough packs to cover it. Defaults to one pack.
pack_countintegerNumber of credit packs the checkout starts with. Takes priority over `credit_shortfall`.

estimate_image Estimate image credits

Get the credits an image create request charges. Pass `tool`, then the fields below that the tool's create request uses, with the same values. Does not create a project or spend credits. It prices the fields passed here. It does not check your plan, your balance or the rest of the create request.

ParameterTypeDescription
tool *stringThe create endpoint to price, named by its path. For example `ai-image-editor` for `POST /v1/ai-image-editor`.
image_countintegerThe `image_count` of the create request. Used by `ai-image-generator`, `ai-image-editor`. Defaults to 1.
modestringThe `style.mode` of the create request. Used by `ai-image-upscaler`. One of `preserve`, `balanced`, `creative`. Defaults to `balanced`.
modelstringThe `model` of the create request. Used by `ai-image-generator`, `ai-image-editor`.
resolutionstringThe `resolution` of the create request. Used by `ai-image-generator`, `ai-image-editor`, `body-swap`. One of `640px`, `1k`, `2k`, `4k`.
scale_factornumberThe `scale_factor` of the create request. Used by `ai-image-upscaler`. One of `2`, `4`.

estimate_video Estimate video credits

Get the credits a video create request charges when it is submitted. Pass `tool`, then the fields below that the tool's create request uses, with the same values. Tools billed per frame charge an estimate at submission, assuming 30 fps for an uploaded video, and settle to the frames that render. Does not create a project or spend credits. It prices the fields passed here. It does not check your plan, your balance or the rest of the create request.

ParameterTypeDescription
end_seconds *numberThe `end_seconds` of the create request. Used by every tool.
tool *stringThe create endpoint to price, named by its path. For example `image-to-video` for `POST /v1/image-to-video`.
audiobooleanThe `audio` of the create request. Used by `image-to-video`, `text-to-video`. Defaults to `false`.
has_video_referencebooleanWhether any of the create request's `references` is a video. Used by `text-to-video`. Defaults to `false`.
modelstringThe `model` of the create request. Used by `image-to-video`, `text-to-video`, `ai-ugc-ad`, `ai-video-editor`, `character-replace`.
resolutionstringThe `resolution` of the create request. Used by `image-to-video`, `text-to-video`, `ai-ugc-ad`, `ai-video-editor`, `character-replace`, `audio-to-video`, `ai-video-translator`, `ai-video-upscaler`. `a…
start_secondsnumberThe `start_seconds` of the create request, for tools whose create request has it. Defaults to 0.

estimate_audio Estimate audio credits

Get the credits an audio create request charges. Pass `tool`, then the field below that the tool's create request uses. Does not create a project or spend credits. It prices the fields passed here. It does not check your plan, your balance or the rest of the create request.

ParameterTypeDescription
tool *stringThe create endpoint to price, named by its path. For example `ai-voice-generator` for `POST /v1/ai-voice-generator`.
character_countintegerThe number of characters in the `style.prompt` of the create request. Used by `ai-voice-generator`, `ai-voice-cloner`.
durationintegerThe `duration` of the create request. Used by `ai-music-generator`.

list_saved_items List saved items

Lists the account's active saved characters, references, voice recordings, moodboards and brand kits, newest first. Reusable paths are in each item's assets[].file_path; temporary signed URLs support preview/download. Read-only; pass next_cursor as cursor for the next page.

ParameterTypeDescription
cursorstringOpaque pagination cursor from the previous response's next_cursor.
limitintegerMaximum number of saved items to return. Defaults to 20.
typestringOnly return saved items of this type.

voices_list List voices

List 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 next_cursor as cursor.

ParameterTypeDescription
cursorstringOpaque pagination cursor from the previous response's next_cursor.
limitintegerMaximum number of voices to return. Defaults to 20.

get_upload_urls Get upload URLs

Creates presigned upload URL and file-path pairs for local media. Use when your client can PUT the raw bytes to upload_url, then pass file_path to the create tool. For a ChatGPT attachment, use the creation tool's attachment field, upload_chatgpt_image, or upload_chatgpt_media. This tool only issues upload URLs.

ParameterTypeDescription
items *arrayThe list of assets to upload. The response array will match the order of items in the request body.

get_face_detection_results Get face detection results

Returns a face-detection job's status and detected faces. Use with the id from detect_faces to inspect progress and choose face mappings before a selected-face swap. Read-only; faces may populate while processing.

ParameterTypeDescription
id *stringThe id of the task. This value is returned by the [face detection API](https://docs.magichour.ai/api-reference/files/face-detection#response-id).

detect_faces Detect faces

Starts an asynchronous face-detection task for a supplied image or video and returns its id and charge information. Use before a selected-face swap, then retrieve its status and detected faces with get_face_detection_results. Current API documentation describes detection as free; pricing may change. Use the named attachment fields first for ChatGPT files. Ask which file goes where if their roles are unclear. If a file fails, ask the user to attach it again and keep the requested settings.

ParameterTypeDescription
assetsobjectProvide the assets for face detection
confidence_scorenumberConfidence threshold for filtering detected faces. * Higher values (e.g., 0.9) include only faces detected with high certainty, reducing false positives. * Lower values (e.g., 0.3) include more face…
imageobjectAttach the image from ChatGPT for this input.
videoobjectAttach the video from ChatGPT for this input.

get_video_project Get video project

Open a saved video in Magic Hour’s result card with Play and Download in ChatGPT. Use when someone asks to see, play, download or reopen an existing video. Pass the existing project ID. Read-only.

ParameterTypeDescription
id *stringUnique ID of the video project. This value is returned by all of the POST APIs that create a video.

delete_video_project Delete video project

Deletes the video project and attempts to delete its completed output. Cannot be undone; confirm with the user first.

ParameterTypeDescription
id *stringUnique ID of the video project. This value is returned by all of the POST APIs that create a video.

create_talking_photo Create talking photo

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Use a still portrait and an existing speech recording to make the portrait speak. A written script needs audio first. For a prepared ad image and written script, use create_spoken_ad_video. For existing video and replacement audio, use create_lip_sync_video. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraint…

ParameterTypeDescription
end_seconds *numberThe end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s.
start_seconds *numberThe start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for creating a talking photo
audioobjectAttach the audio from ChatGPT for this input.
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
resolutionstringOutput preset. Overrides `max_resolution`. Defaults to 480p in prompted mode; realistic mode uses the mapped plan maximum.
styleobjectAttributes used to dictate the style of the output

create_spoken_ad_video Create spoken ad video

Use a prepared image and a written script to generate a spoken ad with synthesized dialogue. For a still portrait and an existing speech recording, use create_talking_photo. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and suppli…

ParameterTypeDescription
end_seconds *numberVideo duration in seconds. Supported values by model: * kling-3.0: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 seconds. * ltx-2.5: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60…
script *stringThe words the actor should speak. Character limits apply after trimming: * kling-3.0: 2304 characters. * ltx-2.5: 3804 characters. * veo3.1: 2500 characters. LTX and Kling dialogue wrappers count towa…
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectPrepared image to animate into the spoken ad. The script is supplied separately.
imageobjectAttach the image from ChatGPT for this input.
modelstringDefaults to kling-3.0 on paid plans and ltx-2.5 on free plans.
resolutionstringDefaults to 720p on paid plans and 480p on free plans. Unsupported model/resolution combinations and resolutions unavailable for your plan are rejected.

edit_video Edit video

Edits the appearance or content of a supplied video segment using a text prompt. Use with a source video, the requested changes and the clip end time. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain inco…

ParameterTypeDescription
end_seconds *numberEnd time of your clip in seconds. Must be greater than `start_seconds`. Allowed duration depends on model: `gemini-omni-1.2`: 3-15s, `wan-3.0`: 2-15s, `ltx-2.5`: 0.5-60s (30s at 1080p), `kling-4.0`: 3…
style *objectInstructions describing the changes to make to the source video.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for video editing.
modelstringThe AI model to use for video editing. Defaults to `ltx-2.5` on free tiers and `gemini-omni-1.2` on paid tiers. * `gemini-omni-1.2`: Best for precise clips up to 15s, references, and high-resolution…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
reference_imagesarrayAttached image files. Set image_index in each matching entry to its position in this list, starting at 1.
referencesarrayName references without @ and refer to them as @name in style.prompt. Names must be unique, ignoring case. Maximum 10 references total. Omit for no references. Reference images for gemini-omni-1.2, w…
resolutionstringOutput resolution. Defaults to `480p` for free tier and `720p` for paid. Supported per model: `gemini-omni-1.2`: 360p, 720p, 1080p, 4k; `wan-3.0`: 480p, 720p, 1080p; `ltx-2.5`: 480p, 720p, 1080p; `kli…
start_secondsnumberStart time of your clip (seconds). Must be ≥ 0.
videoobjectAttach the video from ChatGPT for this input.

translate_video Translate video

Dub a supplied video segment into a supported target language while preserving the speaker's voice and synchronizing lip movements to the translated speech. Supply the source video, target_language and end_seconds; start_seconds selects the segment's start. Translation, voice preservation and lip sync are included in this one operation; do not add separate voice cloning or lip-sync jobs for the same dub. For an already prepared replacement recording, use create_lip_sync_video instead. Starts a background job that costs credits; returns a project id for wait_for_video_project. Review translatio…

ParameterTypeDescription
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.
target_language *stringLanguage to translate the video's speech into.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectSource video for the translation job.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
resolutionstringOutput video resolution. Defaults to 480p. 720p and 1080p require a paid plan.
start_secondsnumberStart time of your clip (seconds). Must be ≥ 0.
videoobjectAttach the video from ChatGPT for this input.

upscale_video Upscale video

Upscales a supplied video segment to a selected output resolution while preserving its aspect ratio. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them.…

ParameterTypeDescription
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds.
resolution *stringOutput resolution. `720p` and `1080p` set the output's short side, `2k` and `4k` its long side; the aspect ratio is kept. Requires a paid plan.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectSource video for the upscale job.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
start_secondsnumberStart time of your clip (seconds). Must be ≥ 0.
videoobjectAttach the video from ChatGPT for this input.

create_animation Create animation

Creates a stylized animated video with art and camera settings, using a custom prompt or an audio-derived prompt mode. Can use an initial image and audio. Credits depend on frame rate and duration; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain i…

ParameterTypeDescription
assets *objectProvide the assets for animation.
end_seconds *numberThis value determines the duration of the output video.
fps *numberThe desire output video frame rate
height *integerThe 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
style *objectDefines the style of the output video
width *integerThe 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
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
audioobjectAttach the audio from ChatGPT for this input. Set assets.audio_source to file.
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.

create_video_from_audio Create video from audio

Generates an audio-guided video from a supplied audio track, with an optional starting image and visual prompt. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submit…

ParameterTypeDescription
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds. Free plans are currently limited to 15 seconds of output, enforced by the API and may change. When the user gave no duration, choo…
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the audio file and an optional reference image.
audioobjectAttach the audio from ChatGPT for this input.
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
resolutionstringOutput video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers.
start_secondsnumberStart time of your clip (seconds). Must be ≥ 0.
styleobjectAttributes used to dictate the style of the output

add_subtitles_to_video Add subtitles to video

Adds automatically generated subtitles to a supplied video segment using a subtitle preset or custom text styling. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of sub…

ParameterTypeDescription
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds.
start_seconds *numberStart time of your clip (seconds). Must be ≥ 0.
style *objectStyle of the subtitle. At least one of `.style.template` or `.style.custom_config` must be provided. * If only `.style.template` is provided, default values for the template will be used. * If both a…
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for auto subtitle generator
namestringOptional project name for identifying this output. Omit to use the API's default project name.
videoobjectAttach the video from ChatGPT for this input.

replace_character_in_video Replace character in video

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Replaces a subject in a video with a character from a reference image, or transfers the video's motion onto that character. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement a…

ParameterTypeDescription
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds. Free plans are currently limited to 10 seconds of clip (`end_seconds` minus `start_seconds`), enforced by the API and may change.…
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectSource video and reference character image for the job.
character_imageobjectAttach the character image from ChatGPT for this input.
modelstringModel to use. Defaults to `wan-animate`. * **`wan-animate`**: 480p, 720p. Supports `points` subject selection. * **`kling-3.0`**: 720p, 1080p. Clips of 3–30 seconds in `animate` mode or 3–10 seco…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
resolutionstringOutput video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model.
start_secondsnumberStart time of your clip (seconds). Must be ≥ 0.
styleobjectOptional style controls for replace vs animate mode and subject selection.
videoobjectAttach the video from ChatGPT for this input.

swap_face_in_video Swap face in video

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Swaps faces in an existing video: all faces with a reference image, or selected faces using detect_faces results. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any ver…

ParameterTypeDescription
assets *objectProvide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds.
start_seconds *numberStart time of your clip (seconds). Must be ≥ 0.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
replacement_facesarrayAttached image files. Set image_index in each matching entry to its position in this list, starting at 1.
source_faceobjectAttach the source face from ChatGPT for this input.
styleobjectStyle of the face swap video.
videoobjectAttach the video from ChatGPT for this input. Set assets.video_source to file.

create_video_from_image Create video from image

Use a still image as the first frame and describe what should move. There is no aspect_ratio setting; the video's shape comes from the image. If the user wants a shape for where the video will be used (9:16 for TikTok, Reels, Shorts or Stories) and the image is a different shape, say so and offer to reframe it first with edit_image. For a portrait speaking to an existing recording, use create_talking_photo. For a prepared ad image and written script, use create_spoken_ad_video. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings…

create_lip_sync_video Create lip sync video

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Use existing video and replacement audio to match the speaker's lip movements to the recording. For a still portrait and existing speech recording, use create_talking_photo. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request n…

ParameterTypeDescription
assets *objectProvide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
end_seconds *numberEnd time of your clip (seconds). Must be greater than start_seconds.
start_seconds *numberStart time of your clip (seconds). Must be ≥ 0.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
audioobjectAttach the audio from ChatGPT for this input.
max_fps_limitnumberDefines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
styleobjectAttributes used to dictate the style of the output
videoobjectAttach the video from ChatGPT for this input. Set assets.video_source to file.

create_video_from_text Create video from text

Generates a video from a text prompt, with optional supported reference inputs and model settings. If the user has not specified an aspect ratio, choose it for where the video will be used, such as 9:16 for TikTok or Reels. To animate an existing starting image, use create_video_from_image. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requireme…

restyle_video Restyle video

Restyles an existing video clip with an art-style preset or a custom prompt. Supports v1/v2/v3 presets; v3 requires a supplied reference image and positive source-video width and height. Starts a background job that costs credits; returns a project id for wait_for_video_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requiremen…

get_image_project Get image project

Open a saved image in Magic Hour’s result card with the image and Download in ChatGPT. Use when someone asks to see, download or reopen an existing image. Pass the existing project ID. Read-only.

ParameterTypeDescription
id *stringUnique ID of the image project. This value is returned by all of the POST APIs that create an image.

delete_image_project Delete image project

Deletes the image project and attempts to delete its completed output. Cannot be undone; confirm with the user first.

ParameterTypeDescription
id *stringUnique ID of the image project. This value is returned by all of the POST APIs that create an image.

change_clothes_in_photo Change clothes in photo

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Changes clothing in a person photo using a supplied garment reference image. Costs 25 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for clothes changer
garment_imageobjectAttach the garment image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
person_imageobjectAttach the person image from ChatGPT for this input.

edit_face_in_photo Edit face in photo

Adjusts facial expression, pose and gaze in a supplied photo using numeric controls. Costs 1 credit per edit; output size depends on the subscription tier. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combi…

ParameterTypeDescription
style *objectFace editing parameters
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for face editor
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.

create_gif_or_short_video Create GIF or short video

Generates a short animation from a text prompt, with GIF, MP4 or WebM output. Costs 50 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alone doe…

ParameterTypeDescription
style *objectText instructions for the animation's subject, appearance and motion.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
output_formatstringThe output file format for the generated animation.

edit_image Edit image

Edits one or more supplied images using a text prompt. For prompt-only creation use generate_image. Costs credits; returns a project id for wait_for_image_project. Model eligibility depends on the account plan. When the user has not chosen a model, resolution or count, omit them; the API picks eligible defaults for the plan. Preserve an explicit model, resolution or count; if the plan can't use it, explain the limit and offer a supported option before changing it. Check the chosen model's input limits; never drop references. Before choosing settings, read get_account_info and the current param…

generate_headshot Generate headshot

Creates a headshot from a supplied photo containing one detectable face, with optional appearance instructions. Costs 50 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitt…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for headshot photo
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
styleobjectOptional headshot appearance instructions. Omit the prompt for the API's default style.

generate_image Generate image

Generates one or more images from a text prompt, with model, output size and image count options. Costs credits; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alone does not es…

ParameterTypeDescription
image_count *integerNumber of images to generate. Maximum varies by model.
style *objectThe art style to use for image generation.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
aspect_ratiostringKeep an aspect ratio the user explicitly requests. Otherwise, choose by where the output will be used: 9:16 for TikTok, Reels, Shorts, Stories or a phone screen; 16:9 for YouTube, a website, slides or…
modelstringWhen the user has not requested a model, use `default` rather than selecting a premium model. Preserve an explicit model. If the user asks for a resolution, pick a model whose supported resolutions in…
namestringOptional project name for identifying this output. Omit to use the API's default project name.
resolutionstringMaximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Map…

upscale_image Upscale image

Upscales a supplied image 2x or 4x. Cost depends on scale and mode (25-200 credits); returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alone does not establish eligibility or affor…

ParameterTypeDescription
scale_factor *numberHow much to scale the image. Must be either 2 or 4. Note: 4x upscale is only available on Creator, Pro, or Business tier.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for upscaling
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.
styleobjectStyle settings for the upscale. Use `mode` (`"preserve"`, `"balanced"`, or `"creative"`). Defaults to `"balanced"`.

create_meme Create meme

Creates a meme from a topic and template selection. Costs 10 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alone does not establish eligibilit…

ParameterTypeDescription
style *objectMeme topic, template and whether to search the web for content.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
namestringThe name of the meme.

create_qr_code Create QR code

Creates a stylized QR code from supplied text or a URL and an art-style description. Currently costs 0 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit b…

ParameterTypeDescription
content *stringThe content of the QR code.
style *objectVisual art style for the QR code image.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
namestringOptional project name for identifying this output. Omit to use the API's default project name.

place_person_in_scene Place person in scene

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Places a person from one supplied photo into a supplied scene image. Cost depends on resolution (from 50 credits at 640px); returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user…

ParameterTypeDescription
resolution *stringOutput resolution. Determines credits charged for the run.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectPerson image and scene image for body swap
namestringOptional project name for identifying this output. Omit to use the API's default project name.
person_imageobjectAttach the person image from ChatGPT for this input.
scene_imageobjectAttach the scene image from ChatGPT for this input.

swap_face_in_photo Swap face in photo

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Swaps faces in a supplied photo using a source face image or selected face mappings. Costs 10 credits; output size depends on subscription. Returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and ge…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for face swap photo
namestringOptional project name for identifying this output. Omit to use the API's default project name.
replacement_facesarrayAttached image files. Set image_index in each matching entry to its position in this list, starting at 1.
source_faceobjectAttach the source face from ChatGPT for this input.
target_imageobjectAttach the target image from ChatGPT for this input.

swap_head_in_photo Swap head in photo

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors. Swaps a head from a supplied image onto a supplied body image. Costs 10 credits; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve expli…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the body and head images for head swap
body_imageobjectAttach the body image from ChatGPT for this input.
head_imageobjectAttach the head image from ChatGPT for this input.
max_resolutionintegerConstrains the larger dimension (height or width) of the output. Omit to use the maximum allowed for your plan (capped at 2048px). Values above your plan maximum are clamped down to your plan's maximu…
namestringOptional project name for identifying this output. Omit to use the API's default project name.

remove_image_background Remove image background

Removes an image's background, optionally replacing it with another supplied image. Costs 5 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alon…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for background removal
background_imageobjectAttach the background image from ChatGPT for this input.
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.

colorize_photo Colorize photo

Colorizes a black-and-white or faded photo. Costs 10 credits; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance alone does not establish eligibility or affordability. Use the named…

ParameterTypeDescription
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for photo colorization
imageobjectAttach the image from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.

get_audio_project Get audio project

Open a saved audio project in Magic Hour’s result card with playback and Download in ChatGPT. Use when someone asks to hear, download or reopen an existing audio project. Pass the existing project ID. Read-only.

ParameterTypeDescription
id *stringUnique ID of the audio project. This value is returned by all of the POST APIs that create an audio.

delete_audio_project Delete audio project

Deletes the audio project and attempts to delete its completed output. Cannot be undone; confirm with the user first.

ParameterTypeDescription
id *stringUnique ID of the audio project. This value is returned by all of the POST APIs that create an audio.

generate_music Generate music

Generates music from a description, with optional custom lyrics or instrumental-only output. Costs 1 credit per requested second; returns a project id for wait_for_audio_project. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose models and settings available on Free. If the request needs a paid-only option, explain the requirement and any verified cost, and get explicit user opt-in before submitting it. Preserve explicit requirements and supplied inputs. Explain incompatible combinations instead of submitting them. Credit balance…

ParameterTypeDescription
duration *integerRequested track duration in seconds, from 15 to 300. Determines credits charged.
style *objectSong description, vocal or instrumental choice, and optional custom lyrics.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
namestringOptional project name for identifying this output. Omit to use the API's default project name.

ai_voice_cloner_create_audio AI Voice Cloner

MCP guidance: - Starts an async audio job; returns `id` and `credits_charged`. For finished results, call `wait_for_audio_project` with that id or poll `GET /v1/audio-projects/{id}` until `complete`, `error`, or `canceled`. Results include `downloads`; wait helpers add `exact_download_urls`. Preserve signed URLs and query parameters; never append expiration metadata. - For `*_file_path`, use an existing Magic Hour path or the upload-URL endpoint's `file_path` after uploading raw bytes to its presigned URL. Direct public media URLs may work if stable and fetchable as raw bytes; hotlinked URLs c…

ParameterTypeDescription
style *objectText to speak in the supplied voice, with language and speech-speed options.
Idempotency-KeystringA unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video…
assetsobjectProvide the assets for voice cloning.
audioobjectAttach the audio from ChatGPT for this input.
namestringOptional project name for identifying this output. Omit to use the API's default project name.

ai_voice_generator_create_audio AI Voice Generator

MCP guidance: - Starts an async audio job; returns `id` and `credits_charged`. For finished results, call `wait_for_audio_project` with that id or poll `GET /v1/audio-projects/{id}` until `complete`, `error`, or `canceled`. Results include `downloads`; wait helpers add `exact_download_urls`. Preserve signed URLs and query parameters; never append expiration metadata. Generate speech from text. Each character costs 0.1 credits. The cost is rounded up to the nearest whole number. Before choosing settings, read get_account_info and the current parameter constraints. For a Free account, choose mo…