Skip to main content
Glama

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. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable. 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.

Input Schema

NameRequiredDescriptionDefault
nameNoOptional project name for identifying this output. Omit to use the API's default project name.Character Replace - dateTime
modelNoModel 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 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected. * **`kling-4.0`**: 720p, 1080p. Clips of 3–30 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected. * **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–60 seconds in `animate` mode or 1–30 seconds in `replace` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored.wan-animate
styleNoOptional style controls for replace vs animate mode and subject selection.
videoNoAttach the video from ChatGPT for this input.
assetsNoSource video and reference character image for the job.
resolutionNoOutput video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model.
end_secondsYesEnd 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. When the user gave no duration, choose one within it. Keep an explicitly requested longer one, explain the Free limit and ask before changing it. Do not default to the source video's full length.
start_secondsNoStart time of your clip (seconds). Must be ≥ 0.
character_imageNoAttach the character image from ChatGPT for this input.

Output Schema

NameRequiredDescriptionDefault
idYesUnique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. Defaults to `wan-animate`.\n\n* **`wan-animate`**: 480p, 720p. Supports `points` subject selection.\n* **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.\n* **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–30 seconds in `replace` mode or 1–60 seconds in `animate` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored."New value: +"Model to use. Defaults to `wan-animate`.\n\n* **`wan-animate`**: 480p, 720p. Supports `points` subject selection.\n* **`kling-3.0`**: 720p, 1080p. Clips of 3–30 seconds in `animate` mode or 3–10 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected.\n* **`kling-4.0`**: 720p, 1080p. Clips of 3–30 seconds in `replace` mode. Picks the main person automatically, so `points` are rejected.\n* **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–60 seconds in `animate` mode or 1–30 seconds in `replace` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "wan-animate",
      -  "kling-3.0",
      -  "minimax-h3"
      -]New value: +[
      +  "wan-animate",
      +  "kling-3.0",
      +  "kling-4.0",
      +  "minimax-h3"
      +]
    • changedInput schema / properties / style / properties / prompt / description
      Previous value: -"Optional direction. Supported by kling-3.0, minimax-h3. For MiniMax H3 in replace mode, ignored and not saved when `selection_mode` is `point`; applies only to automatic person selection."New value: +"Optional direction. Supported by kling-3.0, kling-4.0, minimax-h3. For MiniMax H3 in replace mode, ignored and not saved when `selection_mode` is `point`; applies only to automatic person selection."
  2. Changed4 schema fields changed
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. Defaults to `wan-animate`.\n\n* **`wan-animate`**: 480p, 720p. Supports `points` subject selection.\n* **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.\n* **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–60 seconds in `replace` mode or 1–60 seconds in `animate` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored."New value: +"Model to use. Defaults to `wan-animate`.\n\n* **`wan-animate`**: 480p, 720p. Supports `points` subject selection.\n* **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected.\n* **`minimax-h3`**: 480p, 720p, 1080p. Clips of 1–30 seconds in `replace` mode or 1–60 seconds in `animate` mode. Subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored."
    • changedInput schema / properties / style / properties / points / description
      Previous value: -"On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted. Rejected for models without subject selection (supported by `wan-animate`, `minimax-h3`). `minimax-h3` subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored."New value: +"On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted. Rejected for models without subject selection (supported by `wan-animate`, `minimax-h3`). `minimax-h3` subject `points` are `replace`-only; `animate` with `selection_mode` `point` returns 422, and with `auto` or no `selection_mode` the points are ignored. MiniMax H3 manual replacement accepts 1 to 10 points; each must satisfy `start_seconds <= time_seconds < end_seconds`."
    • changedInput schema / properties / style / properties / points / items / properties / time_seconds / description
      Previous value: -"Timestamp on the source video timeline in seconds. Uses the same clock as `start_seconds` and `end_seconds`."New value: +"Timestamp on the source video timeline in seconds. Uses the same clock as `start_seconds` and `end_seconds`. For MiniMax H3 manual replacement, `start_seconds <= time_seconds < end_seconds`."
    • changedInput schema / properties / style / properties / prompt / description
      Previous value: -"Optional direction. Supported by kling-3.0, minimax-h3."New value: +"Optional direction. Supported by kling-3.0, minimax-h3. For MiniMax H3 in replace mode, ignored and not saved when `selection_mode` is `point`; applies only to automatic person selection."
  3. Changed1 schema field changed
    • changedInput schema / properties / end_seconds / description
      Previous value: -"End time of your clip (seconds). Must be greater than start_seconds."New value: +"End time of your clip (seconds). Must be greater than start_seconds.\n\nFree plans are currently limited to 10 seconds of clip (`end_seconds` minus `start_seconds`), enforced by the API and may change. When the user gave no duration, choose one within it. Keep an explicitly requested longer one, explain the Free limit and ask before changing it. Do not default to the source video's full length."
  4. Changed5 schema fields changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "anyOf": [
      +      {
      +        "required": [
      +          "character_image"
      +        ]
      +      },
      +      {
      +        "properties": {
      +          "assets": {
      +            "required": [
      +              "image_file_path"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "assets"
      +        ]
      +      }
      +    ]
      +  },
      +  {
      +    "anyOf": [
      +      {
      +        "required": [
      +          "video"
      +        ]
      +      },
      +      {
      +        "properties": {
      +          "assets": {
      +            "required": [
      +              "video_file_path"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "assets"
      +        ]
      +      }
      +    ]
      +  }
      +]
    • removedInput schema / properties / assets / required
      Removed value: -[
      -  "video_file_path",
      -  "image_file_path"
      -]
    • addedInput schema / properties / character_image
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Attach the character image from ChatGPT for this input.",
      +  "properties": {
      +    "download_url": {
      +      "description": "Exact HTTPS download URL supplied for the native ChatGPT attachment, including its signed query.",
      +      "title": "Download Url",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "description": "Native ChatGPT file identifier paired with download_url; not a local filesystem path.",
      +      "title": "File Id",
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "default": "",
      +      "description": "Original attachment filename, when supplied by ChatGPT.",
      +      "title": "File Name",
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "default": "",
      +      "description": "Attachment MIME type, when supplied by ChatGPT.",
      +      "title": "Mime Type",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "title": "ChatGPTFile",
      +  "type": "object"
      +}
    • addedInput schema / properties / video
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Attach the video from ChatGPT for this input.",
      +  "properties": {
      +    "download_url": {
      +      "description": "Exact HTTPS download URL supplied for the native ChatGPT attachment, including its signed query.",
      +      "title": "Download Url",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "description": "Native ChatGPT file identifier paired with download_url; not a local filesystem path.",
      +      "title": "File Id",
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "default": "",
      +      "description": "Original attachment filename, when supplied by ChatGPT.",
      +      "title": "File Name",
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "default": "",
      +      "description": "Attachment MIME type, when supplied by ChatGPT.",
      +      "title": "Mime Type",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "title": "ChatGPTFile",
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "end_seconds",
      -  "assets"
      -]New value: +[
      +  "end_seconds"
      +]
  5. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"Give your video a custom name for easy identification."New value: +"Optional project name for identifying this output. Omit to use the API's default project name."
  6. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, and openWorldHint=true. The description adds materially: it is an async background job, it costs credits, availability of model/resolution/duration combinations is account-dependent, and account balance alone does not prove affordability. That is exactly the cost and side-effect context the annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Most sentences carry distinct, non-redundant information, and the operational instructions are terse. The weakness is ordering: the safety/policy preamble comes before the sentence that says what the tool actually does, so the purpose is not front-loaded, and the policy block competes with the functional summary for the opening position.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, nested-object, credit-consuming job tool with an output schema, the description covers the full lifecycle: authorization constraints, account check before setting selection, job submission, cost caveat, and handoff to wait_for_video_project. Return values are covered by the output schema, so nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 and the schema already documents models, modes, points, and clip bounds. The description still adds handling semantics the schema does not: use the named ChatGPT attachment fields first, ask which file goes where when roles are unclear, and ask the user to re-attach a file that fails. Those are cross-parameter disambiguation rules for video vs character_image, which raises it above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource plus both operating modes: 'Replaces a subject in a video with a character from a reference image, or transfers the video's motion onto that character.' That is far more informative than the title alone. It does not, however, distinguish this tool from adjacent siblings such as swap_face_in_video, so the agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states explicit exclusions ('Do not use for impersonation, deception, sexual content, or content involving minors') and names the downstream/upstream siblings in order: read get_account_info before choosing settings, then use the returned project id with wait_for_video_project. It also instructs how to behave when requirements cannot be met ('explain a genuine block instead of submitting an incompatible request'), which is real routing guidance, not implied usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.