{"openapi":"3.1.0","info":{"title":"StableMemes","description":"Generate memes — caption templates, search 1M+, auto-caption, and AI memes.","version":"1.0.0","x-guidance":"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=...","guidance":"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=...","contact":{"name":"Merit Systems","url":"https://stablememes.dev"}},"servers":[{"url":"https://stablememes.dev"}],"tags":[{"name":"Ai_meme"},{"name":"Automeme"},{"name":"Caption"},{"name":"Caption_gif"},{"name":"Get_meme"},{"name":"Memelord"},{"name":"Search"},{"name":"Templates"}],"paths":{"/api/caption_gif":{"post":{"operationId":"caption_gif","summary":"Caption an Imgflip animated GIF template. Only the boxes format is supported. Returns a public url to the generated GIF. Costs $0.01 with watermark (default), or $0.02 with watermark=false.","tags":["Caption_gif"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1},"boxes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"color":{"type":"string"},"outline_color":{"type":"string"}},"required":["text"]}},"font":{"type":"string"},"max_font_size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"watermark":{"default":true,"type":"boolean"}},"required":["template_id","boxes"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_url":{"type":"string"}},"required":["url","page_url"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/caption":{"post":{"operationId":"caption","summary":"Caption an Imgflip image template with text0/text1 or a boxes array. Returns a public url to the generated meme. Costs $0.01 with the imgflip.com watermark (default), or $0.02 with watermark=false to remove it.","tags":["Caption"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1},"text0":{"type":"string"},"text1":{"type":"string"},"boxes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"x":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"y":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"color":{"type":"string"},"outline_color":{"type":"string"}},"required":["text"]}},"font":{"type":"string"},"max_font_size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"watermark":{"default":true,"type":"boolean"}},"required":["template_id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_url":{"type":"string"}},"required":["url","page_url"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/search":{"post":{"operationId":"search","summary":"Search all 1M+ Imgflip templates by name.","tags":["Search"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1},"type":{"default":"image","type":"string","enum":["image","gif","both"]},"include_nsfw":{"default":false,"type":"boolean"}},"required":["query"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"memes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"box_count":{"type":"number"},"captions":{"type":"number"}},"required":["id","name","url","width","height","box_count"],"additionalProperties":false}}},"required":["memes"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/get_meme":{"post":{"operationId":"get_meme","summary":"Fetch one Imgflip template by id.","tags":["Get_meme"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","minLength":1}},"required":["template_id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"meme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"box_count":{"type":"number"},"captions":{"type":"number"}},"required":["id","name","url","width","height","box_count"],"additionalProperties":false}},"required":["meme"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/automeme":{"post":{"operationId":"automeme","summary":"Auto-caption: picks one of the top 2,048 templates based on your text and captions it. Short phrases work best. Costs $0.01 with watermark (default), or $0.02 with watermark=false.","tags":["Automeme"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"watermark":{"default":true,"type":"boolean"}},"required":["text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_url":{"type":"string"}},"required":["url","page_url"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/ai_meme":{"post":{"operationId":"ai_meme","summary":"AI-generated Imgflip meme with optional prefix_text/template_id. Costs $0.01 with watermark or $0.02 with watermark=false.","tags":["Ai_meme"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"default":"openai","type":"string","enum":["openai","classic"]},"template_id":{"type":"string"},"prefix_text":{"type":"string","maxLength":64},"watermark":{"default":true,"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"page_url":{"type":"string"},"template_id":{"anyOf":[{"type":"string"},{"type":"number"}]},"texts":{"type":"array","items":{"type":"string"}}},"required":["url","page_url","template_id","texts"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/memelord/jobs":{"get":{"operationId":"memelord_jobs","summary":"List the caller's durable Memelord jobs across image and video operations. Use this to recover paid jobs if the original response was lost.","tags":["Memelord"],"security":[{"siwx":[]}],"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"items":{"type":"array","items":{"type":"object","properties":{"mediaType":{"type":"string","enum":["image","video"]},"jobId":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"success":{"type":"boolean"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiresIn":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateData":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"editSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","index","success","url","expiresIn","templateName","templateId","templateData","error","editSummary","createdAt","updatedAt"],"additionalProperties":false}},"renders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerJobId":{"type":"string"},"status":{"type":"string"},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"mp4Url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"storagePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"renderTimeMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"outputSizeMB":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","providerJobId","status","templateName","templateId","caption","mp4Url","storagePath","error","renderTimeMs","outputSizeMB","createdAt","updatedAt","completedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["mediaType","jobId","kind","status","progress","prompt","totalRequested","error","providerMessage","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["success","items","nextCursor"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}},"/api/templates":{"post":{"operationId":"templates","summary":"List the ~100 most popular Imgflip templates. Use the returned id as template_id for /api/caption, /api/caption_gif, or /api/get_meme.","tags":["Templates"],"security":[{"siwx":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"default":"image","type":"string","enum":["image","gif","both"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"memes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"box_count":{"type":"number"},"captions":{"type":"number"}},"required":["id","name","url","width","height","box_count"],"additionalProperties":false}}},"required":["memes"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}},"/api/memelord/ai_meme":{"post":{"operationId":"memelord_ai_meme","summary":"Create a durable Memelord image meme job. Defaults to 3 candidates for better selection. Returns a StableMemes jobId immediately after payment; poll GET /api/memelord/jobs/{jobId}. Costs $0.01 per requested meme.","tags":["Memelord"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.10"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"count":{"default":3,"type":"integer","minimum":1,"maximum":10},"clientRequestId":{"type":"string","minLength":1,"maxLength":128},"category":{"type":"string","enum":["trending","classic"]},"include_nsfw":{"default":true,"type":"boolean"},"caption_style":{"type":"string","enum":["top","tiktok","snapchat"]}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string"},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","jobId","status","pollUrl","totalRequested"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/memelord/ai_meme/edit":{"post":{"operationId":"memelord_ai_meme_edit","summary":"Create a durable Memelord image meme edit job using the original template_id and template_data. Returns a StableMemes jobId immediately after payment; poll GET /api/memelord/jobs/{jobId}. Costs $0.01 per edit.","tags":["Memelord"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","minLength":1,"maxLength":500},"template_id":{"type":"string","minLength":1},"template_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"clientRequestId":{"type":"string","minLength":1,"maxLength":128},"target_index":{"type":"integer","minimum":1,"maximum":9007199254740991},"caption_style":{"type":"string","enum":["top","tiktok","snapchat"]}},"required":["instruction","template_id","template_data"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string"},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","jobId","status","pollUrl","totalRequested"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/memelord/ai_video_meme":{"post":{"operationId":"memelord_ai_video_meme","summary":"Create a durable Memelord captioned video meme job. Defaults to top captions to avoid centered overlays. Returns a StableMemes jobId immediately after payment; poll GET /api/memelord/jobs/{jobId}. Costs $0.05 per requested video.","tags":["Memelord"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.25"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500},"count":{"default":1,"type":"integer","minimum":1,"maximum":5},"clientRequestId":{"type":"string","minLength":1,"maxLength":128},"webhookUrl":{"type":"string","format":"uri"},"webhookSecret":{"type":"string","minLength":1},"category":{"type":"string","enum":["trending","classic"]},"template_id":{"type":"string","minLength":1},"force_caption_style":{"default":"top","type":"string","enum":["top","tiktok"]}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string"},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","jobId","status","pollUrl","totalRequested"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/memelord/ai_video_meme/edit":{"post":{"operationId":"memelord_ai_video_meme_edit","summary":"Create a durable Memelord video caption edit job. Defaults to top captions to avoid centered overlays. Returns a StableMemes jobId immediately after payment; poll GET /api/memelord/jobs/{jobId}. Costs $0.05 per edit.","tags":["Memelord"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0","max":"0.05"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","minLength":1,"maxLength":500},"template_id":{"type":"string","minLength":1},"caption":{"type":"string","minLength":1},"clientRequestId":{"type":"string","minLength":1,"maxLength":128},"audio_overlay_url":{"type":"string","format":"uri"},"force_caption_style":{"default":"top","type":"string","enum":["top","tiktok"]},"webhookUrl":{"type":"string","format":"uri"}},"required":["instruction","template_id","caption"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"jobId":{"type":"string"},"status":{"type":"string"},"pollUrl":{"type":"string"},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","jobId","status","pollUrl","totalRequested"],"additionalProperties":false}}}},"402":{"description":"Payment Required"}}}},"/api/memelord/jobs/{jobId}":{"get":{"operationId":"memelord_jobs_status","summary":"Poll a durable Memelord job by jobId across image and video operations. Requires the same wallet that paid for the job.","tags":["Memelord"],"security":[{"siwx":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true},"mediaType":{"type":"string","enum":["image","video"]},"jobId":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"totalRequested":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"success":{"type":"boolean"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiresIn":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateData":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"editSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","index","success","url","expiresIn","templateName","templateId","templateData","error","editSummary","createdAt","updatedAt"],"additionalProperties":false}},"renders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerJobId":{"type":"string"},"status":{"type":"string"},"templateName":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"mp4Url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"storagePath":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"renderTimeMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"outputSizeMB":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","providerJobId","status","templateName","templateId","caption","mp4Url","storagePath","error","renderTimeMs","outputSizeMB","createdAt","updatedAt","completedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["success","mediaType","jobId","kind","status","progress","prompt","totalRequested","error","providerMessage","createdAt","updatedAt"],"additionalProperties":false}}}},"402":{"description":"Authentication Required"}}}}},"components":{"securitySchemes":{"siwx":{"type":"apiKey","in":"header","name":"SIGN-IN-WITH-X"}}}}