An API to programmatically generate memes based solely on requested URLs.

Build Status Coverage Status Swagger Validator License GitHub Sponsors


The API is stateless so URLs contain all the information necessary to generate meme images. For example, produces:

Example Image

Available Formats

Clients can request .jpg instead of .png for smaller files:

Format Example
PNG /images/ds/small_file/high_quality.png
JPEG /images/ds/high_quality/small_file.jpg

Custom Dimensions

Images can be scaled to a specific width via ?width=<int> or a specific height via ?height=<int>. If both parameters are provided (?width=<int>&height=<int>), the image will be padded to the exact dimensions.

For example, produces:

Custom Size

Special Characters

In URLs, spaces can be inserted using underscores or dashes:

  • underscore (_) → space ()
  • dash (-) → space ()
  • 2 underscores (__) → underscore (_)
  • 2 dashes (--) → dash (-)
  • tilde + N (~n) → newline character

Reserved URL characters can be included using escape patterns:

  • tilde + Q (~q) → question mark (?)
  • tilde + A (~a) → ampersand (&)
  • tilde + P (~p) → percentage (%)
  • tilde + H (~h) → hashtag/pound (#)
  • tilde + S (~s) → slash (/)
  • tilde + B (~b) → backslash (\)
  • 2 single quotes ('') → double quote (")

For example, produces:

Escaped Characters


The list of predefined meme templates is available here:

Alternate Styles

Some memes come in multiple forms, which can be selected via ?style=<style>.

For example, the template provides these styles:

/images/ds.png /images/ds.png?style=maga
Default Style Alternate Style

Custom Backgrounds

You can also use your own image URL as the background. For example, produces:

Custom Background


If your client is going to show live previews of a custom meme, please use the /images/preview.jpg endpoint, which accepts URL-encoded parameters and returns smaller images to minimize bandwidth. For example:

var key = encodeURIComponent($("#template").val())
var line_1 = encodeURIComponent($("#line_1").val()) || " "
var line_2 = encodeURIComponent($("#line_2").val()) || " "

var api = ""
var url = `${api}?template=${key}&lines[]=${line_1}&lines[]=${line_2}`

$("#preview").attr("src", url)

The template parameter can be a template key or URL:

Mode Example
Template Key /images/preview.jpg?lines[]=first+line&lines[]=second+line&template=fry
Template URL /images/preview.jpg?lines[]=first+line&lines[]=second+line&template=
Custom Background /images/preview.jpg?lines[]=first+line&lines[]=second+line&template=


The full interactive documentation is available here:

Here are some sample clients to explore:

Platforms Link
Slack Python: nicolewhite/slack-meme
Slack Go: CptSpaceToaster/slackbot
Hain JavaScript: Metrakit/hain-plugin-meme
Web Clojure: jasich/mighty-fine-memes
Web & Slack
Discord JavaScript: parshsee/discordbot

Additional clients can be found by searching for code examples on GitHub.