Documentation

Docs

Quickstart, providers, modes, encryption internals, and the API reference, everything to get the most out of sarmalink.

Quickstart

Get from zero to your first answer in under two minutes. Sign in with a magic link, create your encryption passphrase, and paste a single free-tier provider key.

  1. 1Sign in with your email, no password to remember.
  2. 2Create a passphrase. It encrypts everything locally.
  3. 3Add a free Groq key to unlock Fast and Vision modes.
  4. 4Start chatting. Add more keys anytime in Settings.

Providers

sarmalink routes across seven providers. Each has a generous free tier. Add as many as you like, more keys mean more modes and better failover.

ProviderFree tier
Groq14,400 requests/day, 30 RPM
SambaNovaFrontier model, generous daily quota
Cerebras1M tokens/day free
Google GeminiFlash + Pro, Search grounding
OpenRouter17+ models, free variants
Cloudflare Workers AI10,000 neurons/day + R2
Tavily1,000 searches/month

Modes

A mode is a curated engine + behaviour. Pick one per message; the gateway selects the best available provider and fails over silently.

Smart

DeepSeek V3.2 685B MoE

Professional emails, deep analysis, long-form reasoning.

Reasoner

DeepSeek R1

Chain-of-thought made visible for GDPR-shaped questions.

Live

Gemini 2.5 Flash + Search

Google Search grounding, citations on every answer.

Fast

Groq GPT-OSS 20B

41ms first token, built for quick lookups.

Coder

DeepSeek V3.2 + Qwen 3 Coder

Debug, refactor, and write tests with a code-tuned engine.

Vision

Llama-4 Scout

Reads photos, screenshots, and receipts.

Encryption

Your passphrase derives a vault key with PBKDF2 (210,000 iterations). Provider keys and messages are sealed with AES-256-GCM in the browser.

const key = await crypto.subtle.deriveKey(
  { name: 'PBKDF2', salt, iterations: 210_000, hash: 'SHA-256' },
  passphraseKey,
  { name: 'AES-GCM', length: 256 },
  false,
  ['encrypt', 'decrypt'],
)

API reference

Send a chat completion through the gateway. Specify a mode and the gateway picks the provider.

POST /api/chat
Authorization: Bearer <session-token>
Content-Type: application/json

{
  "mode": "smart",
  "messages": [
    { "role": "user", "content": "Summarise this contract clause" }
  ]
}

Webhooks

Subscribe to events like message.completed and provider.degraded to integrate sarmalink into your own tooling.

{
  "event": "provider.degraded",
  "provider": "gemini",
  "failover": "openrouter",
  "timestamp": "2026-06-09T23:00:00Z"
}