canonical: https://jentic.com/apis/memegen.link/memegen

# Memegen.link

Memegen.link is a free and open-source meme generation API that turns named templates plus caption text into rendered images. The 19 endpoints expose template browsing, font listing, custom-image generation, automatic captioning of trending templates, and shortcuts for popular formats. Output URLs are themselves cacheable image links, which makes the API well suited to chatbots, social-publishing tools, and Slack-style integrations that need to produce shareable image assets in under a second.

## For AI agents

Generate meme images from named templates plus caption text, browse the template catalogue, and resolve fonts. Returns cacheable image URLs ready to share or embed.

## Scope

Does not generate AI imagery, animate frames, or host arbitrary user uploads - use for templated and custom-background meme image rendering only.

## Capabilities

- Render a meme image from a template ID and one or more caption lines via POST /images
- Browse the catalogue of meme templates with example captions and source links from /templates
- Generate a meme on a custom-uploaded background through `/images/custom`
- Auto-caption a trending template via `/images/automatic` when no caption is supplied
- List available fonts and retrieve a single font's preview through /fonts and `/fonts/{id}`
- Construct cacheable shareable image URLs that work in chat clients without auth

## Use cases

### Chat Bot Meme Generation

Slack and Discord bots integrate Memegen to let users type a slash command like /meme drake hates X loves Y and receive a rendered image inline. The POST /images endpoint accepts the template ID and caption array and returns a stable URL that the bot embeds in its response, completing the round trip in under a second.

Example prompt: Call POST /images with template_id=drake and text=['hates X','loves Y'], post the returned URL into the chat channel as an image attachment.

### Social Media Content Tooling

Social-publishing platforms use the /templates and /images endpoints to give marketers a quick visual response asset for trending news. Because each rendered image lives at a deterministic URL, drafts can be embedded in a scheduling tool and previewed without uploading binary attachments.

Example prompt: Browse /templates, pick the most relevant template for the news topic, call POST /images with the chosen template and caption, schedule the returned URL in the social tool.

### Custom Meme Generation

Brand-safety or in-house meme generators need to use their own backgrounds rather than the public catalogue. POST `/images/custom` accepts a custom background URL plus caption lines, which lets the brand keep visual control while still benefiting from Memegen's caption-rendering pipeline.

Example prompt: Call POST `/images/custom` with background_url=https://cdn.brand.com/asset.jpg and text=['headline','punchline'], return the rendered image URL.

### AI Agent Meme Replies

An AI assistant can detect when a humorous reply is appropriate, pick a template that matches the tone, and call Memegen through Jentic to render the image inline. Jentic exposes the templates and images endpoints as discoverable tools so the agent does not have to hardcode template IDs at build time.

Example prompt: Search Jentic for 'generate a meme', list templates, pick template_id='aag', execute POST /images with text=['suspicious','aliens'], return the image URL in the agent reply.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/templates` | List meme templates with example captions |
| POST | `/images` | Render a meme from a template ID and captions |
| POST | `/images/custom` | Render a meme on a custom background image |
| POST | `/images/automatic` | Auto-caption a trending template |
| GET | `/images/{template_id}/{text_filepath}` | GET-style meme rendering for shareable URLs |
| GET | `/fonts` | List available caption fonts |
| GET | `/fonts/{id}` | Get details for a specific font |

## Key resources

- **Templates** — Catalogue of named meme templates with example captions and metadata.
- **Images** — Endpoints to render captioned meme images, including custom backgrounds and automatic captioning.
- **Fonts** — List and inspect available caption fonts.
- **Shortcuts** — Convenience endpoints for popular templates with positional caption arguments.
- **Clients** — Auth and client metadata for partners using the API.

## Why Jentic

- **Setup:** Wiring Memegen.link by hand means sending its X-API-KEY header only where needed and hand-coding template listing, image rendering, and custom-background calls against api.memegen.link. Through Jentic you install once, import Memegen.link from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Memegen.link renders images from parameters in the request body (POST /images, `/images/custom`, `/images/automatic`), so scope the agent to the operations it needs, such as listing templates or generating a meme. You choose the operations it may call, so custom-background rendering is included only if you add it.
- **Credential handling:** Your Memegen.link X-API-KEY is stored once, encrypted, by your own Jentic One instance and injected only on requests that need it at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a meme' or 'list meme templates', and Jentic returns POST /images or GET /templates with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **GIPHY** — Animated GIF search rather than templated meme generation
- **Cloudinary Upload API** — General image transformation and CDN, not meme-specific
- **Pexels** — Free stock photos that can serve as custom meme backgrounds

## FAQ

### What authentication does the Memegen.link API use?

The spec declares an `X-API-KEY` header for authenticated endpoints (the ApiKeyAuth scheme), but most read and rendering endpoints are accessible without a key. Through Jentic, any required key is held in the encrypted vault and injected at request time.

### Can I generate a meme with my own background image with Memegen.link?

Yes. POST `/images/custom` accepts a custom background URL plus an array of caption lines and returns a rendered image URL, which is the supported path for brand-controlled meme assets.

### What are the rate limits for the Memegen.link API?

Memegen.link is community-funded and does not publish numeric rate limits in the spec. Production users should authenticate with an API key for higher quotas and consider self-hosting the open-source server for high-volume workloads.

### How do I generate a meme through Jentic?

Run `pip install jentic`, search for `generate a meme`, load POST /images, and execute with template_id and text array. Jentic returns the rendered image URL, which the agent can embed directly in its reply.

### Is the Memegen.link API free?

Yes - Memegen.link is free and open source under MIT. The hosted API is community-funded and best-effort; for production scale, the project recommends self-hosting the server from the public GitHub repository.

### Can I limit what my agent is allowed to do with the Memegen.link API?

Yes. Because you run Jentic One yourself, your own rules decide which Memegen.link operations and credentials the agent may use. You can allow just the operations it needs, such as listing templates with GET /templates or rendering a meme with POST /images, while withholding others like custom-background rendering via POST `/images/custom` or automatic captioning via POST `/images/automatic.` The agent can only call the operations you have granted it and never sees the underlying API key.
