Generate image and video memes on demand through the Memelord API with a set of ready-to-run helper scripts.
Setup
API key – export it once per shell (or drop it into .env).
bash
export MEMELORD_API_KEY="YOUR_KEY"
Executable scripts – the repo ships with chmod +x already applied. If you clone from somewhere that strips modes, just run:
bash
chmod +x scripts/*.sh
(Optional) create an outputs/ folder to keep downloaded memes tidy:
bash
mkdir -p /root/.openclaw/workspace/outputs
CLI Overview
Script
Endpoint
Purpose
scripts/ai-meme.sh
POST /api/v1/ai-meme
Generate fresh image memes
scripts/ai-meme-edit.sh
POST /api/v1/ai-meme/edit
Edit an existing image meme
scripts/ai-video-meme.sh
POST /api/v1/ai-video-meme
Kick off async video meme renders
scripts/ai-video-meme-edit.sh
POST /api/v1/ai-video-meme/edit
Re-caption an existing video meme
scripts/video-render-remote.sh
GET /api/video/render/remote
Poll render job status / URLs
scripts/verify-webhook.sh
helper
Validate webhook signatures
All scripts accept --out <path> so you can control where JSON responses land.
1. Generate image memes (1 credit)
bash
./scripts/ai-meme.sh "developer fixing bugs at 3am" --png ./outputs/meme.png
./scripts/ai-meme.sh "when the code works on the first try" --count 3 --png ./outputs/meme_%d.png
2. Edit an image meme (1 credit)
bash
./scripts/ai-meme-edit.sh --from ./memelord_ai_meme.json \
--instruction "make it about javascript instead" --png ./outputs/edited.png
# or supply template metadata manually
./scripts/ai-meme-edit.sh --template-id abc-123 --template-data-file ./template_data.json \
--instruction "change the top text" --out ./outputs/edit.json
3. Generate video memes (5 credits, async)
bash
./scripts/ai-video-meme.sh "when the code works on the first try" --count 2 --out ./outputs/jobs.json
# with webhook callbacks
./scripts/ai-video-meme.sh "ship it" \
--webhook-url https://example.com/webhook \
--webhook-secret supersecret
4. Edit a video meme caption (5 credits, async)
bash
./scripts/ai-video-meme-edit.sh --template-id abc-123 \
--caption "When the code works on the first try" \
--instruction "make it about not knowing why it works" \
--out ./outputs/video_edit_job.json