API Reference
Use the vem API to push snapshots, pull memory, and run search across your project history.
Local dev: http://localhost:3002
Hosted: use your deployed API base URL.
All endpoints require Authorization: Bearer <api-key>. Generate keys in API Keys.
Headers
Authorization: Bearer $VEM_API_KEY
Content-Type: application/jsonAPI keys are scoped to an org and user, which allows seat enforcement and audit logging on writes.
Endpoints
Health check
Returns a simple service status string.
Request
curl http://localhost:3002/Response
vem Search API Active (Secured)Search tasks
Returns up to 10 matching tasks scoped to the current org.
Request
curl \
-H "Authorization: Bearer $VEM_API_KEY" \
"http://localhost:3002/search?q=auth"Response
{
"results": [
{
"id": "uuid",
"title": "Implement auth flow",
"status": "in-progress",
"priority": "high",
"external_id": "TASK-101"
}
]
}Push snapshot
Uploads local .vem memory to the cloud. project_id, git_hash, and snapshot_hash are required.
Request
curl \
-H "Authorization: Bearer $VEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": "project-id",
"repo_url": "git@github.com:org/repo.git",
"base_version": "snapshot-id",
"git_hash": "abc123",
"snapshot_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"tasks": { "tasks": [] },
"context": "",
"decisions": "",
"changelog": "",
"current_state": ""
}' \
http://localhost:3002/snapshotsResponse
{
"success": true,
"version": "snapshot-id"
}Pull latest snapshot
Fetches the most recent snapshot within your retention window.
Request
curl \
-H "Authorization: Bearer $VEM_API_KEY" \
"http://localhost:3002/snapshots/latest?repo_url=git@github.com:org/repo.git"Response
{
"snapshot": {
"tasks": { "tasks": [] },
"context": "",
"decisions": "",
"changelog": "",
"current_state": ""
},
"version": "snapshot-id"
}Ask a question
Asks an AI-powered question against the project memory, code, and diffs.
Request
curl \
-X POST \
-H "Authorization: Bearer $VEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "question": "What is the auth flow?", "path": "src/lib/auth" }' \
"http://localhost:3002/projects/project-id/ask"Response
{
"answer": "The auth flow uses Supabase Auth...",
"citations": [{ "id": "DOC-1", "reason": "Found in src/lib/auth.ts" }],
"thread_id": "uuid"
}Trigger reindex
Triggers a full or incremental reindex of the repository code via the GitHub integration.
Request
curl \
-X POST \
-H "Authorization: Bearer $VEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mode": "incremental" }' \
"http://localhost:3002/projects/project-id/reindex"Response
{ "success": true, "indexer": { "job_id": "uuid" } }List snapshots
Lists recent snapshots for a project (up to 50).
Request
curl \
-H "Authorization: Bearer $VEM_API_KEY" \
"http://localhost:3002/projects/project-id/snapshots"Response
{
"snapshots": [
{
"id": "snapshot-id",
"created_at": "2026-01-10T12:00:00.000Z",
"git_hash": "abc123",
"snapshot_hash": "e3b0...b855",
"status": "pending",
"verification_reason": "pending_no_matching_snapshot"
}
]
}Snapshot payload notes
Send base_version to avoid overwriting newer snapshots. A mismatch returns 409.
Each snapshot must include deterministic snapshot_hash. Webhook verification promotes pending snapshots to verified when commit linkage matches.
Requests containing likely secrets are rejected with 400 and a list of matches.