| description | Get NeuroLink running in under 2 minutes. Install the SDK, configure a provider, and stream your first AI response. |
|---|
import Head from '@docusaurus/Head';
<script type="application/ld+json">{JSON.stringify({ "@context": "https://schema.org", "@type": "HowTo", "name": "Quick Start with NeuroLink AI Streaming SDK", "description": "Stream AI responses in real-time in under 2 minutes", "totalTime": "PT2M", "step": [ { "@type": "HowToStep", "position": 1, "name": "Install NeuroLink", "text": "Run: npm install @juspay/neurolink" }, { "@type": "HowToStep", "position": 2, "name": "Configure provider", "text": "Set your API key as an environment variable" }, { "@type": "HowToStep", "position": 3, "name": "Stream your first response", "text": "Use neurolink.stream() with your prompt and provider" } ] })}</script>Get NeuroLink running in under 2 minutes with this quick start guide.
- Node.js 18+
- npm/pnpm/yarn package manager
- API key for at least one AI provider (we recommend starting with Google AI Studio - it has a free tier)
# Set up your API key (Google AI Studio has free tier)
export GOOGLE_AI_API_KEY="AIza-your-google-ai-api-key"
# Generate text instantly
npx @juspay/neurolink generate "Hello, AI"
npx @juspay/neurolink gen "Hello, AI" # Shortest form
# Check provider status
npx @juspay/neurolink status# Install for your project
npm install @juspay/neurolinkimport { NeuroLink } from "@juspay/neurolink";
const neurolink = new NeuroLink();
const result = await neurolink.generate({
input: { text: "Write a haiku about programming" },
provider: "google-ai",
});
console.log(result.content);
console.log(`Used: ${result.provider}`);NeuroLink's power is in its provider-agnostic design. Write your code once, and NeuroLink automatically uses the best available provider. If your primary provider fails, it seamlessly falls back to another, ensuring your application remains robust.
import { NeuroLink } from "@juspay/neurolink";
// No provider specified - NeuroLink handles it!
const neurolink = new NeuroLink();
// This code works with OpenAI, Google, Anthropic, etc. without any changes.
const result = await neurolink.generate({
input: { text: "Explain quantum computing simply." },
});
console.log(result.content);
console.log(`AI Provider Used: ${result.provider}`);- Visit Google AI Studio
- Sign in with your Google account
- Click "Get API Key"
- Create a new API key
- Copy and use:
export GOOGLE_AI_API_KEY="AIza-your-key"
- OpenAI: platform.openai.com
- Anthropic: console.anthropic.com
- LiteLLM: Access 100+ models through one proxy server (requires setup)
- Ollama: Local installation, no API key needed
# Check all configured providers
npx @juspay/neurolink status
# Test with built-in tools
npx @juspay/neurolink generate "What time is it?" --debug
# Test without tools (pure text generation)
npx @juspay/neurolink generate "Write a poem" --disable-tools- Provider Setup - Configure multiple AI providers
- CLI Loop Sessions - Try persistent interactive mode with memory
- CLI Commands - Learn all available commands
- SDK Reference - Integrate into your applications
- Examples - See practical implementations
Latest Features:
- Multimodal Chat - Add images to your prompts
- PPT Generation - Generate PowerPoint presentations
- Auto Evaluation - Quality scoring for responses
- Guardrails - Content filtering and safety
- Not working? Check our Troubleshooting Guide
- Questions? See our FAQ
- Issues? Report on GitHub