POST
/api/meme$0.03🎨 Meme Generator
Create memes by overlaying text on popular meme templates or custom images. Supports top and bottom text with classic Impact font styling. Choose from built-in templates or supply your own image URL.
Request Body
Response Fields
Code Examples
cURL
bash
curl -X POST https://sparkforge.sh/api/meme \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-token>" \
-d '{
"topText": "When you deploy on Friday",
"bottomText": "And it works",
"template": "drake"
}'Python
python
import requests
response = requests.post(
"https://sparkforge.sh/api/meme",
headers={"Content-Type": "application/json", "X-PAYMENT": "<token>"},
json={"topText": "When you deploy on Friday", "bottomText": "And it works", "template": "drake"}
)
data = response.json()
print(data["url"])TypeScript / Node.js
typescript
const res = await fetch402("https://sparkforge.sh/api/meme", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
topText: "When you deploy on Friday",
bottomText: "And it works",
template: "drake",
}),
});
const { url } = await res.json();Example Response
json
{
"url": "https://cdn.sparkforge.sh/memes/abc123.jpg",
"template": "drake"
}💳 Payment via x402
This endpoint costs $0.03 per call, paid in USDC on Base, Polygon, or Solana. Use the @x402/fetch library to handle payments automatically, or implement the x402 handshake manually.
bash
# Free demo mode (no payment)
curl https://sparkforge.sh/api/meme?demo=true
# Or try via MCP (Claude Desktop, Cursor, Windsurf)
# Add to mcp config: { "url": "https://sparkforge.sh/api/mcp" }