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
- Add
MEMVID_API_KEYto your environment variables. - Add
MEMVID_API_BASEashttps://api.memvid.com(optional, but recommended). - 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)
Recommended Flow
- Provision or select a memory for your app/project.
- Ingest docs from your app data (JSON text, files, or URLs).
- Use
findfor retrieval cards/lists in UI. - Use
askfor synthesized answers with sources.
Endpoints You Will Use Most
POST /v1/memoriesPOST /v1/memories/:id/documentsPOST /v1/memories/:id/findPOST /v1/memories/:id/ask
Smoke Test
- Run your bootstrap action and save
memoryId. - Call your ask action with:
- Verify answer text and at least one source snippet are returned.