Meme LemurDocs

Authentication

Every API call sends a team API key in the Authorization header. The API is at one base URL, and image URLs need no key.

The base URL and the key #

The API is at https://api.memelemur.com. Every route under /v1 takes a team API key in the Authorization header:

Shell
curl https://api.memelemur.com/v1/usage \
  -H "Authorization: Bearer $MEMELEMUR_KEY"

A key starts with ml_ and belongs to one team. The key says which team the call is for, so no route has a team id in its path. A team can have several keys, and API keys covers making one and revoking one.

A call with no key, a wrong key or a revoked key returns 401:

JSON
{ "error": "invalid or missing API key" }

A key is a regular key or an admin key. A regular key makes memes and changes settings and spaces, which is what most backends need. An admin key can also manage people, the team's model key and the API keys. A regular key that calls one of those routes returns 403:

JSON
{ "error": "this route needs an admin API key" }

Regular keys and admin keys has the full list. An example that needs an admin key sends $MEMELEMUR_ADMIN_KEY, and every other example sends $MEMELEMUR_KEY.

Call the API from your backend. An admin key can do everything an owner of the team can, and a regular key can still spend your team's memes and change its settings, so keep both kinds out of web pages and apps. The API sends no CORS headers, so a browser does not let a page on another site call it.

Request and response bodies #

A request body is JSON, sent with Content-Type: application/json. The one exception is a template upload, which can also be a multipart form.

A response body is JSON. A failed call returns an error string, and sometimes details:

JSON
{ "error": "template has 2 caption slots, got 1" }

Limits and errors lists the status codes.

Times are ISO 8601 strings in UTC, such as 2026-10-02T00:57:15.705Z. An id starts with a prefix that says what it is an id of:

Prefix What it is an id of
tnt_ A team
tpl_ A template
gen_ One generate, match or render call
shown_ One meme that a call returned
meme_ A meme saved in the library
key_ An API key. This is the id of the key and cannot be used to make a call.
inv_ An invitation

Image URLs #

A meme or a template comes back with the URL of its image, which starts with https://api.memelemur.com/i/. An image URL needs no key, so a member's browser or a chat app can load it. The file name of a rendered meme is a long hash, and it is the only thing that keeps the image from someone who was not given the URL.

The image at a URL never changes. Every image response says it can be cached for a year.

The space header #

A team that runs several communities sends Memelemur-Space: <id> to make a call in one of them:

Shell
curl https://api.memelemur.com/v1/usage \
  -H "Authorization: Bearer $MEMELEMUR_KEY" \
  -H "Memelemur-Space: design"

Spaces says which routes read the header and what a space changes.

People who sign in #

A person on your team does not use an API key. They sign in at https://app.memelemur.com/jungle-gym with their email, and the pages there make calls as that person. People and roles covers who can sign in to your team and what each role may do.