Skip to content
Fluxer API

Memes

A meme is an image, video or audio file you save to your account. Fluxer keeps its own copy, so the meme still works after the source message or URL is gone. Bot tokens get 403 ACCESS_DENIED on these routes, and you send a saved meme with favorite_meme_id in Create message.

You can save up to max_favorite_memes memes (default 50) with up to max_favorite_meme_tags tags each (default 10). See instance limits. Fluxer compares the stored bytes, so saving a file you already have returns MEDIA_ALREADY_IN_FAVORITE_MEMES, even from a different URL or message.

A meme object is one saved file. You can change only name, alt_text and tags after you save it.

FieldTypeDescription
idsnowflakeThe ID of the meme
user_idsnowflakeThe ID of the owning account
namestringThe display name of the meme (1-100 characters)
alt_text?stringThe accessibility description of the media
tagsarray[string]The search tags, each 1-30 characters
attachment_idsnowflakeThe ID of the attachment holding the stored copy
filenamestringThe filename of the stored copy
content_typestringThe MIME type of the stored copy
content_hash?stringThe content hash used for duplicate checks
sizeintegerThe size of the copy in bytes
width?integerThe width of the media in pixels
height?integerThe height of the media in pixels
duration?numberThe duration of the media in seconds
url1stringThe signed attachment URL of the stored copy
is_gifvbooleanWhether the media is animated or a video converted from a GIF
gif_slug2?stringThe provider slug the meme came from
gif_provider2?stringThe name of the GIF provider that issued gif_slug
media3?map[string, GIF media format object]The provider formats for a GIF-sourced meme
placeholder?stringThe thumbhash placeholder recorded at save time

1 A new signed attachment URL on every read

2 Both are set or both are null. The value is klipy or tenor

3 Set only by Save meme from URL

{
"id": "1501314428688998182",
"user_id": "1501314428688990000",
"name": "party_parrot.gif",
"alt_text": null,
"tags": ["parrot", "party"],
"attachment_id": "1501314428688998183",
"filename": "party_parrot.gif",
"content_type": "image/gif",
"size": 40213,
"url": "https://media.example.com/attachments/1501314428688998182/1501314428688998183/party_parrot.gif?ex=69fba4b5&is=69fa5335&hm=5586be3ae70411fe6582431649e2f28abc6c201e4f12a4f43a3256b72b90d3de",
"content_hash": "b3f1c2e4a5d6978812ab34cd56ef7890",
"width": 320,
"height": 240,
"duration": null,
"is_gifv": true,
"gif_slug": "party-parrot-1234",
"gif_provider": "klipy",
"placeholder": "3PcNNYYONWQPFxrsUeUcRh4"
}

A GIF media format object is one size and file type of a provider GIF.

FieldTypeDescription
srcstringThe direct media URL of this format
proxy_srcstringThe Media Proxy URL of this format
widthintegerThe width in pixels
heightintegerThe height in pixels
ValueDescription
webmFull-size WebM video
mp4Full-size MP4 video
webpFull-size WebP image
gifFull-size GIF image
mediumwebmMedium WebM video
mediummp4Medium MP4 video
mediumwebpMedium WebP image
mediumgifMedium GIF image
tinywebmSmall WebM video
tinymp4Small MP4 video
tinywebpSmall WebP image
tinygifSmall GIF image
nanowebmSmallest WebM video
nanomp4Smallest MP4 video
nanowebpSmallest WebP image
nanogifSmallest GIF image
loopedmp4Looping MP4 video

A map has only the formats the provider returned. Use the first format from your own order of preference that the map has.

One entry for one URL submitted to Resolve GIF URLs.

FieldTypeDescription
url1stringThe source GIF URL
proxy_urlstringThe signed Media Proxy URL for the preview format
width2integerThe width of the preview format in pixels
height2integerThe height of the preview format in pixels
media3map[string, GIF media format object]The formats for the URL, keyed by format name
content_type4stringThe MIME type of the media at proxy_url
placeholder?stringThe thumbhash placeholder

1 The provider's canonical URL when the provider recognizes the URL, and the submitted URL otherwise

2 Zero when unknown

3 Empty when Fluxer can't find the GIF

4 Empty when unknown. Treat an empty value as image/gif

GET/v1/users/@me/memes

Returns your memes, newest first.

StatusBodyCondition
200array[meme object]The collection was returned

The rate limit is 60 requests per 10 seconds, on the favorite_meme:list bucket.

POST/v1/users/@me/memes

Fetches a media URL, stores a copy and returns the new meme. Sends Favorite Meme Create.

FieldTypeDescription
urlstringThe absolute media URL to fetch and store
name?1?stringThe display name of the meme (1-100 characters)
alt_text??stringThe accessibility description of the media (0-500 characters)
tags??array[string]The search tags to store, each 1-30 characters
gif_slug?2?stringThe provider slug or slug-id token for the GIF (1-300 characters)
gif_provider?2?stringThe name of the provider that issued gif_slug (1-32 characters)
media?3?map[string, GIF media format object]The provider formats captured at save time

1 Defaults to the stored filename, truncated to 100 characters

2 Used only when both are set and gif_provider matches the provider configured on the instance. Otherwise Fluxer reads the slug from url

3 Stored only when the URL resolved to a provider GIF and the map is not empty

StatusBodyCondition
201meme objectThe meme was created
400error responseINVALID_FORM_BODY when the body is invalid, as with MAX_FAVORITE_MEME_TAGS_EXCEEDED or MEDIA_ALREADY_IN_FAVORITE_MEMES
400error responseMEDIA_METADATA_ERROR when the URL has no usable media
400error responseMAX_FAVORITE_MEMES when the collection is full

The rate limit is 20 requests per minute, on the favorite_meme:create:url bucket.

POST/v1/channels/{channel_id}/messages/{message_id}/memes

Copies one attachment or embed asset from a message you can read into your collection and returns the new meme. You need VIEW_CHANNEL in a guild channel. Sends Favorite Meme Create.

FieldTypeDescription
namestringThe display name of the meme (1-100 characters)
attachment_id?1?snowflakeThe ID of an attachment in the message or one of its forwarded snapshots
embed_index?1?integerThe zero-based index of an embed in the message or one of its snapshots
alt_text?2?stringThe accessibility description of the media (0-500 characters)
tags??array[string]The search tags to store, each 1-30 characters

1 Send at least one of these keys. If both are null, Fluxer takes the first attachment, then the first usable embed. From an embed, Fluxer uses its image, then its video, then its thumbnail

2 Defaults to the selected attachment's own description when omitted, null or blank

StatusBodyCondition
201meme objectThe meme was created
400error responseINVALID_FORM_BODY3 when the body or selection fails validation
400error responseMEDIA_METADATA_ERROR when the media cannot be read
400error responseMAX_FAVORITE_MEMES when the collection is full
403error responseMISSING_PERMISSIONS, MISSING_ACCESS or NSFW_CONTENT_AGE_RESTRICTED when you can't view the channel or aren't verified

3 The validation code is ATTACHMENT_ID_NOT_FOUND_IN_MESSAGE, EMBED_INDEX_OUT_OF_BOUNDS, NO_VALID_MEDIA_IN_MESSAGE, MEDIA_ALREADY_IN_FAVORITE_MEMES or MAX_FAVORITE_MEME_TAGS_EXCEEDED

The rate limit is 10 requests per minute, on the favorite_meme:create:message bucket.

GET/v1/users/@me/memes/{meme_id}

Returns one of your memes.

StatusBodyCondition
200meme objectThe meme was returned
404error responseUNKNOWN_FAVORITE_MEME when you own no meme with that ID

The rate limit is 100 requests per 10 seconds, on the favorite_meme:get bucket.

PATCH/v1/users/@me/memes/{meme_id}

Changes the name, alt text or tags of one of your memes and returns it. Sends Favorite Meme Update.

FieldTypeDescription
name?stringThe replacement display name (1-100 characters)
alt_text?1?stringThe replacement accessibility description (0-500 characters)
tags?2?array[string]The replacement tags, each 1-30 characters

1 Null clears it, and an omitted field stays unchanged

2 Omit it or send null to keep the current tags

StatusBodyCondition
200meme objectThe meme was updated
400error responseINVALID_FORM_BODY, including MAX_FAVORITE_MEME_TAGS_EXCEEDED at tags
404error responseUNKNOWN_FAVORITE_MEME when you own no meme with that ID

The rate limit is 30 requests per 10 seconds, on the favorite_meme:update bucket.

DELETE/v1/users/@me/memes/{meme_id}

Deletes one of your memes and returns 204, also when the meme doesn't exist. Fluxer sends Favorite Meme Delete only when it deleted one.

StatusBodyCondition
204emptyThe meme was deleted, or none existed

The rate limit is 30 requests per 10 seconds, on the favorite_meme:delete bucket.

POST/v1/users/@me/favorite-gifs/resolve

Looks up GIF URLs and returns a resolved GIF entry for each one without saving anything. A URL Fluxer can't find still gets an entry, with an empty media map.

FieldTypeDescription
Accept-Language?stringThe preferred locale for the GIF provider lookup
FieldTypeDescription
urlsarray[string]The absolute GIF URLs to resolve (1-200)
FieldTypeDescription
entriesarray[resolved GIF entry object]One entry for each submitted URL, in the same order
StatusBodyCondition
200response bodyAn entry was returned for each URL

The rate limit is 30 requests per minute, on the favorite_gif:resolve bucket.