The Universal Client-Side AI SDK
BYOK Architecture — Your API keys never leave your device. One SDK, 12+ providers, zero server trust.
import { SutraAI } from '@sutraworks/client-ai-sdk';
// Initialize with your own API key
const ai = new SutraAI();
await ai.setKey('openai', 'sk-...');
// Your key stays in the browser!
const response = await ai.chat({
provider: 'openai',
model: 'gemini-3-flash',
messages: [{ role: 'user', content: 'Hello!' }]
});Why BYOK?
Traditional AI integrations require sending your API keys to a backend server. Sutraworks flips this model — all calls happen directly from the browser.
Traditional Architecture
Sutraworks Architecture
Everything You Need
A complete toolkit for building AI-powered applications with best-in-class security.
Security First
OWASP 2024 compliant encryption with 600K PBKDF2 iterations, AES-256-GCM, and constant-time comparisons.
12+ Providers
OpenAI, Anthropic, Google Gemini, Ollama, Groq, Mistral, Cohere, and more with a unified interface.
Real-time Streaming
Stream responses in real-time with proper SSE parsing and async iterators.
Middleware Pipeline
Logging, retry, rate limiting, timeout, content filtering, fallback, and metrics middleware.
Intelligent Caching
SHA-256 cache keys with LRU eviction. Request deduplication to prevent duplicate API calls.
Full TypeScript
Rich type definitions, ESM/CJS/UMD builds, and excellent IDE support with autocomplete.
Supported Providers
Use the same API to work with any of these AI providers — switch with a single line.
Ready to Build?
Get started in seconds from GitHub. Join developers who trust Sutraworks for their AI integrations.