Skip to content

Vibe Coder Guide

Ready-to-use prompts for AI coding tools. Just copy, paste into your favorite AI assistant, and go.

In plain terms

Use these pre-written prompts with AI assistants (Lovable, Cursor, Bolt, Replit) to generate liveness detection code. Copy the prompt, paste it into your AI tool, add your API key, and you get a working integration. No manual coding required.

How to Use This Guide

1. Copy the Prompt

Find the prompt for your AI tool and click the copy button.

2. Paste & Generate

Paste into Lovable, Cursor, Bolt, or your preferred AI tool.

3. Add Your API Key

Replace the placeholder with your Moveris API key and you're done!

Quick Reference

Setting Value
Base URL https://api.moveris.com
Endpoint /api/v1/fast-check
Frames Required Depends on model (e.g. 10 for mixed-10-v2, 30 for mixed-30-v2) @ ~10 FPS
Response JSON envelope: success, message, and data (verdict, scores, etc.) — see Errors

Prompts by AI Tool

Lovable

Lovable
Add Moveris liveness detection to my app.

Requirements:
- Create a React component with webcam access using getUserMedia
- Capture frames at ~10 FPS (count = model min_frames, e.g. 10 for mixed-10-v2, 30 for mixed-30-v2)
- Encode frames as base64 PNG
- Send to https://api.moveris.com/api/v1/fast-check
- Use X-API-Key header for authentication
- Display verdict (live/fake) and confidence score
- Handle loading and error states

Request body format:
{
  session_id: crypto.randomUUID(),
  source: "live",
  model: "mixed-10-v2",
  frames: [{ index, timestamp_ms, pixels }]
}

Important: API calls should go through a backend/edge function to protect the API key.

Cursor / GitHub Copilot

Cursor / GitHub Copilot
Create a liveness detection integration with Moveris API (v2).

Tech stack: React with TypeScript
API endpoint: POST https://api.moveris.com/api/v1/fast-check
Auth: X-API-Key header

Requirements:
1. Capture frames (count matches model, e.g. 10 for mixed-10-v2, 30 for mixed-30-v2) at ~10 FPS from webcam
2. Encode each frame as base64 PNG data URL
3. Generate unique session_id using crypto.randomUUID()

Request body structure:
{
  session_id: string,
  source: "live",
  model: "mixed-10-v2",
  frames: [
    { index: number, timestamp_ms: number, pixels: string }
  ]
}

Response structure (HTTP JSON envelope — read `data` for the result):
{
  success: boolean,
  message: string,
  data: {
    verdict: "live" | "fake",
    confidence: number (0-100),
    real_score: number (0.0-1.0),
    score: number (0-100)
  } | null,
  errors: array (when success is false)
}

Generate a complete, production-ready implementation with:
- Custom React hook for reusability
- Proper error handling for 401, 429, and 500 errors
- Loading states and user feedback
- TypeScript interfaces for type safety

Bolt

Bolt
Build a webcam liveness verification feature using Moveris API.

Steps:
1. Access user's camera with getUserMedia
2. Show live camera preview
3. On button click, capture frames (e.g. 10 for mixed-10-v2) over ~1 second
4. Send frames to https://api.moveris.com/api/v1/fast-check
5. Show live/fake result with confidence percentage

API Details:
- Method: POST
- Header: X-API-Key: (use environment variable)
- Body: { session_id: UUID, source: "live", model: "mixed-10-v2", frames: [{index, timestamp_ms, pixels}] }
- Response: JSON envelope with `data.verdict`, `data.score` / confidence fields (see API reference)

Include a nice UI with:
- Camera preview with face guide overlay
- "Verify" button with loading state
- Result display showing verdict and confidence
- Error handling with user-friendly messages

Replit / Python

Replit / Python
Create a Python Flask API endpoint for liveness detection using Moveris.

Endpoint: POST /verify-liveness
Accept: multipart/form-data with image files (count = model min_frames, e.g. 10 for mixed-10-v2)

Implementation:
1. Receive uploaded image files (count matches model)
2. Convert each to base64 PNG
3. Call Moveris API at https://api.moveris.com/api/v1/fast-check
4. Return the verdict and confidence

Moveris request format:
{
  "session_id": "uuid-string",
  "source": "live",
  "model": "mixed-10-v2",
  "frames": [
    {"index": 0, "timestamp_ms": 0, "pixels": "data:image/png;base64,..."}
  ]
}

Use X-API-Key header with API key from environment variable.
Parse Moveris JSON: check `success`, then use `data` for verdict/scores; on failure use `message` / `errors`. Your Flask response can mirror that or unwrap `data` for the client.

Key Concepts Explained

What's a session_id?

A unique ID for each verification attempt. Just use crypto.randomUUID() — it generates one automatically! Each liveness check should have its own session_id.

What's base64?

A way to turn images into text so they can be sent in JSON. The code examples handle this automatically using canvas.toDataURL() or similar methods.

Why multiple frames?

Moveris analyzes multiple frames to detect subtle signs of life. Frame count varies by model: 10 for mixed-10-v2 (fastest), 30 for mixed-30-v2 (recommended), and so on. Capture at ~10 FPS.

What's the verdict?

Inside the response data object, the API returns either "live" (real person) or "fake" (spoofing attempt), along with scores (see field names in the Fast Check reference).


Customization Prompts

Add these to your chat to enhance your implementation:

Add retry logic for rate limiting

Add exponential backoff retry logic to handle 429 rate limit errors. Retry up to 3 times with increasing delays.

Use faster crops endpoint

Switch to the /fast-check-crops endpoint with MediaPipe face detection. Crop faces to 224x224 before sending for faster processing.

Add backend API proxy

Create a backend/edge function to proxy Moveris API calls. The frontend should call our backend, which adds the API key and forwards to Moveris. This protects our API key.

Support mobile camera

Update the camera component to use the front-facing camera by default on mobile devices. Add facingMode: "user" to the getUserMedia constraints.

Add face detection overlay

Add a face detection overlay using MediaPipe that shows a bounding box around the detected face. Only enable the verify button when a face is detected.

Troubleshooting Prompts

Getting 401 Unauthorized errors

Debug my Moveris API integration. I'm getting 401 errors. Check that the X-API-Key header is being sent correctly and the API key format is valid (should start with sk-).

API is slow or timing out

Optimize my liveness check for speed. Switch to the /fast-check-crops endpoint, add request timeout handling, and show a progress indicator to users.

Camera not working on mobile

Fix mobile camera access issues. Ensure we're requesting camera permissions correctly, using HTTPS (required for getUserMedia), and handling permission denied gracefully.

Need More Details?

These prompts cover the basics. For advanced implementations, check out our detailed code examples: