Meme LemurDocs

Spaces

A space is one community inside your team. Send the Memelemur-Space header to make a call in it, and use /v1/spaces to give it settings of its own.

What a space is #

A space is a scope inside a team, for one that runs several communities with different audiences. You choose the id, for example your own id for the community. A call made in a space runs under the team's settings with the space's overrides applied, and what it saves and shows is stored under the space.

A space does not have to be created. A call in a space that has no overrides runs under the team's settings, and its saved memes, its feedback and its counts are still kept apart. Saving a space with PUT /v1/spaces/:id puts it on the list of your spaces, which is where the Jungle Gym gets the spaces it offers.

An id is 1 to 64 letters, digits, dots, underscores or hyphens, and starts with a letter or a digit. Ids are compared exactly, so Design and design are two spaces.

Make a call in a space #

Send the id in the Memelemur-Space header:

Shell
curl https://api.memelemur.com/v1/generate \
  -H "Authorization: Bearer $MEMELEMUR_KEY" \
  -H "Memelemur-Space: design" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "the logo could be bigger"}'
Routes What the header does
Generate, match, render The call runs under the space's settings, counts toward the space's cap, and is stored under the space.
Library A meme is saved in the space, and reads see only the space's memes. POST /v1/library/move puts saved memes in another space, or in none.
Feedback template counts and export They return the space's counts and rows.
Usage The response has the space's own count.
Tags blocked counts the tags the space blocks.

Those routes return 400 for a header that is not a valid id. The other routes do not read the header: templates, settings, API keys and people belong to the whole team.

Spaces in use that are not saved #

A call in a space nobody has saved works. It runs under your team's settings, and the space has no settings, logo or blocklists of its own until you save it with PUT /v1/spaces/:id. An id that differs from a saved one by a capital letter is a different space, and it is unsaved.

So that this does not go unseen, Meme Lemur keeps track of the unsaved spaces your calls are made in and tells you in three places:

  • An email, the unsavedSpace usage alert, to each owner and to any other member who turned it on. It comes at most once a day and lists every unsaved space you have not been told about.
  • The Notices button at the top of the Jungle Gym, which lists each one with a button that saves it and a button that dismisses the notice.
  • unsavedSpaces in GET /v1/alerts.

To stop the notices about a space, save it or dismiss it. Saving it with an empty body, {}, changes nothing about its calls and puts it on your list of spaces. Dismissing it, in the Jungle Gym or with POST /v1/alerts/unsaved-spaces/:id/dismiss, is for a space that is meant to stay unsaved.

A space named by a publishable key counts as one sent in the header. A space no call has used for seven days is no longer listed. At most 200 unsaved spaces are tracked for one team, so a team that gives each of its users a space and saves none of them is told about the first 200.

List the saved spaces #

GET /v1/spaces

Returns the spaces that were saved with PUT /v1/spaces/:id and not deleted since, in id order. A saved space is listed whether or not it has overrides. A space that was only named in a header is not listed.

Query What it does
limit 1 to 500. The default is 100.
offset How many to skip. The default is 0.
Shell
curl https://api.memelemur.com/v1/spaces \
  -H "Authorization: Bearer $MEMELEMUR_KEY"
JSON
{
  "spaces": [
    {
      "id": "design",
      "overrides": { "prohibited": ["comic sans"], "tone": "playful, visual puns", "dailyGenerateCap": 200 },
      "updatedAt": "2026-10-02T00:58:06.037Z"
    }
  ]
}

Read one space #

GET /v1/spaces/:id

Returns the space's overrides and the settings a call in the space runs under.

Shell
curl https://api.memelemur.com/v1/spaces/design \
  -H "Authorization: Bearer $MEMELEMUR_KEY"
JSON
{
  "space": {
    "id": "design",
    "overrides": { "prohibited": ["comic sans"], "tone": "playful, visual puns", "dailyGenerateCap": 200 },
    "settings": {
      "steering": "The audience is a platform team of Go developers.",
      "prohibited": ["layoffs", "comic sans"],
      "tone": "playful, visual puns",
      "maxWordsPerCaption": 12,
      "blockedTemplateIds": [],
      "blockedTags": ["profanity", "political"],
      "pinnedTemplateIds": [],
      "useSharedTemplates": true,
      "preferTrending": false,
      "maxDimension": 1200,
      "reuse": "prefer",
      "dailyGenerateCap": 200
    },
    "updatedAt": "2026-10-02T00:58:06.037Z"
  }
}

This route never returns 404. A space nobody has saved comes back with "overrides": {}, the team's settings and "updatedAt": null.

Change a space's overrides #

PUT /v1/spaces/:id

The body has any of the settings fields. Only the fields in the body change. A list in the body replaces the saved list, and a field set to null stops being overridden. A body of {} saves the space as it is, and for a new space that puts it on the list with no overrides. A space stays on the list when its last override is taken away.

Shell
curl -X PUT https://api.memelemur.com/v1/spaces/design \
  -H "Authorization: Bearer $MEMELEMUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tone": "playful, visual puns", "prohibited": ["comic sans"], "dailyGenerateCap": 200}'

The response has the space as Read one space returns it, with the new overrides and the settings they give:

JSON
{
  "space": {
    "id": "design",
    "overrides": { "prohibited": ["comic sans"], "tone": "playful, visual puns", "dailyGenerateCap": 200 },
    "settings": {
      "steering": "The audience is a platform team of Go developers.",
      "prohibited": ["layoffs", "comic sans"],
      "tone": "playful, visual puns",
      "maxWordsPerCaption": 12,
      "blockedTemplateIds": [],
      "blockedTags": ["profanity", "political"],
      "pinnedTemplateIds": [],
      "useSharedTemplates": true,
      "preferTrending": false,
      "maxDimension": 1200,
      "reuse": "prefer",
      "dailyGenerateCap": 200
    },
    "updatedAt": "2026-10-02T00:58:06.037Z"
  }
}

How a space's value combines with the team's:

Field What a call in the space uses
prohibited, blockedTags, blockedTemplateIds The team's list with the space's added. A space cannot take anything off the team's list.
prohibitedThreshold The lower of the two. A space can make the check stricter for itself and cannot make it looser.
steering The team's text, then the space's.
pinnedTemplateIds The space's pins in place of the team's. A template the team or the space blocks, by id or by tag, is dropped from the space's pins.
dailyGenerateCap The lower of the two. A space can lower the cap for itself and cannot raise it. The team's cap still applies to all of its spaces together.
modelCallsPerMinute, modelCallsBurst, rendersPerMinute, rendersBurst The lower of the two. A space can lower a rate limit for itself and cannot raise it. A call in the space spends from the space's limit and from the team's.
watermarkText, watermarkSize, watermarkOpacity, watermarkTone, watermarkLogoColor The space's value in place of the team's. A text is checked as the team's is. See A space's own watermark.
watermarkLogo, watermarkLogoDark The space's logo in place of the team's. A body may send null, to go back to the team's, and any other value returns 400: a logo is uploaded.
watermark The team's in every space. A body that sends it returns 400.
Every other field The space's value in place of the team's.

It returns 400 for a value a settings field does not allow, with details that says which. A signed-in member cannot call this route. An editor, an owner or an API key of either kind can.

A space's own watermark #

A space can put its own mark on its memes in place of the team's: its own text, logo, size, opacity and look. Each field it leaves out is the team's. The Meme Lemur mark, while your team has it, is on the memes of every space.

PUT /v1/spaces/:id/watermark-logo

Uploads a logo for the space, as the team's logo is uploaded, and with ?variant=dark its logo for light pictures. The response has the space as Read one space returns it.

Shell
curl -X PUT https://api.memelemur.com/v1/spaces/design/watermark-logo \
  -H "Authorization: Bearer $MEMELEMUR_KEY" \
  -F "image=@design-logo.png"

The space then has the key of its logo in its overrides, and its settings have that logo in place of the team's:

JSON
{
  "space": {
    "id": "design",
    "overrides": {
      "watermarkLogo": "watermarks/tnt_hc0n3r4w54a35prf/9b1d6c0e7a2f4b3c8d5e1f0a6b7c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c.png"
    },
    "settings": {
      "watermarkText": "acme.example",
      "watermarkLogo": "watermarks/tnt_hc0n3r4w54a35prf/9b1d6c0e7a2f4b3c8d5e1f0a6b7c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c.png"
    },
    "updatedAt": "2026-10-06T21:10:44.512Z"
  }
}

The example leaves out the other settings.

DELETE /v1/spaces/:id/watermark-logo

Gives the space no logo, whatever the team has, so its memes have the space's text, or the team's, or no mark when there is no text. ?variant=dark does the same for the logo for light pictures. To go back to the team's logo, send "watermarkLogo": null to PUT /v1/spaces/:id.

Shell
curl -X DELETE https://api.memelemur.com/v1/spaces/design/watermark-logo \
  -H "Authorization: Bearer $MEMELEMUR_KEY"

GET /v1/settings/watermark-preview?space=design draws a sample with the space's mark. A signed-in member cannot call these routes. An editor, an owner or an API key of either kind can.

Delete a space #

DELETE /v1/spaces/:id

Takes the space off the list, removes its overrides, and returns 204 with no body. The space's saved memes and feedback stay, and calls in the space run under the team's settings from then on.

Shell
curl -X DELETE https://api.memelemur.com/v1/spaces/design \
  -H "Authorization: Bearer $MEMELEMUR_KEY"

A signed-in member cannot call this route. An editor, an owner or an API key of either kind can.