# Imgflip

> Make memes with Imgflip: caption the templates people use most or any template on the site, with the classic top and bottom text or boxes you place yourself, and keep the finished meme as a link or a file. With API Premium, caption GIFs, search the million-plus templates, and have AI pick a template or write the whole meme.

App · Images & Design · 7 actions. Web page: https://docs.lodol.com/docs/integrations/imgflip

## Actions

### Caption a GIF template

Write text on one of Imgflip's animated templates and get the finished GIF's link. The text goes in boxes, one per text box on the template. Needs API Premium: the first 50 a month are included, then two cents each.

**Inputs**

- Template (`template`, text, required): The template: its ID, such as 61579, a link to it on imgflip.com, or a template an earlier step returned. 'List popular meme templates' gives the ones people caption most; any template on imgflip.com works, including ones you upload there.
- Text boxes (`boxes`, list, required): One entry per text box on the template. Each is the box's text, or a record with text and, if wanted, x, y, width, height, color and outline_color. At most 20.
- Font (`font`, text): Optional: the text's font. Imgflip's default is impact, the classic meme font; arial and any of the Google Fonts in the font menu at imgflip.com/memegenerator work too.
- Largest font size (`max_font_size`, number): Optional: the largest the text may be, in pixels. Imgflip's default is 50; it shrinks the text to fit its box. From 1 to 1000.
- Remove the watermark (`remove_watermark`, true/false): Leave Imgflip's small watermark off the meme. Needs API Premium: the first 100 a month are included, then a cent each. Default: `false`.
- Watermark text (`watermark_text`, text): Optional: what the watermark says. A free account may choose 'imgflip.com' or 'made at imgflip.com'; any other text needs API Premium and counts like removing the watermark.
- Watermark position (`watermark_position`, text): Optional: which corner the watermark goes in. One of: `bottom-left` (Bottom left), `bottom-right` (Bottom right), `top-left` (Top left), `top-right` (Top right).
- Also save the meme as a file (`save_as_file`, true/false): Download the finished meme and keep it as a file, to attach to an email or a message in a later step. The meme's url works on its own wherever a link will do. Default: `false`.

**Outputs**

- `content_type` (text): The saved file's type, such as image/jpeg or video/mp4, or '' when not saved.
- `document_ref` (text): The saved file's document reference, or '' when not saved.
- `documents` (list): The saved meme as a document, ready to attach to a later step. Empty when it was not saved.
- `file_size_bytes` (number): The saved file's size in bytes, or 0 when not saved.
- `file_url` (text): A URL that serves the saved file, or '' when not saved.
- `page_url` (text): The meme's page on imgflip.com.
- `saved_as_file` (true/false): True when the meme was also saved as a file (Also save the meme as a file). The file fields below are empty otherwise.
- `status` (text): Status of the action execution ("success" on success).
- `template_id` (text): The template the meme was made from.
- `url` (text): The finished meme's picture, on i.imgflip.com. Anyone with the link can see it; a meme that is hardly ever viewed is deleted after a while.

**Example output**

```json
{
  "content_type": "",
  "document_ref": "",
  "documents": [],
  "file_size_bytes": 0,
  "file_url": "",
  "page_url": "https://imgflip.com/gif/b28kkg",
  "saved_as_file": false,
  "status": "success",
  "template_id": "222516354",
  "url": "https://i.imgflip.com/b28kkg.gif"
}
```

### Caption a meme template

Write text on an Imgflip meme template and get the finished meme's link. A top and bottom text makes a classic meme in capitals; text boxes handle templates with more boxes, or place and colour the text. The font, size and watermark can be set, and the meme can be kept as a file. Free, with Imgflip's watermark.

**Inputs**

- Template (`template`, text, required): The template: its ID, such as 61579, a link to it on imgflip.com, or a template an earlier step returned. 'List popular meme templates' gives the ones people caption most; any template on imgflip.com works, including ones you upload there.
- Top text (`top_text`, text): The text across the top, written in capitals. Leave empty when using text boxes.
- Bottom text (`bottom_text`, text): The text across the bottom, written in capitals. Leave empty when using text boxes.
- Text boxes (`boxes`, list): Optional: one entry per text box, for a template with more than two or to place and colour the text. Each is the box's text, or a record with text and, if wanted, x, y, width, height, color and outline_color. The first may be empty so the second goes at the bottom. With boxes, the text keeps its case. Give boxes or Top text and Bottom text, not both. At most 20.
- Font (`font`, text): Optional: the text's font. Imgflip's default is impact, the classic meme font; arial and any of the Google Fonts in the font menu at imgflip.com/memegenerator work too.
- Largest font size (`max_font_size`, number): Optional: the largest the text may be, in pixels. Imgflip's default is 50; it shrinks the text to fit its box. From 1 to 1000.
- Remove the watermark (`remove_watermark`, true/false): Leave Imgflip's small watermark off the meme. Needs API Premium: the first 100 a month are included, then a cent each. Default: `false`.
- Watermark text (`watermark_text`, text): Optional: what the watermark says. A free account may choose 'imgflip.com' or 'made at imgflip.com'; any other text needs API Premium and counts like removing the watermark.
- Watermark position (`watermark_position`, text): Optional: which corner the watermark goes in, or huge across the middle. One of: `bottom-left` (Bottom left), `bottom-right` (Bottom right), `top-left` (Top left), `top-right` (Top right), `huge`.
- Also save the meme as a file (`save_as_file`, true/false): Download the finished meme and keep it as a file, to attach to an email or a message in a later step. The meme's url works on its own wherever a link will do. Default: `false`.

**Outputs**

- `content_type` (text): The saved file's type, such as image/jpeg or video/mp4, or '' when not saved.
- `document_ref` (text): The saved file's document reference, or '' when not saved.
- `documents` (list): The saved meme as a document, ready to attach to a later step. Empty when it was not saved.
- `file_size_bytes` (number): The saved file's size in bytes, or 0 when not saved.
- `file_url` (text): A URL that serves the saved file, or '' when not saved.
- `page_url` (text): The meme's page on imgflip.com.
- `saved_as_file` (true/false): True when the meme was also saved as a file (Also save the meme as a file). The file fields below are empty otherwise.
- `status` (text): Status of the action execution ("success" on success).
- `template_id` (text): The template the meme was made from.
- `url` (text): The finished meme's picture, on i.imgflip.com. Anyone with the link can see it; a meme that is hardly ever viewed is deleted after a while.

**Example output**

```json
{
  "content_type": "",
  "document_ref": "",
  "documents": [],
  "file_size_bytes": 0,
  "file_url": "",
  "page_url": "https://imgflip.com/i/a3b9k2",
  "saved_as_file": false,
  "status": "success",
  "template_id": "61579",
  "url": "https://i.imgflip.com/a3b9k2.jpg"
}
```

### Get a meme template

Get one template's name, picture and text box count from its ID or link, such as a template someone uploaded to Imgflip. Needs API Premium.

**Inputs**

- Template (`template`, text, required): The template: its ID, such as 61579, a link to it on imgflip.com, or a template an earlier step returned. 'List popular meme templates' gives the ones people caption most; any template on imgflip.com works, including ones you upload there.

**Outputs**

- `animated` (true/false): True for a GIF template, whose picture is a short video.
- `box_count` (number): How many text boxes the template has by default. Some have many.
- `captions` (number): About how many times the template has been captioned, ever, rounded.
- `height` (number): The picture's height in pixels.
- `name` (text): The template's name.
- `page_url` (text): The template's page on imgflip.com.
- `status` (text): Status of the action execution ("success" on success).
- `template_id` (text): The template's ID on Imgflip, for the captioning steps.
- `url` (text): The template's blank picture (an MP4 for a GIF template), on i.imgflip.com.
- `width` (number): The picture's width in pixels.

**Example output**

```json
{
  "animated": false,
  "box_count": 2,
  "captions": 494750,
  "height": 335,
  "name": "One Does Not Simply",
  "page_url": "https://imgflip.com/memetemplate/61579",
  "status": "success",
  "template_id": "61579",
  "url": "https://i.imgflip.com/1bij.jpg",
  "width": 568
}
```

### List popular meme templates

Get the meme templates people caption most on Imgflip, about a hundred, each with its ID, name, picture and how many text boxes it has. Image templates, GIF templates or both. Free.

**Inputs**

- Template type (`template_type`, text): Image templates (the default), GIF templates, or both. A GIF template's picture is a short MP4. One of: `image` (Images), `gif` (GIFs), `both`. Default: `image`.

**Outputs**

- `count` (number): How many templates were returned.
- `status` (text): Status of the action execution ("success" on success).
- `template_type` (text): What was asked for: image, gif or both.
- `templates` (list): The templates, most captioned first.

**Example output**

```json
{
  "count": 2,
  "status": "success",
  "template_type": "image",
  "templates": [
    {
      "animated": false,
      "box_count": 2,
      "captions": 1573500,
      "height": 1200,
      "name": "Drake Hotline Bling",
      "page_url": "https://imgflip.com/memetemplate/181913649",
      "template_id": "181913649",
      "url": "https://i.imgflip.com/30b1gx.jpg",
      "width": 1200
    },
    {
      "animated": false,
      "box_count": 2,
      "captions": 494750,
      "height": 335,
      "name": "One Does Not Simply",
      "page_url": "https://imgflip.com/memetemplate/61579",
      "template_id": "61579",
      "url": "https://i.imgflip.com/1bij.jpg",
      "width": 568
    }
  ]
}
```

### Make a meme from text

Give Imgflip a phrase and it picks a fitting template from its top 2,048 and writes the phrase on it, as its Slack app does. Short, simple phrases work best. Needs API Premium: the first 50 a month are included, then two cents each.

**Inputs**

- Text (`text`, text, required): The words to put on the meme, which also choose the template, such as 'i missed the bus'.
- Remove the watermark (`remove_watermark`, true/false): Leave Imgflip's small watermark off the meme. Needs API Premium: the first 100 a month are included, then a cent each. Default: `false`.
- Also save the meme as a file (`save_as_file`, true/false): Download the finished meme and keep it as a file, to attach to an email or a message in a later step. The meme's url works on its own wherever a link will do. Default: `false`.

**Outputs**

- `content_type` (text): The saved file's type, such as image/jpeg or video/mp4, or '' when not saved.
- `document_ref` (text): The saved file's document reference, or '' when not saved.
- `documents` (list): The saved meme as a document, ready to attach to a later step. Empty when it was not saved.
- `file_size_bytes` (number): The saved file's size in bytes, or 0 when not saved.
- `file_url` (text): A URL that serves the saved file, or '' when not saved.
- `page_url` (text): The meme's page on imgflip.com.
- `saved_as_file` (true/false): True when the meme was also saved as a file (Also save the meme as a file). The file fields below are empty otherwise.
- `status` (text): Status of the action execution ("success" on success).
- `template_id` (text): The template the meme was made from.
- `url` (text): The finished meme's picture, on i.imgflip.com. Anyone with the link can see it; a meme that is hardly ever viewed is deleted after a while.

**Example output**

```json
{
  "content_type": "",
  "document_ref": "",
  "documents": [],
  "file_size_bytes": 0,
  "file_url": "",
  "page_url": "https://imgflip.com/i/c7d1qz",
  "saved_as_file": false,
  "status": "success",
  "template_id": "181913649",
  "url": "https://i.imgflip.com/c7d1qz.jpg"
}
```

### Make a meme with AI

Have Imgflip's AI write a meme from scratch, on a topic if you give one, on a template you choose or one it picks. The openai model is the default; the classic model learnt from unfiltered public memes and can be crude. Needs API Premium: the first 50 a month are included, then two cents each.

**Inputs**

- Model (`model`, text): Which AI writes the meme. The classic model is Imgflip's own, trained on public memes without filtering. One of: `openai`, `classic`. Default: `openai`.
- Template (`template`, text): Optional: the template to write on, as its ID, a link or a template an earlier step returned. The openai model takes any popular template; the classic model one of the 48 at imgflip.com/ai-meme. Left empty, Imgflip picks one.
- Topic or opening words (`prefix_text`, text): Optional, up to 64 characters. For the openai model, the meme's topic, such as 'Monday mornings'. For the classic model, the words the meme must start with; shorter gives it more room.
- Remove the watermark (`remove_watermark`, true/false): Leave Imgflip's small watermark off the meme. Needs API Premium: the first 100 a month are included, then a cent each. Default: `false`.
- Watermark text (`watermark_text`, text): Optional: what the watermark says. A free account may choose 'imgflip.com' or 'made at imgflip.com'; any other text needs API Premium and counts like removing the watermark.
- Watermark position (`watermark_position`, text): Optional: which corner the watermark goes in, or huge across the middle. One of: `bottom-left` (Bottom left), `bottom-right` (Bottom right), `top-left` (Top left), `top-right` (Top right), `huge`.
- Also save the meme as a file (`save_as_file`, true/false): Download the finished meme and keep it as a file, to attach to an email or a message in a later step. The meme's url works on its own wherever a link will do. Default: `false`.

**Outputs**

- `content_type` (text): The saved file's type, such as image/jpeg or video/mp4, or '' when not saved.
- `document_ref` (text): The saved file's document reference, or '' when not saved.
- `documents` (list): The saved meme as a document, ready to attach to a later step. Empty when it was not saved.
- `file_size_bytes` (number): The saved file's size in bytes, or 0 when not saved.
- `file_url` (text): A URL that serves the saved file, or '' when not saved.
- `page_url` (text): The meme's page on imgflip.com.
- `saved_as_file` (true/false): True when the meme was also saved as a file (Also save the meme as a file). The file fields below are empty otherwise.
- `status` (text): Status of the action execution ("success" on success).
- `template_id` (text): The template the meme was made from.
- `texts` (list): The text the AI wrote, one entry per text box.
- `url` (text): The finished meme's picture, on i.imgflip.com. Anyone with the link can see it; a meme that is hardly ever viewed is deleted after a while.

**Example output**

```json
{
  "content_type": "",
  "document_ref": "",
  "documents": [],
  "file_size_bytes": 0,
  "file_url": "",
  "page_url": "https://imgflip.com/i/d8e2rw",
  "saved_as_file": false,
  "status": "success",
  "template_id": "89370399",
  "texts": [
    "Using a complicated app to remember passwords",
    "Typing them in the Notes app and naming it \"definitely_not_passwords\""
  ],
  "url": "https://i.imgflip.com/d8e2rw.jpg"
}
```

### Search meme templates

Find templates by name among the million or more on Imgflip, including ones its users uploaded, to caption in a later step. Needs API Premium: the first 200 searches a month are included, then half a cent each.

**Inputs**

- Search (`query`, text, required): Words to look for in the templates' names and their other names, such as 'distracted boyfriend'.
- Template type (`template_type`, text): Image templates (the default), GIF templates, or both. A GIF template's picture is a short MP4. One of: `image` (Images), `gif` (GIFs), `both`. Default: `image`.
- Include adult templates (`include_nsfw`, true/false): Also return templates Imgflip marks not safe for work, which may carry adult language or minimal clothing. Default: `false`.

**Outputs**

- `count` (number): How many templates were returned.
- `query` (text): The words searched for.
- `status` (text): Status of the action execution ("success" on success).
- `template_type` (text): What was asked for: image, gif or both.
- `templates` (list): The templates, most captioned first.

**Example output**

```json
{
  "count": 1,
  "query": "one does not simply",
  "status": "success",
  "template_type": "image",
  "templates": [
    {
      "animated": false,
      "box_count": 2,
      "captions": 494750,
      "height": 335,
      "name": "One Does Not Simply",
      "page_url": "https://imgflip.com/memetemplate/61579",
      "template_id": "61579",
      "url": "https://i.imgflip.com/1bij.jpg",
      "width": 568
    }
  ]
}
```
