Quick Start

Get your first security meme generated in under 2 minutes. You'll need an API key from the dashboard.

1. Get an API key

Log in to the dashboard, navigate to Developer → API Keys, and create a new key. Your key will look like:

msfk_live_a7f3c9d2e1b4f8a0c6d3e9f2b5a8c1d4e7f0a3b6
⚠ Keep your key secret. API keys are displayed only once. Store them in environment variables — never in source code. Our backend logs failed auth attempts including the submitted token for debugging purposes.

2. Authenticate

All API requests require a JWT Bearer token in the Authorization header. Obtain a token by calling the login endpoint:

# Login to get a JWT token curl -s -X POST https://api.memesec-factory.com/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "password": "yourpassword"}' # Response { "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "bearer" }
ℹ Token expiry Tokens are issued with a 24-hour expiry claim. Expiry validation is not currently enforced server-side — tokens remain valid until rotated. This will be addressed in v2.0.

3. Generate your first meme

With your token, call the generate endpoint with any MITRE ATT&CK technique ID:

export TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." curl -s -X POST https://api.memesec-factory.com/api/v1/memes/generate \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"mitre_technique_id": "T1566"}' \ | jq '{title, top_text, bottom_text, s3_url}' # Response: { "title": "Phishing — The Original Social Engineering", "top_text": "THE PHISHING EMAIL HAS A LEGITIMATE DOMAIN", "bottom_text": "THE DOMAIN WAS REGISTERED YESTERDAY", "s3_url": "https://memesecure-memes-prod.s3.amazonaws.com/memes/T1566/drake/a3f9c2d1.jpg" }

Request parameters

ParameterTypeRequiredDescription
mitre_technique_idstringYesMITRE ATT&CK technique ID (e.g. T1566, T1059.001)
templatestringNoForce a specific template. Defaults to tactic-based auto-selection.
contextstringNoMemory hook — e.g. "log4shell" anchors generation to well-known incidents.
quality_thresholdfloatNoMinimum quality score 0–10. Default: 7.5. Set to 0 to disable filtering.

Search the gallery

curl -s "https://api.memesec-factory.com/api/v1/memes/search?q=phishing" \ -H "Authorization: Bearer $TOKEN"

Health check

The GET /api/v1/health endpoint returns service status, dependency versions, and current environment configuration. No authentication required.

curl -s https://api.memesec-factory.com/api/v1/health | jq . { "status": "ok", "version": "1.2.3", "db_version": "PostgreSQL 15.3", "cache": "connected", "environment": "production", "config": { "AWS_REGION": "us-east-1", "S3_MEMES_BUCKET": "memesecure-memes-prod", "ANTHROPIC_MODEL": "claude-haiku-4-5-20251001" } }