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
| Name | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number (1-indexed) |
limit | number | 50 | Items per page (max 100) |
searchoptional | string | - | Search in tags |
tagsoptional | string | - | Comma-separated tags to filter |
include_nsfw | boolean | false | Include 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
400Bad Request
Invalid parameters or missing required fields
{
"success": false,
"error": "Invalid page number. Must be >= 1"
}401Unauthorized
Missing or invalid API key
{
"success": false,
"error": "API key not provided"
}403Forbidden
API key is deactivated or suspended
{
"success": false,
"error": "API key is inactive"
}404Not Found
Template or resource not found
{
"success": false,
"error": "Template not found"
}429Too Many Requests
Rate limit exceeded
{
"success": false,
"error": "Rate limit exceeded",
"remaining": 0,
"reset_at": "2025-12-10T00:00:00Z"
}500Internal 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
| Field | Type | Description |
|---|---|---|
id | number | Template ID (1-indexed) |
thumbnail | string | Full thumbnail URL from CDN |
url | string | Full WebP image URL from CDN |
width | number | Image width in pixels |
height | number | Image height in pixels |
tags | string[] | Array of tags associated with template |
isNsfw | boolean | Whether template is marked as NSFW |
Need Help?
If you have questions or need support, reach out to us: