Skip to main content
Glama

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. 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.Head Swap - dateTime
assetsNoProvide the body and head images for head swap
body_imageNoAttach the body image from ChatGPT for this input.
head_imageNoAttach the head image from ChatGPT for this input.
max_resolutionNoConstrains 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 maximum.

Output Schema

NameRequiredDescriptionDefault
idYesUnique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "anyOf": [
      +      {
      +        "required": [
      +          "head_image"
      +        ]
      +      },
      +      {
      +        "properties": {
      +          "assets": {
      +            "required": [
      +              "head_file_path"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "assets"
      +        ]
      +      }
      +    ]
      +  },
      +  {
      +    "anyOf": [
      +      {
      +        "required": [
      +          "body_image"
      +        ]
      +      },
      +      {
      +        "properties": {
      +          "assets": {
      +            "required": [
      +              "body_file_path"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "assets"
      +        ]
      +      }
      +    ]
      +  }
      +]
    • removedInput schema / properties / assets / required
      Removed value: -[
      -  "body_file_path",
      -  "head_file_path"
      -]
    • addedInput schema / properties / body_image
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Attach the body 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 / head_image
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Attach the head 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"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "assets"
      -]
  2. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"Give your image a custom name for easy identification."New value: +"Optional project name for identifying this output. Omit to use the API's default project name."
  3. Changed1 schema field changed
    • changedInput schema / properties / max_resolution / example
      Previous value: -1024New value: +512
  4. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses the cost (10 credits), the return handoff (project id for wait_for_image_project), per-account availability constraints where listed options may not combine, the possibility of plan-max clamping, and a recovery path when an attachment fails. That is exactly the operational context annotations cannot carry.

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?

It is front-loaded with the safety policy, then moves to operational facts, each covering a distinct concern: cost, follow-up tool, prerequisites, file field precedence, and failure recovery. A few lines lean generic (for example, the remark that account balance does not prove affordability), which costs it some density without derailing the read.

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 five-parameter generative tool with nested file objects, two input modes, credit cost, and an asynchronous follow-up, the description covers policy, cost, prerequisites, input selection, and recovery. Since an output schema exists, it does not need to explain return payloads, and it correctly points to the wait tool instead.

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 coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it tells the agent to prefer the named attachment fields (head_image/body_image) for ChatGPT files, which resolves the anyOf precedence the schema leaves unstated. It also frames max_resolution as constrained by account plan, reinforcing a rule the schema only partly states.

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: 'Swaps a head from a supplied image onto a supplied body image,' which tells an agent exactly what the operation produces. It does not explicitly distinguish itself from the sibling swap_face_in_photo, so the agent must infer the difference from the names alone.

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

Usage Guidelines4/5

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

It supplies real when-to-use context: consult get_account_info and current parameter constraints before choosing settings, then use wait_for_image_project with the returned project id, and ask the user rather than guess when file roles are unclear. It gives no explicit exclusion criteria against the sibling swap tools, so the guidance covers context but not alternatives.

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.