• Stars
    star
    1,313
  • Rank 35,829 (Top 0.8 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The free and open source API to generate memes.

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

Build Status Coverage Status Swagger Validator License GitHub Sponsors

Buy me a coffee to help keep this service running!


Images

The API is stateless so URLs contain all the information necessary to generate meme images. For example, https://api.memegen.link/images/buzz/memes/memes_everywhere.gif produces:

Example Image

Available Formats

Clients can request .jpg instead of .png for smaller files. The .gif and .webp extensions can be used if an animated background is available or to animate text on static backgrounds:

Format Example
PNG /images/ds/small_file/high_quality.png
JPEG /images/ds/high_quality/small_file.jpg
GIF (animated background) /images/oprah/you_get/animated_text.gif
GIF (static background) /images/iw/animates_text/in_production.gif
WebP (animated background) /images/oprah/you_get/animated_text.webp
WebP (static background) /images/iw/animates_text/in_production.webp

Custom Dimensions

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

For example, https://api.memegen.link/images/both/width_or_height/why_not_both~q.png?height=450&width=800 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 (\)
  • tilde + L (~l) → less-than sign (<)
  • tilde + G (~g) → greater-than sign (>)
  • 2 single quotes ('') → double quote (")

For example, https://api.memegen.link/images/ugandanknuck/~hspecial_characters~q/underscore__-dash--.png produces:

Escaped Characters

All of the POST endpoints will return image URLs with special characters replaced with these alternatives.

Templates

The list of predefined meme templates is available here: https://api.memegen.link/templates/

Alternate Styles

Some memes come in multiple forms, which can be selected using the style=<str> query parameter.

For example, the https://api.memegen.link/templates/ds/ template provides these styles:

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

Custom Overlays

The style=<str> query parameter can also be an image URL to overlay on the default background image.

For example, https://api.memegen.link/images/pigeon/Engineer/_/Is_this_Photoshop~q.png?style=https://i.imgur.com/W0NXFpQ.png produces:

Custom Overlay

The overlay image can be customized with the following additional query parameters:

Name Type Description
center <float>,<float> Position of overlay relative to the top-left corner
scale <float> Ratio of the background image's dimensions

Custom Backgrounds

You can also use your own image URL as the background.

For example, https://api.memegen.link/images/custom/_/my_background.png?background=http://www.gstatic.com/webp/gallery/1.png produces:

Custom Background

This can be combined with custom overlays to augment the background image.

Layouts

Add the layout=<str> query parameter to switch between the default and top text positioning.

For example, https://api.memegen.link/images/rollsafe/When_you_have_a_really_good_idea.gif?layout=top produces:

Top Layout

Fonts

The list of fonts is available here: https://api.memegen.link/fonts/

Add the font=<str> query parameter to customize the look of your meme:

Name ID Alias
Titillium Web Black font=titilliumweb font=thick
Kalam Regular font=kalam font=comic
Impact font=impact -
Noto Sans Bold font=notosans -

Explore the full API here: https://api.memegen.link/docs/

More Repositories

1

template-python

My template for new Python libraries.
Python
656
star
2

datafiles

A file-based ORM for Python dataclasses.
Python
197
star
3

gitman

Language-agnostic dependency manager using Git.
Python
194
star
4

yorm

Automatic object-YAML mapping for Python.
Python
27
star
5

verchew

System dependency version checker.
Python
25
star
6

template-python-demo

Live demo of my Python template.
Python
23
star
7

minilog

Minimalistic wrapper for Python logging.
Python
19
star
8

mine

Share application state across computers using Dropbox.
Python
17
star
9

template-django

My template for new Django projects.
Python
10
star
10

sappy

Single-page application server for end-to-end testing.
Python
10
star
11

template-flask

My template for new Flask projects.
Python
9
star
12

env-diff

Compares expected environment variables to those set in production.
Python
6
star
13

virtualboombox

Discover music playing nearby.
Python
6
star
14

dropthebeat

Music sharing using Dropbox.
Python
6
star
15

pomace

Dynamic page objects for browser automation.
Python
5
star
16

pytest-expecter

Better testing with expecter and pytest.
Python
5
star
17

battleship

Simulatation of a Battleship AI using random sampling.
Python
4
star
18

pomace-amazon

Reload your Amazon balance automatically.
Python
4
star
19

slackoff

Automatically sign out of Slack workspaces on macOS.
Python
3
star
20

coverage-space

A place to track your code coverage metrics.
Python
2
star
21

dotfiles

My shared dotfiles repository.
Shell
2
star
22

grwifi

Map of WiFi access points in Grand Rapids, Michigan.
HTML
2
star
23

gridcommand

Grid-based clone of Same Time Risk.
Python
2
star
24

memegen-flask

Flask app formerly powering https://memegen.link
Python
2
star
25

template-ruby

A template for new Ruby projects.
Python
1
star
26

crowdsorter

Crowdsource your decision making.
Python
1
star
27

enharmony

[TBD] Song matching based on textual comparison of attributes.
Python
1
star
28

mctweetyface

A Twitter bot to help name things.
Makefile
1
star
29

template-django-demo

A live demo of my Django template.
Python
1
star
30

jacebrowning.info

My personal website and blog.
CSS
1
star