A complete interactive reference guide for developers building AI applications with modern inference providers. Covers 19+ essential topics from basic concepts to advanced production deployment strategies, featuring live SDK demos, real-time API testing, and production-ready code examples for Anthropic Claude, DeepSeek, xAI Grok, OpenRouter, and more.
react-resizable-panels (v4.1.0), recharts (v3.6.0) - See migration guidereact (v19.2.3), eslint (v9.39.2)๐ Full Changelog: See CHANGELOG.md for complete release notes and breaking changes
This guide provides comprehensive coverage of:
๐ Quick Reference: See QUICK_REFERENCE.md for topic summaries and navigation guide ๐ Complete Guide: See COMPREHENSIVE_GUIDE.md for detailed documentation ๐ Table of Contents: See TOC.md for complete documentation index ๐ง XAI SDK Guide: See XAI_SDK_GUIDE.md for explainable AI integration
This platform now includes full integration and live testing of the official OpenRouter TypeScript SDK!
# Clone the official OpenRouter TypeScript SDK
git clone https://github.com/OpenRouterTeam/typescript-sdk.git
cd typescript-sdk
npm install
npm run build
npm test
# Install the SDK in your project
npm install @openrouter/ai-sdk-provider ai
import { createOpenRouter } from '@openrouter/ai-sdk-provider';
import { generateText, streamText } from 'ai';
// Initialize OpenRouter client
const openrouter = createOpenRouter({
apiKey: process.env.OPENROUTER_API_KEY,
headers: {
'HTTP-Referer': 'https://your-site.com',
'X-Title': 'Your App Name'
}
});
// Generate text
const { text } = await generateText({
model: openrouter('anthropic/claude-3-5-sonnet'),
messages: [{ role: 'user', content: 'Explain quantum entanglement' }]
});
// Stream responses
const { textStream } = await streamText({
model: openrouter('deepseek/deepseek-chat-v3'),
messages: [{ role: 'user', content: 'Write a story' }]
});
for await (const chunk of textStream) {
process.stdout.write(chunk);
}
Navigate to the "OpenRouter TypeScript SDK Integration" slide in the presentation to:
Slide Location: Slide 7 - "OpenRouter TypeScript SDK Integration"
๐ Full Documentation: See OPENROUTER_SDK_INTEGRATION.md for complete integration guide.
This platform now includes a comprehensive XAI SDK for transparent and interpretable AI predictions!
# No installation needed - integrated into the platform
# Import and use directly
import { explainAIResponse } from '@/lib/xai-service';
// Generate explanation for any model prediction
const explanation = await explainAIResponse(
"Is this email spam?", // Input
"Yes, this appears to be spam", // Model output
"gpt-4o", // Model ID
"openai" // Provider
);
// Display top contributing features
console.log(explanation.summary.explanation);
explanation.summary.topFeatures.forEach(f => {
console.log(`${f.feature}: ${(f.score * 100).toFixed(1)}%`);
});
Navigate to the "Explainable AI (XAI) SDK" slide in the presentation to:
Slide Location: Near the end - "Explainable AI (XAI) SDK"
๐ Full Documentation: See XAI_SDK_GUIDE.md for complete XAI integration guide.
This platform requires API keys from various AI providers. See ENV_SETUP.md for comprehensive setup instructions.
Required Keys:
OPENROUTER_API_KEY=sk-or-v1-...
DEEPSEEK_API_KEY=sk-deepseek-...
XAI_API_KEY=xai-...
Optional Keys:
NVIDIA_NIM_API_KEY=nvapi-...
OPENAI_API_KEY=sk-proj-...
ANTHROPIC_API_KEY=sk-ant-...
Clone the repository
git clone <your-repo-url>
cd spark-template
Install dependencies
npm install
Set up environment variables
# Create .env file
cp .env.example .env
# Add your API keys to .env
# See ENV_SETUP.md for detailed instructions
Start development server
npm run dev
Open in browser
http://localhost:5173
Critical Security Rules:
.env files to version controlSee ENV_SETUP.md for complete security best practices.
.
โโโ src/
โ โโโ components/
โ โ โโโ ApiDocumentation.tsx # API reference component
โ โ โโโ ApiKeyValidator.tsx # API key validation
โ โ โโโ ApiTester.tsx # Live API testing
โ โ โโโ CodeBlock.tsx # Syntax-highlighted code
โ โ โโโ DeploymentGuide.tsx # Platform deployment guides
โ โ โโโ EmbeddingTester.tsx # Embedding generation testing
โ โ โโโ EnvSetup.tsx # Environment variable setup
โ โ โโโ GitHubIntegration.tsx # Repository examples
โ โ โโโ OpenRouterSDKDemo.tsx # OpenRouter SDK integration demo
โ โ โโโ UniversalSlide.tsx # Main slide renderer
โ โโโ data/
โ โ โโโ slides.ts # Slide content and configuration
โ โโโ lib/
โ โ โโโ api-service.ts # API integration utilities
โ โ โโโ openrouter-sdk.ts # OpenRouter SDK wrapper
โ โ โโโ utils.ts # Utility functions
โ โโโ types/
โ โ โโโ slides.ts # TypeScript type definitions
โ โโโ App.tsx # Main application component
โ โโโ index.css # Global styles and theme
โโโ docs/ # Documentation
โ โโโ OPENROUTER_SDK_INTEGRATION.md
โ โโโ ENV_SETUP.md
โ โโโ PRD.md
โโโ package.json # Dependencies
Primary Color: Deep Technical Blue oklch(0.55 0.15 240)
Accent Color: Electric Purple oklch(0.65 0.20 290)
Fonts: JetBrains Mono (code/headings), Inter (body)
Design: Dark theme with syntax highlighting and technical precision
vercel env add OPENROUTER_API_KEY
vercel env add DEEPSEEK_API_KEY
vercel --prod
docker build -t multimodal-ai-platform .
docker run --env-file .env -p 3000:3000 multimodal-ai-platform
See ENV_SETUP.md for platform-specific deployment instructions.
This is a technical reference platform. Contributions for:
The Spark Template files and resources from GitHub are licensed under the terms of the MIT license, Copyright GitHub, Inc.
To keep the repository clean and organized, we recommend the following GitHub settings:
main branch)We recommend configuring the following branch protection rules:
Require pull request reviews before merging
Require status checks to pass before merging
build - TypeScript compilation and Vite buildlint - ESLint code quality checkstype-check - TypeScript type checkingRequire conversation resolution before merging
Do not allow bypassing the above settings
To improve discoverability, add these topics to your repository:
ai - Artificial Intelligencemachine-learning - ML/AI applicationstypescript - Primary languagereact - Frontend frameworkopenrouter - AI provider integrationrag - Retrieval-Augmented Generationxai - Explainable AIembeddings - Vector embeddingssupabase - Database and vector storagevite - Build tooltailwindcss - Styling frameworkai-sdk - AI SDK integrationinference - AI inference platformnpm run build && npm run lintmain via pull requestgit tag -a v1.0.0 -m "Release v1.0.0"git push origin --tagsNavigation: Use arrow keys (โ/โ) or on-screen buttons to navigate slides. Press ESC for slide menu.
128 commits
29 commits
17 commits
1 commits
TypeScript
98.7%
A complete interactive reference guide for developers building AI applications with modern inference providers. Covers 19+ essential topics from basic concepts to advanced production deployment strategies, featuring live SDK demos, real-time API testing, and production-ready code examples for Anthropic Claude, DeepSeek, xAI Grok, OpenRouter, and more.
react-resizable-panels (v4.1.0), recharts (v3.6.0) - See migration guidereact (v19.2.3), eslint (v9.39.2)๐ Full Changelog: See CHANGELOG.md for complete release notes and breaking changes
This guide provides comprehensive coverage of:
๐ Quick Reference: See QUICK_REFERENCE.md for topic summaries and navigation guide ๐ Complete Guide: See COMPREHENSIVE_GUIDE.md for detailed documentation ๐ Table of Contents: See TOC.md for complete documentation index ๐ง XAI SDK Guide: See XAI_SDK_GUIDE.md for explainable AI integration
This platform now includes full integration and live testing of the official OpenRouter TypeScript SDK!
# Clone the official OpenRouter TypeScript SDK
git clone https://github.com/OpenRouterTeam/typescript-sdk.git
cd typescript-sdk
npm install
npm run build
npm test
# Install the SDK in your project
npm install @openrouter/ai-sdk-provider ai
import { createOpenRouter } from '@openrouter/ai-sdk-provider';
import { generateText, streamText } from 'ai';
// Initialize OpenRouter client
const openrouter = createOpenRouter({
apiKey: process.env.OPENROUTER_API_KEY,
headers: {
'HTTP-Referer': 'https://your-site.com',
'X-Title': 'Your App Name'
}
});
// Generate text
const { text } = await generateText({
model: openrouter('anthropic/claude-3-5-sonnet'),
messages: [{ role: 'user', content: 'Explain quantum entanglement' }]
});
// Stream responses
const { textStream } = await streamText({
model: openrouter('deepseek/deepseek-chat-v3'),
messages: [{ role: 'user', content: 'Write a story' }]
});
for await (const chunk of textStream) {
process.stdout.write(chunk);
}
Navigate to the "OpenRouter TypeScript SDK Integration" slide in the presentation to:
Slide Location: Slide 7 - "OpenRouter TypeScript SDK Integration"
๐ Full Documentation: See OPENROUTER_SDK_INTEGRATION.md for complete integration guide.
This platform now includes a comprehensive XAI SDK for transparent and interpretable AI predictions!
# No installation needed - integrated into the platform
# Import and use directly
import { explainAIResponse } from '@/lib/xai-service';
// Generate explanation for any model prediction
const explanation = await explainAIResponse(
"Is this email spam?", // Input
"Yes, this appears to be spam", // Model output
"gpt-4o", // Model ID
"openai" // Provider
);
// Display top contributing features
console.log(explanation.summary.explanation);
explanation.summary.topFeatures.forEach(f => {
console.log(`${f.feature}: ${(f.score * 100).toFixed(1)}%`);
});
Navigate to the "Explainable AI (XAI) SDK" slide in the presentation to:
Slide Location: Near the end - "Explainable AI (XAI) SDK"
๐ Full Documentation: See XAI_SDK_GUIDE.md for complete XAI integration guide.
This platform requires API keys from various AI providers. See ENV_SETUP.md for comprehensive setup instructions.
Required Keys:
OPENROUTER_API_KEY=sk-or-v1-...
DEEPSEEK_API_KEY=sk-deepseek-...
XAI_API_KEY=xai-...
Optional Keys:
NVIDIA_NIM_API_KEY=nvapi-...
OPENAI_API_KEY=sk-proj-...
ANTHROPIC_API_KEY=sk-ant-...
Clone the repository
git clone <your-repo-url>
cd spark-template
Install dependencies
npm install
Set up environment variables
# Create .env file
cp .env.example .env
# Add your API keys to .env
# See ENV_SETUP.md for detailed instructions
Start development server
npm run dev
Open in browser
http://localhost:5173
Critical Security Rules:
.env files to version controlSee ENV_SETUP.md for complete security best practices.
.
โโโ src/
โ โโโ components/
โ โ โโโ ApiDocumentation.tsx # API reference component
โ โ โโโ ApiKeyValidator.tsx # API key validation
โ โ โโโ ApiTester.tsx # Live API testing
โ โ โโโ CodeBlock.tsx # Syntax-highlighted code
โ โ โโโ DeploymentGuide.tsx # Platform deployment guides
โ โ โโโ EmbeddingTester.tsx # Embedding generation testing
โ โ โโโ EnvSetup.tsx # Environment variable setup
โ โ โโโ GitHubIntegration.tsx # Repository examples
โ โ โโโ OpenRouterSDKDemo.tsx # OpenRouter SDK integration demo
โ โ โโโ UniversalSlide.tsx # Main slide renderer
โ โโโ data/
โ โ โโโ slides.ts # Slide content and configuration
โ โโโ lib/
โ โ โโโ api-service.ts # API integration utilities
โ โ โโโ openrouter-sdk.ts # OpenRouter SDK wrapper
โ โ โโโ utils.ts # Utility functions
โ โโโ types/
โ โ โโโ slides.ts # TypeScript type definitions
โ โโโ App.tsx # Main application component
โ โโโ index.css # Global styles and theme
โโโ docs/ # Documentation
โ โโโ OPENROUTER_SDK_INTEGRATION.md
โ โโโ ENV_SETUP.md
โ โโโ PRD.md
โโโ package.json # Dependencies
Primary Color: Deep Technical Blue oklch(0.55 0.15 240)
Accent Color: Electric Purple oklch(0.65 0.20 290)
Fonts: JetBrains Mono (code/headings), Inter (body)
Design: Dark theme with syntax highlighting and technical precision
vercel env add OPENROUTER_API_KEY
vercel env add DEEPSEEK_API_KEY
vercel --prod
docker build -t multimodal-ai-platform .
docker run --env-file .env -p 3000:3000 multimodal-ai-platform
See ENV_SETUP.md for platform-specific deployment instructions.
This is a technical reference platform. Contributions for:
The Spark Template files and resources from GitHub are licensed under the terms of the MIT license, Copyright GitHub, Inc.
To keep the repository clean and organized, we recommend the following GitHub settings:
main branch)We recommend configuring the following branch protection rules:
Require pull request reviews before merging
Require status checks to pass before merging
build - TypeScript compilation and Vite buildlint - ESLint code quality checkstype-check - TypeScript type checkingRequire conversation resolution before merging
Do not allow bypassing the above settings
To improve discoverability, add these topics to your repository:
ai - Artificial Intelligencemachine-learning - ML/AI applicationstypescript - Primary languagereact - Frontend frameworkopenrouter - AI provider integrationrag - Retrieval-Augmented Generationxai - Explainable AIembeddings - Vector embeddingssupabase - Database and vector storagevite - Build tooltailwindcss - Styling frameworkai-sdk - AI SDK integrationinference - AI inference platformnpm run build && npm run lintmain via pull requestgit tag -a v1.0.0 -m "Release v1.0.0"git push origin --tagsNavigation: Use arrow keys (โ/โ) or on-screen buttons to navigate slides. Press ESC for slide menu.
128 commits
29 commits
17 commits
1 commits
TypeScript
98.7%