Getting Start Guide

Get Started with ZKAuth

Build your first secure application with zero-knowledge proof authentication in minutes.

The latest local 1000-run benchmark reports 446.878 ms mean proof-plus-controller login time with zero failures. Hosted calls can be slower because they include Vercel cold starts, dashboard proxy work, and remote database latency.

Your First Authentication

Complete authentication flow in just a few lines of code

Complete Authentication Flow

Register and authenticate users with zero-knowledge proofs

javascript
javascript
import { ZKAuthSDK } from 'your-zkauth-http-client';

// Initialize ZKAuth
const zkauth = new ZKAuthSDK({
  apiKey: 'zka_...',
  baseUrl: 'https://zkp-engine-main-1.vercel.app'
});

// Register a new user
await zkauth.register({
  email: 'user@example.com',
  password: 'password',
  deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});

// Authenticate with ZK proof
const session = await zkauth.login({
  email: 'user@example.com',
  password: 'password',
  deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});

console.log('Authentication successful!', session.data?.user);

Step-by-Step Setup

Follow these steps to integrate ZKAuth into your application

01

Create Your Account

Sign up for a free ZKAuth account and get your API keys

Code
# Get your API key from the dashboard
export ZKAUTH_API_KEY="zka_live_..."
export ZKAUTH_BASE_URL="https://zkp-engine-main-1.vercel.app"
02

Install the SDK

Add ZKAuth to your project with your preferred package manager

Code
# JavaScript/TypeScript
npm install your-zkauth-http-client

# Python SDK (coming soon)
# pip install zkauth

# Go SDK (coming soon)
# go get github.com/zkauth/go-sdk
03

Initialize ZKAuth

Set up the client with your API credentials

Code
import { ZKAuthSDK } from 'your-zkauth-http-client';

const zkauth = new ZKAuthSDK({
  apiKey: process.env.ZKAUTH_API_KEY,
  baseUrl: process.env.ZKAUTH_BASE_URL || 'https://zkp-engine-main-1.vercel.app'
});
04

Create Your First User

Register a user with zero-knowledge proof authentication

Code
// Register a new user with ZK proof
const result = await zkauth.register({
  email: 'user@example.com',
  password: 'secure-password',
  deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});

console.log('User created:', result.data?.userId);
05

Authenticate Users

Sign in users with cryptographic proof verification

Code
// Authenticate user with ZK proof
const session = await zkauth.login({
  email: 'user@example.com',
  password: 'secure-password',
  deviceInfo: { deviceName: 'Chrome on Mac', deviceType: 'desktop' }
});

if (session.success) {
  console.log('Authenticated:', session.data?.user);
}
06

Deploy to Production

Scale your application with tenant-bound ZK authentication

Code
# Production environment variables
ZKAUTH_API_KEY=zka_live_production_key
ZKAUTH_BASE_URL=https://zkp-engine-main-1.vercel.app
NODE_ENV=production

What's Next?

Explore advanced features and integrations

Ready to Build?

Start building secure applications with ZKAuth today.