Skip to main content
Connect Lovable-generated apps to Memvid through backend actions that call the Memvid API.
API-based integration. This guide uses https://api.memvid.com directly (no SDK and no local .mv2 file).

Prerequisites

  • A Memvid API key (mv2_...)
  • A Lovable project with backend/server function support

Setup

  1. Add MEMVID_API_KEY to your environment variables.
  2. Add MEMVID_API_BASE as https://api.memvid.com (optional, but recommended).
  3. Keep API calls server-side to avoid exposing your key.

Backend API Helper (lib/memvid.ts)

Backend Action Example (actions/askMemory.ts)

Bootstrap Action Example (actions/bootstrapMemory.ts)

  • Provision or select a memory for your app/project.
  • Ingest docs from your app data (JSON text, files, or URLs).
  • Use find for retrieval cards/lists in UI.
  • Use ask for synthesized answers with sources.

Endpoints You Will Use Most

  • POST /v1/memories
  • POST /v1/memories/:id/documents
  • POST /v1/memories/:id/find
  • POST /v1/memories/:id/ask

Smoke Test

  1. Run your bootstrap action and save memoryId.
  2. Call your ask action with:
  1. Verify answer text and at least one source snippet are returned.