Save a meme #
POST /v1/library
Saves a meme by its template and captions. Meme Lemur renders it, or reuses the render it already has, and keeps a copy of the image that belongs to the library. To save a meme that generate, match or render returned, send its templateId and captions.
| Field | Type | What it does |
|---|---|---|
templateId |
string | The template. Required. |
captions |
1 to 12 strings, each up to 500 characters | One caption for each box of the template. Required. A box with text it always says is saved with that text, whatever is sent for it. |
tags |
up to 50 strings, each up to 40 characters | Your own words to find the meme by. Stored in lowercase. |
prompt |
string, up to 2000 characters | What the meme was made for. Search reads it. |
createdBy |
string, up to 200 characters | Your own id for the member who saved it. |
curl https://api.memelemur.com/v1/library \
-H "Authorization: Bearer $MEMELEMUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_kwhxl4k7tqhc25ds",
"captions": ["Deploying on Monday morning", "Deploying at 4:55pm on a Friday"],
"tags": ["work", "deploys"],
"prompt": "when the deploy goes out at 4:55pm on a Friday",
"createdBy": "member-42"
}'The response is 201 with the saved meme:
{
"meme": {
"id": "meme_esnsirl0xp5150c4",
"teamId": "tnt_hc0n3r4w54a35prf",
"templateId": "tpl_kwhxl4k7tqhc25ds",
"captions": ["Deploying on Monday morning", "Deploying at 4:55pm on a Friday"],
"r2Key": "library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg",
"width": 446,
"height": 698,
"prompt": "when the deploy goes out at 4:55pm on a Friday",
"createdBy": "member-42",
"tags": ["deploys", "work"],
"createdAt": "2026-10-02T00:57:42.670Z",
"imageUrl": "https://api.memelemur.com/i/library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg"
}
}| Field | What it is |
|---|---|
id |
The id of the saved meme. Feedback takes it as a memeId. |
imageUrl |
The saved image. It needs no key. |
r2Key |
The part of imageUrl after /i/. |
prompt, createdBy |
What you sent, or null. |
space |
The space the meme was saved in. Left out for a meme saved in no space. |
It returns 404 when the template does not exist, belongs to another team, or is blocked by your settings or the space's, and 400 when the number of captions is not the number of boxes. It returns 422 when the captions refer to one of your prohibited topics, and 503 when they could not be checked. It also returns 400 for an animated template: the library keeps JPEGs, and a GIF cannot be saved to it.
A saved meme on a shared template also goes into the pool. Generate returns it to your team alone.
List and search saved memes #
GET /v1/library
| Query | What it does |
|---|---|
q |
Text to search for, up to 500 characters. It looks at the captions, the prompt, the tags and the template's name, by meaning and by keyword. |
tags |
Tags separated by commas. Keeps the memes that have every one. |
templateId |
Keeps the memes on one template. |
limit |
1 to 100. The default is 30. |
offset |
How many to skip. The default is 0. |
Without q the newest meme comes first. With q the list is in rank order and has at most 50 memes in all, and limit and offset page through them.
curl "https://api.memelemur.com/v1/library?q=friday+deploy&tags=work" \
-H "Authorization: Bearer $MEMELEMUR_KEY"{
"memes": [
{
"id": "meme_esnsirl0xp5150c4",
"teamId": "tnt_hc0n3r4w54a35prf",
"templateId": "tpl_kwhxl4k7tqhc25ds",
"captions": ["Deploying on Monday morning", "Deploying at 4:55pm on a Friday"],
"r2Key": "library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg",
"width": 446,
"height": 698,
"prompt": "when the deploy goes out at 4:55pm on a Friday",
"createdBy": "member-42",
"tags": ["deploys", "work"],
"createdAt": "2026-10-02T00:57:42.670Z",
"imageUrl": "https://api.memelemur.com/i/library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg"
}
]
}A search finds a new meme by keyword as soon as it is saved, and by meaning a few minutes later. It returns 503 when neither ranking can be read.
Get one saved meme #
GET /v1/library/:id
curl https://api.memelemur.com/v1/library/meme_esnsirl0xp5150c4 \
-H "Authorization: Bearer $MEMELEMUR_KEY"The response has the meme, with the same fields a save returns:
{
"meme": {
"id": "meme_esnsirl0xp5150c4",
"teamId": "tnt_hc0n3r4w54a35prf",
"templateId": "tpl_kwhxl4k7tqhc25ds",
"captions": ["Deploying on Monday morning", "Deploying at 4:55pm on a Friday"],
"r2Key": "library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg",
"width": 446,
"height": 698,
"prompt": "when the deploy goes out at 4:55pm on a Friday",
"createdBy": "member-42",
"tags": ["deploys", "work"],
"createdAt": "2026-10-02T00:57:42.670Z",
"imageUrl": "https://api.memelemur.com/i/library/tnt_hc0n3r4w54a35prf/meme_esnsirl0xp5150c4.jpg"
}
}It returns 404 when your team has no saved meme with that id.
Delete a saved meme #
DELETE /v1/library/:id
Removes the meme from the library and from search. It returns 204 with no body, and 404 when your team has no saved meme with that id.
curl -X DELETE https://api.memelemur.com/v1/library/meme_esnsirl0xp5150c4 \
-H "Authorization: Bearer $MEMELEMUR_KEY"Move saved memes to a space #
POST /v1/library/move
Puts up to 200 saved memes in a space, or in no space. Every member and every API key that can delete a saved meme can move one.
| Field | Type | What it does |
|---|---|---|
ids |
1 to 200 strings | The ids of the saved memes to move. Required. An id sent twice counts once. |
space |
string or null | The id of the space to move them to, or null for no space. Required. The space does not have to be saved first. |
curl https://api.memelemur.com/v1/library/move \
-H "Authorization: Bearer $MEMELEMUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": ["meme_esnsirl0xp5150c4", "meme_0000000000000000"],
"space": "design"
}'The response is 200 and says what happened to each id:
{
"moved": ["meme_esnsirl0xp5150c4"],
"notFound": ["meme_0000000000000000"]
}| Field | What it is |
|---|---|
moved |
The ids that are now in the space, in the order you sent them. A meme that was already there is listed here too. |
notFound |
The ids that are not a saved meme of your team: a deleted meme, another team's, or an id that never existed. Nothing happened to them. |
The call moves what it finds, so check notFound when every id has to move. It returns 400 when ids is empty or has more than 200 ids, when space is missing, and when space is not a valid space id.
A moved meme is listed and found by search in its new space at once, and no longer in the old one. Its id, its image and its tags stay as they were. Feedback given on the meme before the move stays counted under the space the meme was in then, and a person who first votes after the move is counted under the new space.
With the Memelemur-Space header the call finds only the memes saved in that space, and the others come back in notFound. space in the body is where they go. This moves two memes out of design into no space:
curl https://api.memelemur.com/v1/library/move \
-H "Authorization: Bearer $MEMELEMUR_KEY" \
-H "Memelemur-Space: design" \
-H "Content-Type: application/json" \
-d '{"ids": ["meme_esnsirl0xp5150c4", "meme_k2v9x0q2m7d1c8zt"], "space": null}'The library in a space #
With the Memelemur-Space header, a meme is saved in that space, and the list, the search, the two routes that take an id and a move see only that space's memes. A meme saved in another space, or in no space, returns 404 there.
Without the header the routes cover the whole team, and a meme that was saved in a space has a space field:
curl https://api.memelemur.com/v1/library \
-H "Authorization: Bearer $MEMELEMUR_KEY" \
-H "Memelemur-Space: design"A search by meaning ranks the whole team's memes first and then keeps the space's. In a team with many spaces it can miss a meme that a keyword finds.
Embed a meme from the public library #
The public library has the memes people shared from the demo. It is separate from your team's library, and it needs no key. Each meme there has a page at https://memelemur.com/m/<id>, and the Embed button on that page gives the code that shows the meme on another page:
<div style="max-width:640px"><div style="position:relative;padding-bottom:calc(75% + 32px)"><iframe src="https://memelemur.com/m/k3v9x0q2m7d1c8zt/embed" title="Meme: Fixing the bug / Renaming the bug to a feature" width="640" height="512" loading="lazy" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0"></iframe></div></div>The code is a frame with the meme and a link to its page. It keeps the meme's shape at any width up to the meme's own, loads when the reader scrolls near it, and runs no script on your page. The frame follows the reader's light or dark setting.
A site that removes frames can show the picture with a link to the meme's page:
<a href="https://memelemur.com/m/k3v9x0q2m7d1c8zt"><img src="https://memelemur.com/library/images/k3v9x0q2m7d1c8zt.jpg" alt="Fixing the bug / Renaming the bug to a feature" width="640" height="480"></a>When a meme is removed from the public library, its frame says that the meme is not available, and its picture returns 404.
oEmbed #
A meme's page has an oEmbed tag in its head, so an app that looks for one shows the meme when somebody pastes the link to its page. The endpoint is https://memelemur.com/m/oembed.
| Query | What it does |
|---|---|
url |
The address of a meme's page. Required. |
maxwidth, maxheight |
The most room you have, in pixels. The width and height that come back fit inside it in the meme's shape. |
format |
json, which is the only format. Any other returns 501. |
type |
photo or rich. The default is photo. This parameter is Meme Lemur's own. |
curl "https://memelemur.com/m/oembed?url=https://memelemur.com/m/k3v9x0q2m7d1c8zt&maxwidth=400"{
"version": "1.0",
"type": "photo",
"url": "https://memelemur.com/library/images/k3v9x0q2m7d1c8zt.tile.jpg",
"width": 400,
"height": 300,
"title": "Fixing the bug / Renaming the bug to a feature",
"provider_name": "Meme Lemur",
"provider_url": "https://memelemur.com",
"thumbnail_url": "https://memelemur.com/library/images/k3v9x0q2m7d1c8zt.tile.jpg",
"thumbnail_width": 400,
"thumbnail_height": 300,
"cache_age": 86400
}A photo response has the picture's address in url. The picture is stored at two sizes, and url is the smaller one when it covers the size you asked for, so the file can have more pixels than width and height say. A rich response has html in place of url: the code above, with width and height for the whole frame.
It returns 400 when url is missing or a size is not a whole number above zero, and 404 when url is not the page of a meme that is in the public library.