MagicMemeCreate

face_swap_meme

face_swap_meme

face_swap_meme starts a face swap. What happens next depends on settlement.

  • agentic: returns a paymentLink. POST it. First response is HTTP 402 (MPP). Retry with a Shared Payment Token plus consentAttested and the face image. $0.50. We generate with our OpenRouter key.
  • credits: returns login and pricing URLs. The human signs in, buys credits, then POST /api/ai/face-swap with a session cookie (10 credits, verified email).
  • local or omitted: generate now with this process's OPENROUTER_API_KEY. Requires referenceImageBase64. Dev / stdio only.

Call face_swap_meme with slug success-kid and settlement=agentic. Follow paymentLink. Do not generate locally.

Arguments

  • slug (string, required)
  • settlement: agentic | credits | local
  • referenceImageBase64: required for local
  • referenceMediaType: image/jpeg (default), image/png, or image/webp
  • prompt: optional edit instruction

Request (agentic)

{
  "slug": "success-kid",
  "settlement": "agentic"
}

Response (agentic / credits)

You get agentic.paymentLink, agentic.priceCents (50), agentic.networkId (Stripe profile id when set), plus credits.authorizeUrl, credits.pricingUrl, credits.httpApi, and credits.creditCost (10).

The face image is not on the query string. The agent POSTs it after 402 (or after the human has credits).

Browsers that open the payment link with Accept: text/html redirect to /pricing.

Response (local)

{
  "slug": "success-kid",
  "title": "Success Kid",
  "mimeType": "image/png",
  "imageBase64": "…",
  "model": "openai/gpt-image-2",
  "fallbackUsed": false
}

Production tries openai/gpt-image-2, then x-ai/grok-imagine-image-quality (for example Drake blocked by OpenAI safety).

Full handshake: Face swap & MPP. Studio: /tools/face-swap-meme.

What to explore next

Command Palette

Search for a command to run...