---
title: "Render a meme preview without saving it"
method: POST
path: "/memes/preview"
tags: ["Media"]
---

# Render a meme preview without saving it

`POST /memes/preview`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/memes/preview`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Request body

- PreviewMemeInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `captions` string[], nullable, required: Caption values in template order
  - `format` 'png' | 'jpg' | 'jpeg' | 'gif' | 'webp': Rendered image format
  - `overlay_media_ids` string[], nullable: Workspace media IDs for replaceable image slots
  - `template_id` string, required: OpenPost meme template ID
  - `workspace_id` string, required: Workspace ID

## Response `200`

OK

- PreviewMemeOutputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `data_base64` string, required: Base64-encoded rendered image bytes
  - `mime_type` string, required
  - `template_id` string, required

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `413`: Request Entity Too Large
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `502`: Bad Gateway
- `503`: Service Unavailable

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
