{"version":1,"resources":["https://stablememes.dev/api/automeme","https://stablememes.dev/api/templates","https://stablememes.dev/api/caption","https://stablememes.dev/api/caption_gif","https://stablememes.dev/api/search","https://stablememes.dev/api/get_meme","https://stablememes.dev/api/ai_meme","https://stablememes.dev/api/memelord/ai_meme","https://stablememes.dev/api/memelord/ai_meme/edit","https://stablememes.dev/api/memelord/ai_video_meme","https://stablememes.dev/api/memelord/ai_video_meme/edit","https://stablememes.dev/api/memelord/jobs","https://stablememes.dev/api/memelord/jobs/{jobId}"],"description":"Generate memes — caption templates, search 1M+, auto-caption, and AI memes.","instructions":"StableMemes generates image/GIF memes with Imgflip and AI image/video memes with Memelord. Imgflip and Memelord use separate route namespaces.\n\n## Flow\n\nPaid endpoints use x402 on Base. Imgflip image/GIF generation costs $0.01 with watermark or $0.02 with watermark=false. Memelord image memes cost $0.01 each; Memelord video memes cost $0.05 each.\n\n1. POST /api/templates — List the ~100 most popular templates (SIWX, free). Use when you need a template_id.\n2. POST /api/search — Search all 1M+ templates by name.\n3. POST /api/caption — Caption an image template with text. Returns url + page_url.\n4. POST /api/caption_gif — Caption an animated GIF template.\n5. POST /api/automeme — Imgflip picks a template from your phrase and captions it.\n6. POST /api/ai_meme — Imgflip AI meme generation.\n7. POST /api/get_meme — Fetch one template's metadata by id.\n8. POST /api/memelord/ai_meme — Start a durable Memelord image meme job.\n9. POST /api/memelord/ai_meme/edit — Start a durable Memelord image meme edit job.\n10. POST /api/memelord/ai_video_meme — Start a durable Memelord captioned video meme job.\n11. POST /api/memelord/ai_video_meme/edit — Start a durable Memelord video caption edit job.\n12. GET /api/memelord/jobs/{jobId} — Poll any durable Memelord image or video job with SIWX.\n13. GET /api/memelord/jobs — List your recent durable Memelord jobs with SIWX.\n\n## Imgflip\n\nPOST /api/templates\nBody: { \"type\": \"image\" | \"gif\" | \"both\" }  (default \"image\")\n\nPOST /api/caption\nBody: { \"template_id\": \"61579\", \"text0\": \"top text\", \"text1\": \"bottom text\", \"font\"?: \"impact\" | \"arial\" | google-font-name, \"max_font_size\"?: 50, \"watermark\"?: true }\nOr use boxes for memes with >2 text slots:\nBody: { \"template_id\": \"...\", \"boxes\": [{ \"text\": \"...\", \"x\"?: 10, \"y\"?: 10, \"width\"?: 548, \"height\"?: 100, \"color\"?: \"#ffffff\", \"outline_color\"?: \"#000000\" }, ...] }\nReturns: { url, page_url }\n\nPOST /api/caption_gif\nSame as /api/caption, but template_id must be a GIF template and only boxes are supported.\n\nPOST /api/automeme\nBody: { \"text\": \"nobody got time for reading long API docs\", \"watermark\"?: true }\n\nPOST /api/search\nBody: { \"query\": \"drake\", \"type\"?: \"image\" | \"gif\" | \"both\", \"include_nsfw\"?: false }\n\nPOST /api/get_meme\nBody: { \"template_id\": \"61579\" }\n\nPOST /api/ai_meme\nBody: { \"model\"?: \"openai\" | \"classic\", \"template_id\"?: \"61579\", \"prefix_text\"?: \"topic\", \"watermark\"?: true }\nReturns: { url, page_url, template_id, texts }\n\n## Memelord\n\nUse Memelord when you want prompt-only AI image memes, caption-style renders, image text edits, or video memes.\n\nFor funnier Memelord results, generate multiple candidates and edit the best one. Be concrete: name the audience, situation, contradiction, and emotional stance. Prefer prompts like \"startup founder says revenue is optional while the database bill triples overnight\" over generic prompts like \"funny startup meme\". Use category \"trending\" for current-feeling internet formats and \"classic\" for evergreen templates.\n\nAll Memelord generation and edit routes are durable jobs. The POST returns jobId and pollUrl immediately after payment; poll GET /api/memelord/jobs/{jobId} until status is \"completed\" or \"failed\". Use clientRequestId for idempotent retries after client timeouts.\n\nDefault image generation returns 3 candidates so you can pick the funniest. If one candidate is close, use /api/memelord/ai_meme/edit with a targeted instruction instead of blindly regenerating. Do not pass caption_style unless you specifically want caption-only image output.\n\nFor video memes, captions default to force_caption_style \"top\" to avoid centered overlays. Only pass \"tiktok\" when the user explicitly asks for centered vertical social-video captions.\n\nPOST /api/memelord/ai_meme\nBody: { \"prompt\": \"developer fixing bugs at 3am\", \"count\"?: 3, \"clientRequestId\"?: \"stable-idempotency-key\", \"category\"?: \"trending\" | \"classic\", \"include_nsfw\"?: true, \"caption_style\"?: \"top\" | \"tiktok\" | \"snapchat\" }\nReturns immediately: { success: true, jobId, status, pollUrl, totalRequested }\n\nPOST /api/memelord/ai_meme/edit\nBody: { \"instruction\": \"make it about TypeScript\", \"template_id\": \"abc-123\", \"template_data\": { ... }, \"clientRequestId\"?: \"stable-idempotency-key\", \"target_index\"?: 1, \"caption_style\"?: \"top\" | \"tiktok\" | \"snapchat\" }\nReturns immediately: { success: true, jobId, status, pollUrl, totalRequested }\n\nPoll the durable image job:\nGET /api/memelord/jobs/{jobId}\nReturns: { success: true, jobId, kind, status, progress, prompt, totalRequested, error, providerMessage, results: [{ success, url, expiresIn, templateName, templateId, templateData, error, editSummary }] }\n\nPOST /api/memelord/ai_video_meme\nBody: { \"prompt\": \"when deploy works first try\", \"count\"?: 1, \"clientRequestId\"?: \"stable-idempotency-key\", \"webhookUrl\"?: \"https://...\", \"webhookSecret\"?: \"...\", \"category\"?: \"trending\" | \"classic\", \"template_id\"?: \"abc-123\", \"force_caption_style\"?: \"top\" | \"tiktok\" }\nReturns immediately: { success: true, jobId, status, pollUrl, totalRequested }\n\nPOST /api/memelord/ai_video_meme/edit\nBody: { \"instruction\": \"make the caption about prod\", \"template_id\": \"abc-123\", \"caption\": \"current caption\", \"clientRequestId\"?: \"stable-idempotency-key\", \"audio_overlay_url\"?: \"https://...\", \"force_caption_style\"?: \"top\" | \"tiktok\", \"webhookUrl\"?: \"https://...\" }\nReturns immediately: { success: true, jobId, status, pollUrl, totalRequested }\n\nPoll the durable job:\nGET /api/memelord/jobs/{jobId}\nReturns: { success: true, jobId, kind, status, progress, prompt, totalRequested, error, providerMessage, renders: [{ providerJobId, status, templateName, templateId, caption, mp4Url, error }] }\n\nList your durable Memelord jobs:\nGET /api/memelord/jobs?limit=20&cursor=..."}