Give a Hermes agent a server-side Memelord API key and it can generate image memes, start async video meme renders, deliver completed MP4s, and handle follow-up edits from any gateway your Hermes is connected to.
Copy the relevant Hermes x Memelord setup notes, curl examples, and tool shapes into your coding agent.
MEMELORD_API_KEY. Your key should start with mlord_live_.The user asks Hermes for a meme in a normal messaging app. No form, dashboard, or manual template selection is required.
Hermes turns the request into a Memelord API call, keeps the API key server-side, and can remember the previous meme for follow-up edits.
Memelord returns a hosted image URL immediately for image memes. Video memes return render job IDs first; Hermes can deliver the finished MP4 after webhook delivery or polling completes.
Hermes Gateway connects the same agent brain to multiple surfaces. The integration pattern stays the same no matter which gateway receives the message:
Any connected Hermes gateway → Hermes Gateway → Hermes Memelord tool → POST https://www.memelord.com/api/v1/ai-meme → Hosted image URL immediately For video memes: Any connected Hermes gateway → Hermes Gateway → Hermes Memelord tool → POST https://www.memelord.com/api/v1/ai-video-meme → Render job ID now → Webhook or polling delivers the finished MP4 URL → Hermes replies in the original chat
For a private agent, pair only your own chat account. For a public demo bot, run a separate Hermes profile with only the tools and API credits you want that bot to use.
Hermes should use a server-side Memelord API key. Create the key once, put it in the environment used by your Hermes Gateway process, and keep it out of chat messages.
# Find the Hermes .env file hermes config env-path # Add your Memelord key there MEMELORD_API_KEY=mlord_live_YOUR_API_KEY # Restart the gateway/profile if Hermes is already running in chat hermes gateway restart
Before building a Hermes tool, test the same key directly with curl:
curl -X POST https://www.memelord.com/api/v1/ai-meme \
-H "Authorization: Bearer $MEMELORD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "founders debugging webhooks at 2am",
"count": 1,
"category": "trending",
"caption_style": "top"
}'Video memes are asynchronous. Use a webhook for production, or poll the job ID while prototyping:
curl -X POST https://www.memelord.com/api/v1/ai-video-meme \
-H "Authorization: Bearer $MEMELORD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "shipping the demo five minutes before the meeting",
"count": 1,
"force_caption_style": "tiktok"
}'
curl "https://www.memelord.com/api/video/render/remote?jobId=YOUR_JOB_ID" \
-H "Authorization: Bearer $MEMELORD_API_KEY"For production video renders, pass a webhookUrl and a webhookSecret. Memelord signs webhook bodies with an HMAC-SHA256 signature in the X-Webhook-Signature header; verify it before posting the MP4 back into chat.
{
"jobId": "render-1740524400000-abc12",
"success": true,
"mp4Url": "https://...signed-url...",
"templateName": "Surprised Pikachu Video",
"templateId": "abc-123",
"caption": "When the demo finally ships",
"stats": { "renderTimeMs": 12340, "outputSizeMB": "2.34" }
}Store the originating platform and chat ID with each render job so Hermes knows where to deliver the completed MP4. Also store meme metadata — not just signed URLs. Image URLs include an expires_in value and currently expire after 24 hours; MP4 URLs should also be treated as temporary.
Budget guardrails matter for public bots: image generation and image edits cost 1 credit each. Video generation and video edits cost 5 credits each. The count parameter multiplies the cost. Polling render status is status-only and should not spend credits.
Once curl works, wrap each endpoint as a Hermes tool. That gives the model typed actions it can call from any chat surface instead of making the user remember API routes. These are suggested custom Hermes tool names; if you connect the hosted Memelord MCP server instead, the tools are named generate_meme, edit_meme, generate_video_meme, edit_video_meme, and check_video_status.
| Hermes tool | Memelord endpoint | Use case |
|---|---|---|
| memelord_generate_meme | POST /api/v1/ai-meme | Prompt to finished image meme |
| memelord_edit_meme | POST /api/v1/ai-meme/edit | Follow-up edits like “make it more savage” |
| memelord_generate_video_meme | POST /api/v1/ai-video-meme | Start async MP4 render jobs |
| memelord_edit_video_meme | POST /api/v1/ai-video-meme/edit | Follow-up video caption edits |
| memelord_check_video_status | GET /api/video/render/remote?jobId=... | Poll until the MP4 URL is ready |
// tools/memelord.py
// Store MEMELORD_API_KEY in the Hermes .env file, not in chat.
memelord_generate_meme(prompt, count=1, category=None, include_nsfw=True, caption_style=None)
→ POST /api/v1/ai-meme
→ return { url, expires_in, template_id, template_data, template_name }
memelord_edit_meme(instruction, template_id, template_data, target_index=None, caption_style=None)
→ POST /api/v1/ai-meme/edit
→ return updated meme URL and updated template_data
memelord_generate_video_meme(prompt, count=1, category=None, template_id=None, force_caption_style=None, webhookUrl=None, webhookSecret=None)
→ POST /api/v1/ai-video-meme
→ return render job IDs
memelord_edit_video_meme(instruction, template_id, caption, force_caption_style=None, webhookUrl=None, webhookSecret=None)
→ POST /api/v1/ai-video-meme/edit
→ return render job ID for the edited caption
memelord_check_video_status(jobId)
→ GET /api/video/render/remote?jobId=jobId
→ return ready MP4 URL when completeThe agent experience gets better when Hermes stores lightweight chat state: last image meme metadata for edits, last video job ID for polling, and the originating platform chat ID so finished videos can be delivered back to the right conversation.
