Skip to navigation

Preview Meme

What POST /memes would make, drawn as a PNG and not saved: the same body, the same checks (422 for an archived template or no words, 404 for a template not in the workspace) and the same fitting, so it can be shown to somebody before everybody sees it. Nothing is written, so it needs only memes:read. It counts against the meme-render budget as GET /memes/{memeId}/image does, and as a write against the caller’s own limits, being a POST.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

sizeintegerOptional

The longest edge, in pixels, from 64. Left out, 1024; above 1024, 1024.

Request

This endpoint expects an object.
templateIdstringRequired

A template in the workspace that is still in the picker. One an app admin archived is refused with 422; memes already made from it are kept and keep rendering. A one-off background (curated: false) may be used.

captionslist of stringsRequired

One per caption box, in the layout’s order. Each is folded onto one line and cut at 140 characters; extra captions are dropped and missing ones left empty. At least one must have words, or 422. Up to 8, each at most 500 characters as sent.

layoutenumOptional
A different layout for this meme only. Stored only when it differs from the template's own.
Allowed values:

Response

This endpoint returns a file.

Errors

402
Subscription Required Error
404
Not Found Error
422
Validation Error
429
Too Many Requests Error
502
Upstream Error