Comma-separated list to signify whether the content is a sticker or static image, has
audio, or is any combination of these. If sticker and static
aren't present, then the content is a GIF. A blank flags field signifies a
GIF without audio.
bg_color
string
The most common background pixel color of the content
The following table provides details on the properties for Category Objects:
Properties
searchterm
string
The search term that corresponds to the category. The search term is translated to match
the locale of the corresponding request.
path
string
The search URL to request if the user selects the category
image
string
A URL to the media source for the category's example GIF
name
string
Category name to overlay over the image. The name is translated to match the
locale of the corresponding request.
Media object
The following table provides details on the properties for Media Objects:
Properties
url
string
A URL to the media source
dims
int[]
Width and height of the media in pixels
duration
float
Represents the time in seconds for one loop of the content. If the content is static, the
duration is set to 0.
size
int
Size of the file in bytes
Content formats
Tenor's API offers the following five base formats in a variety of sizes:
GIF
MP4
WebM
Transparent WebP
Transparent GIF
The MP4 and WebM formats play their clip only once, with the exception of the
loopedmp4, which plays the clip a few times. The GIF format plays its clip on a
continuous loop. The transparent formats are for sticker content and aren't available in GIF
search results.
Format types
The following table provides details on the available media format types for
Tenor:
Format types
preview
Resolution and size: High quality single frame GIF format; smaller in size than
the GIF format
Dimensions: Original upload dimensions (no limits)
Usage notes: Make this the first frame of the content. It's intended for use
as a thumbnail preview.
This format is supported for GIFs and stickers.
gif
Resolution and size: High-quality GIF format; largest file size available
Dimensions: Original upload dimensions (no limits)
Usage notes: Use this size for GIF shares on desktop.
This format is supported for GIFs and stickers.
mediumgif
Resolution and size: Small reduction in size of the GIF format
Dimensions: Original upload dimensions (no limits) but much higher compression
rate
Usage notes: Use this size for GIF previews on desktop.
This format is supported for GIFs and stickers.
tinygif
Resolution and size: Reduced size of the GIF format
Dimensions: Up to 220 pixels wide. Height scaled to preserve the aspect
ratio.
Usage notes: Use this size for GIF previews and shares on mobile.
This format is supported for GIFs and stickers.
nanogif
Resolution and size: Smallest size of the GIF format
Dimensions: Up to 90 pixels tall. Width scaled to preserve the aspect
ratio.
Usage notes: Use this size for GIF previews on mobile.
This format is supported for GIFs and stickers.
mp4
Resolution and size: Highest quality video format; largest of the video
formats, but smaller than GIF
Dimensions: Similar to GIF but padded to fit video container specifications,
which are usually 8-pixel increments.
Usage notes: Use this size for MP4 previews and shares on desktop.
This format is supported for GIFs and stickers.
loopedmp4
Resolution and size: Highest quality video format; larger in size than MP4
Dimensions: Similar to GIF but padded to fit video container specifications,
which are usually 8-pixel increments.
Usage notes: Use this size for MP4 shares when you want the video clip to run a
few times rather than only once.
This format is supported for GIFs and stickers.
tinymp4
Resolution and size: Reduced size of the MP4 format
Dimensions: Variable width and height, with a maximum bounding box of
320x320 pixels
Usage notes: Use this size for MP4 previews and shares on mobile.
This format is supported for GIFs and stickers.
nanomp4
Resolution and size: Smallest size of the MP4 format
Dimensions: Variable width and height, with a maximum bounding box of
150x150 pixels
Usage notes: Use this size for MP4 previews on mobile.
This format is supported for GIFs and stickers.
webm
Resolution and size: Lower quality video format; smaller in size than MP4
Dimensions: Similar to GIF but padded to fit video container specifications,
which are usually 8-pixel increments.
Usage notes: Use this size for WebM previews and shares on desktop.
This format is supported for GIFs and stickers.
tinywebm
Resolution and size: Reduced size of the WebM format
Dimensions: Variable width and height, with a maximum bounding box of
320x320 pixels
Usage notes: Use this size for GIF shares on mobile.
This format is supported for GIFs and stickers.
nanowebm
Resolution and size: Smallest size of the WebM format
Dimensions: Variable width and height, with a maximum bounding box of
150x150 pixels
Usage notes: Use this size for GIF previews on mobile.
This format is supported for GIFs and stickers.
webp_transparent
Resolution and size: High-quality WebP sticker format; largest file size
available
Dimensions: Original upload dimensions (no limits)
Usage notes: Use this size for sticker shares for high-bandwidth users.
This format is supported for stickers.
tinywebp_transparent
Resolution and size: Reduced size of the WebP sticker format; maximum size of
500 KB
Dimensions: Up to 220x220 pixels, height scaled to preserve the aspect
ratio.
Usage notes: Use this size for sticker previews for high-bandwidth users and
shares for low-bandwidth users.
This format is supported for stickers.
nanowebp_transparent
Resolution and size: Smallest size of the WebP sticker format; maximum size of
100 KB
Dimensions: Up to 90x90 pixels, with the width scaled to preserve the aspect
ratio.
Usage notes: Use this size for sticker previews for low-bandwidth users.
This format is supported for stickers.
gif_transparent
Resolution and size: High-quality GIF sticker format; largest file size
available
Dimensions: Original upload dimensions (no limits)
Usage notes: Use this size for sticker shares for high-bandwidth users.
This format is supported for stickers.
tinygif_transparent
Resolution and size: Reduced size of the GIF sticker format; maximum size of
500 KB
Dimensions: Up to 220x220 pixels, with the height scaled to preserve the aspect
ratio.
Usage notes: Use this size for sticker previews for high-bandwidth users and
shares for low-bandwidth users.
This format is supported for stickers.
nanogif_transparent
Resolution and size: Smallest size of the GIF sticker format; maximum size of
100 KB
Dimensions: Up to 90x90 pixels, with the width scaled to preserve the aspect
ratio.
Usage notes: Use this size for sticker previews for low-bandwidth users.
This format is supported for sticker.
Best practices
For mobile, use the nano- or tiny-sized files for previews and the tiny-sized files for
shares.
Set the media_filter parameter to the formats you intend to use. This can reduce
the API response size by 70%.
Format sizes
The file size for each content format depends on the dimensions and length of the specific GIF
selected. Therefore, consider the means and medians provided in the following table as general
guidelines rather than hard values.
File format
Mean file size (KB)
Median file size (KB)
gif
3,356
956
mediumgif
2,548
574
tinygif
521
101
nanogif
175
56
mp4
207
91
loopedmp4
515
228
tinymp4
84
81
nanomp4
37
28
webm
76
61
tinywebm
57
45
nanowebm
35
25
webp_transparent
530
95
tinywebp_transparent
249
60
nanowebp_transparent
107
25
gif_transparent
643
35
tinygif_transparent
349
20
nanogif_transparent
116
10
Response codes
The following table provides the HTTP status response codes used to indicate a successful
request:
HTTP status code
200 or 202
OK or accepted
Errors
Tenor's API returns errors with the HTTP response codes 4xx or
5xx and in the standard Google API error format. For details, see
Errors.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-12-05 UTC."],[[["This documentation details the JSON response and error objects for the Tenor API, including properties for responses, categories, and media objects."],["It outlines available content formats (GIF, MP4, WebM, WebP, GIF) and types (preview, gif, mediumgif, tinygif, etc.), providing size and usage recommendations."],["The document offers best practices like using nano or tiny files for mobile previews and the `media_filter` parameter for reducing response size."],["It includes information on response codes (200, 202) indicating successful requests and standard Google API error formats for unsuccessful ones."]]],["The Tenor API uses JSON response objects, including Response, Category, and Media objects. Response objects contain properties like `id`, `created`, `media_formats`, and `tags`. Category objects have `searchterm`, `path`, `image`, and `name`. Media objects hold `url`, `dims`, `duration`, and `size` data. The API supports GIF, MP4, WebM, and transparent WebP/GIF formats, offering various sizes (e.g., nano, tiny, medium). Format sizes and best practices are detailed, and success is indicated by HTTP status codes 200 or 202, with errors using 4xx or 5xx codes.\n"]]