---
title: "Create a meme from a template"
method: POST
path: "/images"
tags: ["Images"]
---

# Create a meme from a template

`POST /images`

Create a meme by `POST`ing raw text. The response includes a canonical
`url` field with path escaping applied — prefer this over hand-built
`GET` URLs when text contains spaces or reserved characters.

Body fields:
- `template_id`: Template to render (`GET /templates/`).
- `text`: Lines of text in order (raw, not escape-encoded). Up to the
  template's `lines` value; pass an empty string for an empty intermediate
  line.
- `style`: Style names from the template's `styles` field, or HTTPS URLs
  for custom overlay images. When `overlays` > 1, the array sets each slot.
- `extension`: Output image extension.
- `redirect`: If true, returns 302 to the canonical URL instead of JSON.

## Request body

- object
  - `template_id` string
  - `style` string[]
  - `text` string[]
  - `layout` string
  - `font` string
  - `extension` string
  - `redirect` boolean

## Response `201`

Successfully created a meme

- object
  - `url` string

## Other responses

- `400` — Required "template_id" missing in request body
- `404` — Specified "template_id" does not exist

---

[API](https://skmtc.net/memegen/apis/memegen-link.md) · [All operations](https://skmtc.net/memegen/apis/memegen-link/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/memegen/memegen-link/versions/f7d2d927f984/schema)
