Install
openclaw skills install @artemiopadilla/memegenGenerate meme images using the memegen.link API. Use when the user asks to create, make, send, or generate a meme, funny image, reaction image, or similar request. Produces meme images via URL — no local image generation needed. Supports 100+ classic meme templates (Drake, Doge, Disaster Girl, Expanding Brain, etc.) and custom backgrounds.
openclaw skills install @artemiopadilla/memegenGenerate memes via the memegen.link public API + Imgflip trending templates. No API key required.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Template Source │────▶│ Caption Engine │────▶│ Renderer │
│ │ │ │ │ │
│ • Built-in IDs │ │ • Manual text │ │ • memegen │
│ • Imgflip API │ │ • Agent-picked │ │ .link │
│ • Custom URL │ │ │ │ • Pillow │
│ • Top 30 fallback│ │ │ │ (local) │
└─────────────────┘ └──────────────────┘ └─────────────┘
Memes are generated entirely via URL — no POST requests needed. Build the URL and download the image.
https://api.memegen.link/images/{template}/{top_text}/{bottom_text}.png
memegen.link returns HTTP 404 status but valid image body — many HTTP clients reject 404 URLs.
Always download first, then verify:
curl -s -o /tmp/meme.png "https://api.memegen.link/images/drake/top/bottom.png"
file /tmp/meme.png # Should say "PNG image data"
ls -la /tmp/meme.png # Should be >10KB for a real meme
If the file is empty or <1KB, the template ID is probably wrong.
| Character | Encoding | Example |
|---|---|---|
| Space | _ | hello_world |
? | ~q | why~q |
/ | ~s | yes~sno |
# | ~h | tag~h1 |
% | ~p | 100~p |
" | '' | he_said_''hi'' |
_ (literal) | __ | double__underscore |
| Newline | ~n | line1~nline2 |
| Blank line | _ | Top only: /top_text/_ |
| Param | Type | Description |
|---|---|---|
background | URL | Custom background image URL |
width | int | Scale to width (px), use 800 for larger |
height | int | Scale to height (px) |
font | string | Font name (see /api/fonts) |
layout | string | default or top (text positioning) |
color | string | Text color: HTML name or hex (FF80ED) |
Prefer variety over repetition. Before picking a template:
This skill includes a humor profile system — an equalizer for meme tone, darkness, and cultural targeting. See humor-profiles.md for the full reference.
| Slider | Default | Range |
|---|---|---|
| Darkness | Level 2 (Light) | 1: Clean → 5: Nuclear ☢️ |
| Dank Meter | Normie-Dank | Normie → Dank → Deep Fried → Surreal → Shitpost |
| Style | Contextual (auto-detect) | Sarcasm · Absurdist · Self-deprecating · Deadpan · Wholesome · Roast · Meta · Shitpost |
| Geo | Neutral | 🇲🇽 MX · 🇦🇷 AR · 🇪🇸 ES · 🇺🇸 US · 🇧🇷 BR · 🇨🇴 CO · 🌎 LATAM |
Topic: "My code has bugs"
Level 1 + Wholesome + Normie:
Template: success | "Found a bug / Fixed it on first try"
Level 2 + Sarcasm + Dank:
Template: fry | "Not sure if my code works / Or the tests are just broken too"
Level 3 + Sarcasm + Dank:
Template: fine | "Production is on fire / This is fine, it's a feature"
Level 4 + Deadpan + Dank (🇲🇽):
Template: harold | "Cuando dices 'ya casi queda' y llevas 3 horas / Pero sonríes porque el deploy es mañana"
Level 5 + Shitpost + Deep Fried:
Template: custom deep-fried | "BRUH THE CODE 💀💀💀 / IT COMPILES THO 😤🔥💯"
Generate a meme about [topic].
Humor profile: Level 3, Dank, Sarcasm, 🇲🇽
Or let the agent auto-detect from context (language used, group chat culture, conversation tone).
For Level 5 / Deep Fried memes, use the included script:
python3 scripts/deep-fry.py meme.png fried.png --level 4 --emojis --flare
Requires: pip install pillow
For ALL 207 templates with rhetorical patterns and examples, see references/templates-complete.md For a quick-reference index, see references/template-index.md
Pick templates by rhetorical pattern first, then tone. Each entry includes:
drake — Drakeposting
pooh — Tuxedo Winnie the Pooh
db — Distracted Boyfriend
glasses — Peter Parker's Glasses
astronaut — Always Has Been
custom template as fallbackfry — Futurama Fry (Squinting)
morpheus — Matrix Morpheus
philosoraptor — Philosoraptor
keanu — Conspiracy Keanu
rollsafe — Roll Safe (Thinking)
gb — Galaxy Brain (Expanding Brain)
scc — Sudden Clarity Clarence
spongebob — Mocking SpongeBob
wonka — Condescending Wonka
kermit — But That's None of My Business
khaby-lame — Khaby Lame Shrug
fine — This is Fine (Dog in Fire)
harold — Hide the Pain Harold
slap — Will Smith Slapping Chris Rock
gru — Gru's Plan
chair — American Chopper Argument
success — Success Kid
stonks — Stonks (Meme Man)
handshake — Epic Handshake
same — They're The Same Picture (Corporate)
pigeon — Is This a Pigeon?
spiderman — Spider-Man Pointing
woman-cat — Woman Yelling at Cat
kombucha — Kombucha Girl
right — Anakin Padmé ("Right?")
cmm — Change My Mind
reveal — Scooby Doo Reveal (Unmasking)
Use this to identify the right template category before browsing individual templates:
| Pattern | Templates | When to Use |
|---|---|---|
| Binary comparison (A vs B) | Drake, Pooh, Distracted Boyfriend | Rejecting one thing for another |
| Escalation (progressively more extreme) | Galaxy Brain, Expanding Brain | Ideas getting increasingly absurd |
| Dramatic irony (plan backfires) | Gru's Plan, Anakin/Padme ("Right?") | Confident plan with obvious flaw |
| Denial / cope | This Is Fine, Harold | Pretending everything's okay |
| Obvious solution ignored | Khaby Lame, Roll Safe | The answer was simple all along |
| Mockery / sarcasm | Spongebob, Wonka, Kermit | Making fun of a take |
| Identity confusion | Spider-Man Pointing, Same Picture, Pigeon | Things that are the same or misidentified |
| Revelation / unmasking | Scooby Doo Reveal, Peter Parker Glasses | Discovering the truth behind something |
| Hot take / provocation | Change My Mind | Stating a controversial opinion |
| Shared agreement | Epic Handshake | Two sides finding common ground |
| Escalating argument | American Chopper | Multi-party conflict |
When you want the freshest templates (not just built-in IDs):
curl -s "https://api.imgflip.com/get_memes" | python3 -c "
import sys, json
memes = json.load(sys.stdin)['data']['memes'][:20]
for m in memes:
print(f\"{m['name']}: {m['url']}\")
"
Use with custom background:
https://api.memegen.link/images/custom/{top}/{bottom}.png?background={imgflip_url}&width=800
from urllib.parse import quote
bg = quote("https://i.imgflip.com/30b1gx.jpg", safe=":/")
url = f"https://api.memegen.link/images/custom/top/bottom.png?background={bg}&width=800"
For hardcoded fallback templates (when Imgflip is unreachable), see references/templates-classic.md.
For trending template sources (Reddit, Imgflip scraping, Giphy), see references/templates-trending.md.
When memegen.link is down or you need full control:
from PIL import Image, ImageDraw, ImageFont
from io import BytesIO
import textwrap, requests
def render_meme(image_url, top, bottom="", output="/tmp/meme.png"):
img = Image.open(BytesIO(requests.get(image_url).content)).convert("RGB")
draw = ImageDraw.Draw(img)
w, h = img.size
font_size = max(w // 12, 20)
try:
font = ImageFont.truetype("/usr/share/fonts/truetype/msttcorefonts/Impact.ttf", font_size)
except OSError:
font = ImageFont.load_default()
def draw_block(text, anchor="top"):
if not text: return
text = text.upper()
lines = textwrap.wrap(text, width=max(int((w * 0.9) / (font_size * 0.6)), 10))
line_h = [draw.textbbox((0,0), l, font=font)[3] - draw.textbbox((0,0), l, font=font)[1] for l in lines]
total = sum(line_h) + (len(lines)-1) * 4
y = 10 if anchor == "top" else h - total - 20
for i, line in enumerate(lines):
lw = draw.textbbox((0,0), line, font=font)[2]
draw.text(((w-lw)/2, y), line, font=font, fill="white",
stroke_width=3, stroke_fill="black")
y += line_h[i] + 4
draw_block(top, "top")
draw_block(bottom, "bottom")
img.save(output, quality=95)
return output
Requires: pip install pillow requests and optionally sudo apt install ttf-mscorefonts-installer for Impact font.
Common mistakes:
buzz-woody → does not exist, grey placeholderbuzz → "X, X Everywhere"disaster-girl → wrongds → Disaster Girlchange-my-mind → wrongcmm → Change My MindWhen unsure, fetch https://api.memegen.link/templates/{id} to verify.
These render text-only on grey striped background (no image):
simply — "One Does Not Simply" — background doesn't loadalways — "Always Has Been" — background doesn't loadpanik — "Panik Kalm Panik" — 3-panel doesn't renderWorkaround: Use the Imgflip URL from the fallback list with custom template instead.
~i~text~i~ — renders literally~n (newline), ~q (?), ~a (&), ~h (#), ~s (/)?width=800 for larger imagescustom template + ?background=<url>custom as workaroundtime.sleep(0.5) between batch requests — be polite to memegen.linkFor the full template list and special characters reference, see references/api.md.