API documentation
The public v1 contract: authentication, endpoints, request/response shapes, and error handling. Interactive exploration is also available under the “Public API v1” tags on /swagger.
Authentication
All requests use HTTP Bearer auth with a personal API key: Authorization: Bearer mk_live_…. Create keys in the app’s Developer page; the secret is displayed once at creation time and stored only as a hash afterwards. Revocation takes effect immediately.
POST /api/v1/memes/generate
Body: { "text": "your prompt", "language": "en" } — language optional, ISO code from the supported list.
Response 200: { "albumId": number | null, "memes": ["https://…png"], "remainingCredits": number }. URLs are permanent Cloudinary CDN links to fully rendered images. An empty memes array means nothing was generated and no credit was charged.
POST /api/v1/memes/captions
Same input, no rendering: response memes carry templateUrl plus textElements — content, x/y centers as percentages of the image, fontSize as a ratio of image height, color, bold, italic, and fontFamily. Geometry is resolution-independent; render it anywhere and it stays correct.
GET /api/v1/templates/search?query=drake
Free keyword search over Active templates matched against name, description, and emotion tags. Response: { "templates": [{ "name", "url", "pixelWidth", "pixelHeight" }] }, capped at 25 results ordered by usage.
Errors
Every failure — validation, auth, quota, server — returns one shape: { "status", "message", "correlationId", "timestamp" }. A 402 signals an empty balance before any work happens; 401 covers missing, malformed, unknown, or revoked keys.