@vrin/sdk is the official TypeScript client. It works in Node 18+, Bun, Deno, Cloudflare Workers, and modern browsers. Written in TypeScript, shipped as both ESM and CJS, fully typed.
If you’re building an agent in Python, use the Python SDK. If you’re shell-scripting, use the CLI.
Install
pnpm add, yarn add, bun add.
Authenticate
vrin_live_ (shared infra) or vrin_ent_ (enterprise-routed). Get one at vrin.cloud → Dashboard → API Keys.
If apiKey is omitted, the client reads VRIN_API_KEY from process.env.
First query
Constructor options
Usage across runtimes
- Node 18+
- Bun
- Cloudflare Workers
- Browser
Next steps
Querying
query, queryStream, response modes, depth.Knowledge
insert, uploadFile, polling async jobs.Conversations
Multi-turn sessions with
startConversation + continueConversation.Error handling
Typed exception hierarchy you can switch on.
Error handling
All errors extendVrinError. Import the specific subclasses you want to handle:
VrinError exposes:
message— human-readable descriptionstatus?— HTTP status, when relevantbody?— raw server payload, for logging
Custom fetch
For runtimes without a globalfetch (Node 16, some embedded envs) or when you want a middleware-style interceptor: