API Documentation

Complete guide to integrating MemeBox API into your project

Quick Start

1. Get Your API Key

Sign up for a free account and generate your API key from the API Keys.

2. Make Your First Request

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.memebox.dev/api/templates?limit=5"

Authentication

All API endpoints require authentication using an API key. Include your key in the request header:

X-API-Key: YOUR_API_KEY

ℹ️DEV vs PROD Keys

  • DEV keys (mf_dev_...): 20 static templates for testing (no R2 traffic)
  • PROD keys (mf_...): Full access to 9,148 templates via CDN

Rate Limiting & Pricing

Free

$0
100 requests/day
  • API key
  • All templates
  • Basic support

Basic

$9.99/month + $0.005/call
200 free API calls/month
  • Pay-as-you-go
  • No daily limits
  • Priority support

Premium

$29.99/month + $0.004/call
1,000 free API calls/month
  • High volume
  • Premium support
  • Advanced analytics

Pagination

All list endpoints return pagination information including next and prev URLs:

{
  "success": true,
  "data": [...],
  "total": 9148,
  "page": 2,
  "limit": 50,
  "next": "https://api.memebox.dev/api/templates?page=3&limit=50",
  "prev": "https://api.memebox.dev/api/templates?page=1&limit=50"
}

next: URL for the next page (null if last page)

prev: URL for the previous page (null if first page)

API Endpoints

Retrieve a paginated list of meme templates with optional filtering.

Parameters

NameTypeDefaultDescription
pagenumber1Page number (1-indexed)
limitnumber50Items per page (max 100)
searchoptionalstring-Search in tags
tagsoptionalstring-Comma-separated tags to filter
include_nsfwbooleanfalseInclude NSFW content

Example Request

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.memebox.dev/api/templates?page=1&limit=20&tags=funny"

Example Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "thumbnail": "https://cdn.memebox.dev/thumbnails/5215730282_thumb.webp",
      "url": "https://cdn.memebox.dev/webp/5215730282.webp",
      "width": 800,
      "height": 600,
      "tags": ["anime", "pokemon", "sad"],
      "isNsfw": false
    }
  ],
  "total": 9148,
  "page": 1,
  "limit": 20,
  "next": "https://api.memebox.dev/api/templates?page=2&limit=20",
  "prev": null
}

Error Responses

400
Bad Request
Invalid parameters or missing required fields
{
  "success": false,
  "error": "Invalid page number. Must be >= 1"
}
401
Unauthorized
Missing or invalid API key
{
  "success": false,
  "error": "API key not provided"
}
403
Forbidden
API key is deactivated or suspended
{
  "success": false,
  "error": "API key is inactive"
}
404
Not Found
Template or resource not found
{
  "success": false,
  "error": "Template not found"
}
429
Too Many Requests
Rate limit exceeded
{
  "success": false,
  "error": "Rate limit exceeded",
  "remaining": 0,
  "reset_at": "2025-12-10T00:00:00Z"
}
500
Internal Server Error
Something went wrong on our end
{
  "success": false,
  "error": "Internal server error"
}

Webhooks (Coming Soon)

Webhooks allow you to receive real-time notifications when certain events occur. We're currently working on webhook support for:

  • api.key.usage_limit - When your API key approaches its usage limit
  • api.key.deactivated - When your API key is deactivated
  • subscription.updated - When your subscription status changes
  • payment.succeeded - When a payment is successfully processed

Coming in Q1 2026: Full webhook support with custom endpoints and event filtering.

Template Schema

FieldTypeDescription
idnumberTemplate ID (1-indexed)
thumbnailstringFull thumbnail URL from CDN
urlstringFull WebP image URL from CDN
widthnumberImage width in pixels
heightnumberImage height in pixels
tagsstring[]Array of tags associated with template
isNsfwbooleanWhether template is marked as NSFW

Need Help?

If you have questions or need support, reach out to us: