Magic Hour
v0.1.2Create 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.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | Choose 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.
| Parameter | Type | Description |
|---|---|---|
image * | object | The 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.
| Parameter | Type | Description |
|---|---|---|
file * | object | Native ChatGPT attachment object containing download_url and file_id. |
media_type * | string | Actual 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.
| Parameter | Type | Description |
|---|---|---|
credit_shortfall | Credits the refused request is missing. | |
pack_count | Credit 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Existing project ID returned by the matching creation tool. Reuse this ID after a wait timeout. |
include_inline_downloads | boolean | Reserved for compatibility. Video waits return download links, never inline video, regardless of this value. |
max_inline_downloads | integer | Reserved for compatibility. Video waits do not inline downloads; leave at zero. |
poll_interval_seconds | number | Seconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds. |
timeout_seconds | number | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Existing project ID returned by the matching creation tool. Reuse this ID after a wait timeout. |
include_inline_downloads | boolean | Whether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails. |
max_bytes_per_download | integer | Positive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL. |
max_inline_downloads | integer | Maximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit. |
poll_interval_seconds | number | Seconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds. |
timeout_seconds | number | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Existing project ID returned by the matching creation tool. Reuse this ID after a wait timeout. |
include_inline_downloads | boolean | Whether to include image or audio previews for completed projects. Download URLs remain available if preview fetching fails. |
max_bytes_per_download | integer | Positive maximum raw bytes per preview, capped by the remaining 8 MiB total budget. Larger outputs remain available by URL. |
max_inline_downloads | integer | Maximum number of previews to include. Zero or negative disables previews; previews share an 8 MiB total limit. |
poll_interval_seconds | number | Seconds between status checks. Must be finite and nonnegative; values below 0.5 use 0.5 seconds. |
timeout_seconds | number | Maximum 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…
| Parameter | Type | Description |
|---|---|---|
download_url * | string | Exact 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_bytes | integer | Positive 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…
| Parameter | Type | Description |
|---|---|---|
download_url * | string | Exact 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_bytes | integer | Positive 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…
| Parameter | Type | Description |
|---|---|---|
download_url * | string | Exact 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_bytes | integer | Positive 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.
| Parameter | Type | Description |
|---|---|---|
type * | string | What to buy. `credit_pack` is a one-time credit purchase. |
credit_shortfall | number | Credits 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_count | integer | Number 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.
| Parameter | Type | Description |
|---|---|---|
tool * | string | The create endpoint to price, named by its path. For example `ai-image-editor` for `POST /v1/ai-image-editor`. |
image_count | integer | The `image_count` of the create request. Used by `ai-image-generator`, `ai-image-editor`. Defaults to 1. |
mode | string | The `style.mode` of the create request. Used by `ai-image-upscaler`. One of `preserve`, `balanced`, `creative`. Defaults to `balanced`. |
model | string | The `model` of the create request. Used by `ai-image-generator`, `ai-image-editor`. |
resolution | string | The `resolution` of the create request. Used by `ai-image-generator`, `ai-image-editor`, `body-swap`. One of `640px`, `1k`, `2k`, `4k`. |
scale_factor | number | The `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.
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | The `end_seconds` of the create request. Used by every tool. |
tool * | string | The create endpoint to price, named by its path. For example `image-to-video` for `POST /v1/image-to-video`. |
audio | boolean | The `audio` of the create request. Used by `image-to-video`, `text-to-video`. Defaults to `false`. |
has_video_reference | boolean | Whether any of the create request's `references` is a video. Used by `text-to-video`. Defaults to `false`. |
model | string | The `model` of the create request. Used by `image-to-video`, `text-to-video`, `ai-ugc-ad`, `ai-video-editor`, `character-replace`. |
resolution | string | The `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_seconds | number | The `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.
| Parameter | Type | Description |
|---|---|---|
tool * | string | The create endpoint to price, named by its path. For example `ai-voice-generator` for `POST /v1/ai-voice-generator`. |
character_count | integer | The number of characters in the `style.prompt` of the create request. Used by `ai-voice-generator`, `ai-voice-cloner`. |
duration | integer | The `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.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Opaque pagination cursor from the previous response's next_cursor. |
limit | integer | Maximum number of saved items to return. Defaults to 20. |
type | string | Only 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.
| Parameter | Type | Description |
|---|---|---|
cursor | string | Opaque pagination cursor from the previous response's next_cursor. |
limit | integer | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
items * | array | The 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
assets | object | Provide the assets for face detection |
confidence_score | number | Confidence 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… |
image | object | Attach the image from ChatGPT for this input. |
video | object | Attach 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s. |
start_seconds * | number | The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s. |
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for creating a talking photo |
audio | object | Attach the audio from ChatGPT for this input. |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
resolution | string | Output preset. Overrides `max_resolution`. Defaults to 480p in prompted mode; realistic mode uses the mapped plan maximum. |
style | object | Attributes 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | Video 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 * | string | The 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-Key | string | A 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… |
assets | object | Prepared image to animate into the spoken ad. The script is supplied separately. |
image | object | Attach the image from ChatGPT for this input. |
model | string | Defaults to kling-3.0 on paid plans and ltx-2.5 on free plans. |
resolution | string | Defaults 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End 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 * | object | Instructions describing the changes to make to the source video. |
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for video editing. |
model | string | The 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
reference_images | array | Attached image files. Set image_index in each matching entry to its position in this list, starting at 1. |
references | array | Name 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… |
resolution | string | Output 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_seconds | number | Start time of your clip (seconds). Must be ≥ 0. |
video | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long. |
target_language * | string | Language to translate the video's speech into. |
Idempotency-Key | string | A 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… |
assets | object | Source video for the translation job. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
resolution | string | Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan. |
start_seconds | number | Start time of your clip (seconds). Must be ≥ 0. |
video | object | Attach 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.…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End time of your clip (seconds). Must be greater than start_seconds. |
resolution * | string | Output 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-Key | string | A 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… |
assets | object | Source video for the upscale job. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
start_seconds | number | Start time of your clip (seconds). Must be ≥ 0. |
video | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
assets * | object | Provide the assets for animation. |
end_seconds * | number | This value determines the duration of the output video. |
fps * | number | The desire output video frame rate |
height * | integer | 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 |
style * | object | Defines the style of the output video |
width * | integer | 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 |
Idempotency-Key | string | A 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… |
audio | object | Attach the audio from ChatGPT for this input. Set assets.audio_source to file. |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End 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-Key | string | A 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… |
assets | object | Provide the audio file and an optional reference image. |
audio | object | Attach the audio from ChatGPT for this input. |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
resolution | string | Output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. |
start_seconds | number | Start time of your clip (seconds). Must be ≥ 0. |
style | object | Attributes 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End time of your clip (seconds). Must be greater than start_seconds. |
start_seconds * | number | Start time of your clip (seconds). Must be ≥ 0. |
style * | object | Style 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-Key | string | A 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… |
assets | object | Provide the assets for auto subtitle generator |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
video | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
end_seconds * | number | End 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-Key | string | A 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… |
assets | object | Source video and reference character image for the job. |
character_image | object | Attach the character image from ChatGPT for this input. |
model | string | Model 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
resolution | string | Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model. |
start_seconds | number | Start time of your clip (seconds). Must be ≥ 0. |
style | object | Optional style controls for replace vs animate mode and subject selection. |
video | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
assets * | object | Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used |
end_seconds * | number | End time of your clip (seconds). Must be greater than start_seconds. |
start_seconds * | number | Start time of your clip (seconds). Must be ≥ 0. |
Idempotency-Key | string | A 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
replacement_faces | array | Attached image files. Set image_index in each matching entry to its position in this list, starting at 1. |
source_face | object | Attach the source face from ChatGPT for this input. |
style | object | Style of the face swap video. |
video | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
assets * | object | Provide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used |
end_seconds * | number | End time of your clip (seconds). Must be greater than start_seconds. |
start_seconds * | number | Start time of your clip (seconds). Must be ≥ 0. |
Idempotency-Key | string | A 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… |
audio | object | Attach the audio from ChatGPT for this input. |
max_fps_limit | number | Defines 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
style | object | Attributes used to dictate the style of the output |
video | object | Attach 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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-…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for clothes changer |
garment_image | object | Attach the garment image from ChatGPT for this input. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
person_image | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
style * | object | Face editing parameters |
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for face editor |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
style * | object | Text instructions for the animation's subject, appearance and motion. |
Idempotency-Key | string | A 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
output_format | string | The 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…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for headshot photo |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
style | object | Optional 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…
| Parameter | Type | Description |
|---|---|---|
image_count * | integer | Number of images to generate. Maximum varies by model. |
style * | object | The art style to use for image generation. |
Idempotency-Key | string | A 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_ratio | string | Keep 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… |
model | string | When 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… |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
resolution | string | Maximum 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…
| Parameter | Type | Description |
|---|---|---|
scale_factor * | number | How much to scale the image. Must be either 2 or 4. Note: 4x upscale is only available on Creator, Pro, or Business tier. |
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for upscaling |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
style | object | Style 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…
| Parameter | Type | Description |
|---|---|---|
style * | object | Meme topic, template and whether to search the web for content. |
Idempotency-Key | string | A 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… |
name | string | The 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…
| Parameter | Type | Description |
|---|---|---|
content * | string | The content of the QR code. |
style * | object | Visual art style for the QR code image. |
Idempotency-Key | string | A 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… |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
resolution * | string | Output resolution. Determines credits charged for the run. |
Idempotency-Key | string | A 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… |
assets | object | Person image and scene image for body swap |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
person_image | object | Attach the person image from ChatGPT for this input. |
scene_image | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for face swap photo |
name | string | Optional project name for identifying this output. Omit to use the API's default project name. |
replacement_faces | array | Attached image files. Set image_index in each matching entry to its position in this list, starting at 1. |
source_face | object | Attach the source face from ChatGPT for this input. |
target_image | object | Attach 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…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the body and head images for head swap |
body_image | object | Attach the body image from ChatGPT for this input. |
head_image | object | Attach the head image from ChatGPT for this input. |
max_resolution | integer | Constrains 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… |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for background removal |
background_image | object | Attach the background image from ChatGPT for this input. |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for photo colorization |
image | object | Attach the image from ChatGPT for this input. |
name | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique 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…
| Parameter | Type | Description |
|---|---|---|
duration * | integer | Requested track duration in seconds, from 15 to 300. Determines credits charged. |
style * | object | Song description, vocal or instrumental choice, and optional custom lyrics. |
Idempotency-Key | string | A 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… |
name | string | Optional 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…
| Parameter | Type | Description |
|---|---|---|
style * | object | Text to speak in the supplied voice, with language and speech-speed options. |
Idempotency-Key | string | A 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… |
assets | object | Provide the assets for voice cloning. |
audio | object | Attach the audio from ChatGPT for this input. |
name | string | Optional 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…