memeworld
Documentation

MCP

face_swap_meme

Needs a key

Put a photographed face into a still template.

Sends a face photo and a still template to an image model and returns the swapped image on a permanent URL. The photo goes to the model and is dropped — nothing about the face that was uploaded is written to storage.

It costs credits and takes several seconds, so it is the one tool worth confirming with the user before calling. Captions are added afterwards: the result comes back with an editor link that opens the swapped image under the template’s caption boxes.

Arguments

  • template — number | string, required. A still template. GIF templates cannot be swapped.
  • faceImage — string, required. The photo as base64, with or without a data:image/jpeg;base64, prefix. JPEG, PNG or WebP, up to 10 MB decoded.
  • direction — string, optional. Extra instructions for the model, up to 300 characters — “keep the glasses”, “make him smile”.

Returns

  • id — the swap’s id, for GET /api/v1/face-swap/{id}.
  • url, width, height — the swapped image.
  • creditsSpent and creditsLeft.
  • editorUrl — the result opened under that template’s caption boxes.

Example

{
  "name": "face_swap_meme",
  "arguments": {
    "template": "success-kid-77",
    "faceImage": "data:image/jpeg;base64,/9j/4AAQSk..."
  }
}

The structured result:

{
  "id": "f7c2a1e4",
  "url": "https://memeworld.afterlume.workers.dev/cdn/swaps/f7c2a1e4.png",
  "width": 1024,
  "height": 1024,
  "template": "Success Kid",
  "creditsSpent": 2,
  "creditsLeft": 8,
  "editorUrl": "https://memeworld.afterlume.workers.dev/meme/success-kid-77?swap=f7c2a1e4"
}

Notes

A swap that fails after the credits were taken refunds them, and the error says so. Running out returns INSUFFICIENT_CREDITS with the balance and what the call needed — see Credits.