# MemeFlow — Complete Technical Reference for Developers & AI Agents (`llms-full.txt`) > Authoritative documentation for search engines, AI assistants, LLM crawlers, and software engineers integrating MemeFlow to monetize platform content or publish creator media. --- ## 1. What is MemeFlow & How Does It Work? **MemeFlow** is a multi-format creator publishing and partner content monetization platform: 1. **For Creators**: - Upload single files or combine multiple mixed files in one post: **Articles & Breaking News, Studio Audio (WAV/MP3/FLAC), Videos (MP4), Images/Memes, PDFs, Documents, and ZIP Archives**. - MemeFlow generates a shareable **Smart Link** (`/m/{slug}`) optimized for WhatsApp, Telegram, X/Twitter, Facebook, Discord, and Google Search. - Visitors opening `/m/{slug}` pass through the **Sponsor Gate** (Stage 1) and click through to the **Full Content Viewer** (`/m/{slug}/view`, Stage 2) where they can read, watch, listen, or download every attached file. - Creators earn standard **80% of net Google AdSense revenue** (previously 70%) generated by legitimate human visits to their Smart Links. 2. **For External Platforms & Developers ("Double-Monetization" via MemeFlow Connect API)**: - External platforms (news sites, music/stem sharing tools, meme generators, file/ROM/document hosts, video clip apps) integrate the **MemeFlow Connect API (`v1`)**. - **How Platform Monetization Works**: - Your users discover content on your platform (where you keep **100% of your own site's ad or subscription revenue**). - When a user clicks **"Download"**, **"Listen in Full Quality"**, **"Watch HD"**, or **"Read Full Story"**, your backend calls the MemeFlow API to register a Browser-Local Partner Delivery Session (10-minute session) or Permanent post and redirects/links the user to the returned MemeFlow Smart Link (`https://creator-connect-earn.lovable.app/m/{slug}`). - MemeFlow serves the Sponsor Gate and Content Viewer/Download page with Google AdSense monetization and credits standard **80% of the net ad revenue** (or your application's negotiated percentage) directly to your Partner Developer Ledger (MemeFlow retains a 20% platform service fee). - **No Storage Bloat (Browser-Local Delivery)**: - Partner content is delivered through a temporary browser-local delivery session (`delivery_mode: "browser_local"`). MemeFlow retains only the server metadata required for delivery authorization, attribution, analytics, idempotency, and audit. 3. **Editorial, Safety & Monetization Rules**: - **Google AdSense Policy Separation**: If an individual post is flagged as `AD_RESTRICTED` or `AD_DISABLED`, post-page ads on `/m/{slug}/view` are disabled while the content remains accessible unless removed for severe policy violations. - **No Fake Financial Promises**: MemeFlow never promises fixed payouts per view; all revenue comes from real Google AdSense monetization reconciled into an immutable double-entry financial ledger. - **Privacy Policy, Anti-Bot Security & Official Support**: - **Official Support Email**: `memeflowsupport@gmail.com` (for creator account help, partner API integration, copyright/DMCA notices, and privacy inquiries). - **Canonical Privacy & Security URL**: `https://creator-connect-earn.lovable.app/privacy` - **Anti-Bot & Attack Protection**: Multi-layered honeypot traps, automated scraper/attack client detection, payload sanitization (XSS/SQLi), and brute-force rate limiting protect `/auth`, `/reset-password`, `/m/{slug}`, `/m/{slug}/view`, and `/api/v1/*`. --- ## 2. Authentication, Security & Rate Limits - **API Base URL**: `https://creator-connect-earn.lovable.app` - **API Key Format**: `mf_live_` (or `mf_test_`) - **Accepted Auth Headers**: - `Authorization: Bearer YOUR_MEMEFLOW_API_KEY` - `x-api-key: YOUR_MEMEFLOW_API_KEY` - **Idempotency**: - Header: `Idempotency-Key: ` (or `idempotency_key` JSON body field on partner routes) - Supported on `POST /api/v1/posts`, `POST /api/v1/links`, `POST /api/v1/posts/temporary`, `POST /api/v1/partner/action`, `POST /api/v1/partner/content`, and `POST /api/v1/partner/content/resolve`. - **Rate Limiting**: - Default limit: **120 requests per minute** per API key (30 uploads/min, 2,000 requests/hour). - Response headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `Retry-After`. - **Financial Tampering Protection**: - Client requests cannot override `earnings`, `creator_share`, `platform_share`, `revenue_split`, or `monetization_rate`. All revenue splits (standard 80% Partner/Creator / 20% MemeFlow, with negotiated developer application rates) are enforced server-side. --- ## 3. REST API v1 Endpoint Reference ### 3.1 Verify API Key & Application Status `GET /api/v1/auth/verify` **Response (`200 OK`)**: ```json { "success": true, "developer_id": "dev_...", "developer_name": "Partner Studio", "developer_status": "active", "application_id": "app_...", "application_name": "Partner Application", "application_status": "active", "key_prefix": "mf_live_", "environment": "live", "permissions": ["posts:create", "posts:read", "media:upload", "links:create", "analytics:read"], "rate_limit": { "limit": 120, "remaining": 119, "reset": 1789491060 } } ``` ### 3.2 Create a Browser-Local Temporary Partner Delivery Session `POST /api/v1/posts/temporary` Partner content is delivered through a temporary browser-local delivery session (`delivery_mode: "browser_local"`). MemeFlow retains only the server metadata required for delivery authorization, attribution, analytics, idempotency, and audit. **Request Body**: ```json { "partner_content_id": "track-export-99281", "content_version": "1.0", "title": "Afrobeats Studio Stem Pack (48kHz WAV)", "caption": "Download the full 24-bit studio stems on MemeFlow.", "action_type": "download", "category": "Music", "tags": ["afrobeats", "stems", "wav"], "media": [ { "media_url": "https://cdn.example.com/audio/afrobeats-stems.wav", "media_type": "audio", "file_name": "afrobeats-stems.wav" } ] } ``` **Response (`201 Created`)**: ```json { "success": true, "status": "active", "delivery_mode": "browser_local", "temporary_post_id": "9f8c7b6a-...", "post_id": "9f8c7b6a-...", "smart_link": "https://creator-connect-earn.lovable.app/m/xK92mPq1", "slug": "xK92mPq1", "expires_at": "2026-09-30T18:10:00.000Z" } ``` ### 3.3 Create a Permanent Multi-File Post `POST /api/v1/posts` **Request Body**: ```json { "title": "Breaking Tech Story & Audio Briefing", "caption": "Full story text or summary notes...", "category": "Technology", "tags": ["tech", "briefing"], "media": [ { "media_url": "https://cdn.example.com/audio/briefing-master.wav", "media_type": "audio", "file_name": "briefing-master.wav", "file_size": 14200000, "audio_metadata": { "isMultiTrack": true, "sampleRate": 48000, "bitDepth": 24, "channels": 2 } } ] } ``` **Response (`201 Created`)**: ```json { "success": true, "data": { "post_id": "3a1b2c4d-...", "smart_link": "https://creator-connect-earn.lovable.app/m/aB3dE5fG", "smart_link_slug": "aB3dE5fG" } } ``` ### 3.4 Resolve & Register Partner Content (`browser_local`) - `POST /api/v1/partner/content/resolve` — Check whether an active browser-local delivery session exists for `(partner_content_id, content_version)`. - `POST /api/v1/partner/content` — Register partner-hosted HTTPS `media_url` / `media[]` descriptors for a 10-minute browser-local delivery session. - `POST /api/v1/partner/action` — Execute a partner action (`view`, `download`, `watch`, `listen`, `save`, `open`, `export`, `share`). ### 3.5 Generate or Resolve Smart Links - `POST /api/v1/links` — Generate a Smart Link for an existing `post_id` using optional `slug` (`201 Created` on new link, `200 OK` on existing link). - `GET /api/v1/links` — List Smart Links belonging to the authenticated application. - `GET /api/v1/links/{slug}` — Resolve Smart Link status, canonical URL, and post metadata. ### 3.6 Presigned Media Uploads - `POST /api/v1/media` — Request a presigned upload target (`201 Created`) for images, videos, audio (`audio/wav`, `audio/mpeg`), PDFs (`application/pdf`), or ZIP archives (`application/zip`). Pass the returned `public_url` as `media_url` when creating posts. ### 3.7 Partner Analytics & Storage Telemetry - `GET /api/v1/analytics` — Returns partner link visits, unique visitors, active browser-local session metrics, cleanup counters, and attributed revenue metrics. ### 3.8 Webhooks (`HMAC-SHA256`) - `GET / POST / PATCH / DELETE /api/v1/webhooks` — Manage webhook endpoints for `post.created`, `post.published`, `post.updated`, `post.restricted`, `post.removed`, `smart_link.created`, `smart_link.visited`, `monetization.updated`, `earnings.updated`, `earnings.finalized`, and `payout.updated`. - Every webhook delivery includes `X-MemeFlow-Signature: t=,v1=` where `v1` is the hex-encoded HMAC-SHA256 digest of `${timestamp}.${rawBody}` signed with your `MEMEFLOW_WEBHOOK_SECRET`. --- ## 4. Reference TypeScript SDK Client ```typescript export class MemeFlowClient { private apiKey: string; private baseUrl: string; constructor(config?: { apiKey?: string; baseUrl?: string }) { this.apiKey = config?.apiKey || process.env.MEMEFLOW_API_KEY || ""; this.baseUrl = ( config?.baseUrl || process.env.MEMEFLOW_API_BASE_URL || "https://creator-connect-earn.lovable.app" ).replace(/\/$/, ""); } async createPartnerSession(params: { partnerContentId: string; contentVersion?: string; title: string; mediaUrl: string; action?: "view" | "download" | "listen"; category?: string; }) { const res = await fetch(`${this.baseUrl}/api/v1/partner/content`, { method: "POST", headers: { Authorization: `Bearer ${this.apiKey}`, "x-api-key": this.apiKey, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID(), }, body: JSON.stringify({ partner_content_id: params.partnerContentId, content_version: params.contentVersion || "1.0", title: params.title, media_url: params.mediaUrl, action: params.action || "download", category: params.category || "General", }), }); if (!res.ok) throw new Error(`MemeFlow API error: ${res.status}`); return res.json() as Promise<{ status: "active"; post_id: string; smart_link: string; expires_at: string; delivery_mode: "browser_local"; }>; } } ```