# Ai Meme Generator (`calm_necessity/ai-meme-generator`) Actor

Generate fun, trending memes using AI from text prompts or base images. This Actor creates custom memes at scale with captions, styles, and templates via simple API integration — perfect for social media, content automation, and marketing.

- **URL**: https://apify.com/calm_necessity/ai-meme-generator.md
- **Developed by:** [Taher Ali Badnawarwala](https://apify.com/calm_necessity) (community)
- **Categories:** AI, Social media, Automation
- **Security:** Limited permissions
- **Stats:** 21 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<header>

## AI Meme Generator

<p><strong>Text-to-meme API</strong> that turns a short description into a ready-to-use meme image. Send one prompt and get back a direct image URL with metadata. Designed for developers, creators, and teams who want fast, automated meme generation without design tools.</p>

<blockquote>
  <strong>What it does:</strong> Send a text prompt (for example <em>"Mondays be like"</em> or <em>"Cat at keyboard, corporate humor"</em>) and receive a generated meme image URL in seconds.
</blockquote>

</header>

***

### TL;DR

- **Input:** One text prompt
- **Output:** Meme image URL + metadata
- **Use it for:** Social posts, automation, thumbnails, testing
- **Result time:** Usually under 20 seconds

***

### Table of contents

- [Try it now](#try-it-now)
- [Overview](#overview)
- [Usage examples](#usage-examples)
- [Features](#features)
- [Configuration](#configuration)
- [Usage](#usage)
- [Output](#output)
- [For bloggers & tutorial writers](#for-bloggers--tutorial-writers)
- [Integration](#integration)
- [Technical details](#technical-details)
- [FAQ](#faq)
- [Resources](#resources)

***

### Try it now

| Action | Link |
|------|------|
| **Run in Apify Console** | Open Actor → Start |
| **API (sync)** | `POST https://api.apify.com/v2/acts/YOUR_USERNAME~ai-meme-generator/run-sync` |

<em>Replace <code>YOUR_USERNAME</code> with your Apify username.</em>

***

### Overview

The **AI Meme Generator** creates memes from plain text using the MultipleWords AI engine. You describe the situation or humor style, and the Actor returns a generated meme image URL and structured metadata.

This Actor is useful when you need memes on demand, at scale, or as part of an automated workflow.

#### Common use cases

| Category | Examples |
|-------|---------|
| Content | Blogs, YouTube thumbnails, social posts |
| Marketing | Campaign visuals, community engagement |
| Automation | Scheduled memes, bots, workflows |
| Development | Mock data, demos, internal tools |

> **Note:** Usage rights depend on the upstream API and your Apify plan. Review terms before commercial use.

***

### Usage examples

Paste these into the **Prompt** field or API input.

| Scenario | Prompt |
|-------|--------|
| Monday mood | `Mondays be like` |
| Developer life | `Developer debugging at 3am, tired but focused` |
| Office humor | `Meeting that could have been an email` |
| Remote work | `Cat pretending to work at a laptop, corporate humor` |
| Exams | `Student the night before exam, panic mode` |

***

### Features

- Text-to-meme generation from a single prompt
- Clean JSON output for easy integration
- Works in bulk via API
- Input validation and retries
- Runs fully on Apify (Console, API, automation tools)

***

### Configuration

All settings are provided via the Actor input.

#### Input parameters

| Parameter | Type | Required | Default | Description |
|--------|------|----------|--------|------------|
| `prompt` | string | Yes | — | Text description of the meme |
| `userId` | number | No | `663559` | Internal API user identifier |
| `isPro` | number | No | `0` | `0` = free, `1` = pro |

#### Prompt tips

- Mention context (work, school, tech)
- Describe tone (funny, sarcastic, relatable)
- Add visual hints if needed

#### Example input

```json
{
  "prompt": "Cat sitting at keyboard pretending to work",
  "isPro": 0
}
```

***

### Usage

#### Apify Console

1. Open the Actor in Apify Console.
2. Enter a prompt in the **Prompt** field (or use the default).
3. Click **Start** and check the **Output** tab for the meme URL and metadata.

#### API (run-sync)

Replace `YOUR_USERNAME` with your Apify username and `YOUR_API_TOKEN` with your [Apify API token](https://console.apify.com/account/integrations).

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~ai-meme-generator/run-sync?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Mondays be like."}'
```

Response includes `runId`, `status`, and dataset items with `imageUrl` and `imageDescription`.

***

### Output

Each run writes one or more items to the default dataset. Each item looks like:

| Field | Description |
|-------|-------------|
| `imageUrl` | Direct URL of the generated meme image |
| `imageDescription` | Description of the image |
| `generatedImage` | Full API response (id, timestamps, etc.) |

#### Example output (dataset item)

```json
{
  "status": 1,
  "imageUrl": "https://example.com/generated-meme.png",
  "imageDescription": "A meme about Mondays.",
  "generatedImage": {
    "id": 12345,
    "image_url": "https://example.com/generated-meme.png",
    "image_description": "A meme about Mondays.",
    "image_name": "meme.png",
    "url_slug": "meme-12345"
  }
}
```

In the Apify Console **Output** tab you can open **Image URL** as a link or copy it for use in posts, thumbnails, or automation.

***

### For bloggers & tutorial writers

You can use this Actor in tutorials, blog posts, or videos without running it first:

- **Input:** Use the [Example input](#example-input) or [Usage examples](#usage-examples) table.
- **Output:** Use the [Example output](#example-output-dataset-item) above to show what users get.
- **API:** Use the [API (run-sync)](#api-run-sync) curl example; remind readers to replace `YOUR_USERNAME` and `YOUR_API_TOKEN`.

For promotion ideas, copy-paste posts, and where to share, see [PROMOTION.md](PROMOTION.md) in this repo.

***

### Integration

- **Make (Integromat)** — Use the Apify module and select this Actor; map your prompt to the **Prompt** input.
- **Zapier** — Use the Apify Zapier app and choose "Run Actor"; select this Actor and pass the prompt.
- **Custom apps** — Call the Apify API (`/run` or `/run-sync`) with the same input JSON.

***

### Technical details

- **Runtime:** Node.js (see [Dockerfile](Dockerfile)).
- **Input:** Validated against the input schema; invalid input returns a clear error.
- **External API:** Uses MultipleWords AI for image generation; failures are retried with backoff.

***

### FAQ

**How long does a run take?**\
Usually under 20 seconds for a single prompt.

**Can I run multiple prompts in one go?**\
Yes. Send an array of prompts or run the Actor multiple times (e.g. from a workflow). Each run can process one prompt; for bulk, use the API or automation tools.

**Where is the image stored?**\
The image is hosted by the upstream API. The Actor returns the URL; you can download or hotlink it.

**Do I need an API key for the meme API?**\
The Actor uses its own integration; you only need your Apify account and (for API calls) your Apify API token.

***

### Resources

- [Apify Console](https://console.apify.com) — Run the Actor and view datasets
- [Apify API](https://docs.apify.com/api/v2) — Run actors programmatically
- [PROMOTION.md](PROMOTION.md) — How to promote this Actor and grow your user base

# Changelog

This Actor's version history is a separate document: https://apify.com/calm_necessity/ai-meme-generator/changelog.md

# Actor input Schema

## `prompt` (type: `string`):

Text prompt describing the meme to generate (e.g., 'Mondays be like.')

## Actor input object example

```json
{
  "prompt": "Mondays be like."
}
```

# Actor output Schema

## `memes` (type: `string`):

Dataset of generated meme images with URLs and descriptions

## `dataset` (type: `string`):

Complete dataset (all fields) as JSON

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("calm_necessity/ai-meme-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("calm_necessity/ai-meme-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call calm_necessity/ai-meme-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,calm_necessity/ai-meme-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/BUPstwdZ7300LCny4/builds/TrM8wUdYzF7UfJBcU/openapi.json
