+ )
+}
+
+export default ScalarApiReferenceMulti
diff --git a/website/src/config/README.md b/website/src/config/README.md
new file mode 100644
index 000000000..255de0f59
--- /dev/null
+++ b/website/src/config/README.md
@@ -0,0 +1,101 @@
+# Navigation Configuration
+
+This directory contains configuration files for managing navigation across Jan's documentation sites.
+
+## Overview
+
+As Jan grows to include multiple products (Jan Desktop, Jan Server, Jan Mobile, etc.), we need a scalable way to manage navigation across different documentation sections. This configuration approach allows us to:
+
+1. **Maintain consistency** across different products
+2. **Avoid duplication** in navigation code
+3. **Scale easily** as new products are added
+4. **Separate concerns** between regular docs and API reference pages
+
+## Structure
+
+### `navigation.js`
+Central navigation configuration file containing:
+- Product-specific navigation links
+- API deployment configurations
+- Helper functions for navigation management
+- Feature flags for navigation behavior
+
+## Navigation Strategy
+
+### Regular Documentation Pages
+- Navigation is injected via `astro.config.mjs`
+- Shows "Docs" and "API Reference" links
+- Appears in the main header next to search
+
+### API Reference Pages
+- Have their own navigation via `ApiReferenceLayout.astro`
+- Navigation is built into the layout (not injected)
+- Prevents duplicate navigation elements
+
+## Adding New Products
+
+To add navigation for a new product:
+
+1. Update `navigation.js`:
+```javascript
+products: {
+ janServer: {
+ name: 'Jan Server',
+ links: [
+ { href: '/server', text: 'Server Docs', isActive: (path) => path.startsWith('/server') },
+ { href: '/server/api', text: 'Server API', isActive: (path) => path.startsWith('/server/api') }
+ ]
+ }
+}
+```
+
+2. Update `astro.config.mjs` if needed to handle product-specific logic
+
+3. Create corresponding layout components if the product needs custom API reference pages
+
+## Configuration in astro.config.mjs
+
+The navigation injection in `astro.config.mjs` is kept minimal and clean:
+
+```javascript
+const JAN_NAV_CONFIG = {
+ links: [/* navigation links */],
+ excludePaths: [/* paths that have their own navigation */]
+};
+```
+
+This configuration:
+- Is easy to read and modify
+- Doesn't interfere with API reference pages
+- Can be extended for multiple products
+- Maintains clean separation of concerns
+
+## Best Practices
+
+1. **Keep it simple**: Navigation configuration should be declarative, not complex logic
+2. **Avoid duplication**: Use the configuration to generate navigation, don't hardcode it multiple places
+3. **Test changes**: Always verify navigation works on both regular docs and API reference pages
+4. **Document changes**: Update this README when adding new products or changing navigation strategy
+
+## Testing Navigation
+
+After making changes, verify:
+1. Navigation appears correctly on regular docs pages
+2. Navigation doesn't duplicate on API reference pages
+3. Active states work correctly
+4. Mobile responsiveness is maintained
+5. Theme switching doesn't break navigation
+
+## Future Considerations
+
+- **Product switcher**: Add a dropdown to switch between different product docs
+- **Version selector**: Add version switching for API documentation
+- **Search integration**: Integrate product-specific search scopes
+- **Analytics**: Track navigation usage to improve UX
+
+## Related Files
+
+- `/astro.config.mjs` - Navigation injection for regular docs
+- `/src/components/ApiReferenceLayout.astro` - API reference navigation
+- `/src/pages/api.astro` - API documentation landing page
+- `/src/pages/api-reference/*.astro` - API reference pages
\ No newline at end of file
diff --git a/website/src/config/navigation.js b/website/src/config/navigation.js
new file mode 100644
index 000000000..f72c77890
--- /dev/null
+++ b/website/src/config/navigation.js
@@ -0,0 +1,138 @@
+/**
+ * Navigation Configuration
+ *
+ * Centralized navigation configuration for Jan documentation.
+ * This makes it easy to manage navigation across multiple products
+ * and maintain consistency across different documentation sections.
+ */
+
+export const NAVIGATION_CONFIG = {
+ // Main product navigation links
+ products: {
+ jan: {
+ name: 'Jan',
+ links: [
+ {
+ href: '/',
+ text: 'Docs',
+ isActive: (path) => path === '/' || (path.startsWith('/') && !path.startsWith('/api')),
+ description: 'Jan documentation and guides'
+ },
+ {
+ href: '/api',
+ text: 'API Reference',
+ isActive: (path) => path.startsWith('/api'),
+ description: 'OpenAI-compatible API documentation'
+ }
+ ]
+ },
+ // Future products can be added here
+ // Example:
+ // janServer: {
+ // name: 'Jan Server',
+ // links: [
+ // { href: '/server', text: 'Server Docs', isActive: (path) => path.startsWith('/server') },
+ // { href: '/server/api', text: 'Server API', isActive: (path) => path.startsWith('/server/api') }
+ // ]
+ // }
+ },
+
+ // API deployment configurations
+ apiDeployments: {
+ local: {
+ name: 'Local API',
+ defaultServers: [
+ { url: 'http://127.0.0.1:1337', description: 'Local Jan Server (Default)' },
+ { url: 'http://localhost:1337', description: 'Local Jan Server (localhost)' },
+ { url: 'http://localhost:8080', description: 'Local Jan Server (Alternative Port)' }
+ ],
+ requiresAuth: false,
+ engine: 'llama.cpp'
+ },
+ cloud: {
+ name: 'Jan Server',
+ defaultServers: [
+ { url: 'https://api.jan.ai/v1', description: 'Jan Server (Production)' },
+ { url: 'http://localhost:8000/v1', description: 'Jan Server (Local Development)' }
+ ],
+ requiresAuth: true,
+ engine: 'vLLM'
+ }
+ },
+
+ // Navigation styles configuration
+ styles: {
+ navLink: {
+ base: 'nav-link',
+ active: 'nav-link-active'
+ },
+ container: {
+ base: 'custom-nav-links',
+ mobile: 'custom-nav-links-mobile'
+ }
+ },
+
+ // Feature flags for navigation behavior
+ features: {
+ persistCustomServer: true,
+ allowUrlParams: true,
+ showProductSwitcher: false, // For future multi-product support
+ mobileMenuBreakpoint: 768
+ },
+
+ // Helper functions
+ helpers: {
+ /**
+ * Get navigation links for current product
+ * @param {string} productKey - The product identifier
+ * @returns {Array} Navigation links for the product
+ */
+ getProductNav(productKey = 'jan') {
+ return this.products[productKey]?.links || [];
+ },
+
+ /**
+ * Determine if current path should show API reference navigation
+ * @param {string} path - Current pathname
+ * @returns {boolean} Whether to show API reference navigation
+ */
+ isApiReferencePage(path) {
+ return path.startsWith('/api-reference/') || path.startsWith('/api/');
+ },
+
+ /**
+ * Get server configuration for deployment type
+ * @param {string} deployment - 'local' or 'cloud'
+ * @returns {Object} Server configuration
+ */
+ getServerConfig(deployment) {
+ return this.apiDeployments[deployment] || this.apiDeployments.local;
+ },
+
+ /**
+ * Build navigation HTML for injection
+ * @param {string} currentPath - Current page path
+ * @param {string} productKey - Product identifier
+ * @returns {string} HTML string for navigation
+ */
+ buildNavigationHTML(currentPath, productKey = 'jan') {
+ const links = this.getProductNav(productKey);
+
+ return links.map(link => `
+
+ ${link.text}
+
+ `).join('');
+ }
+ }
+};
+
+// Export for use in browser context
+if (typeof window !== 'undefined') {
+ window.JanNavigationConfig = NAVIGATION_CONFIG;
+}
+
+export default NAVIGATION_CONFIG;
diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx
index dabd73a29..87cf331db 100644
--- a/website/src/content/docs/index.mdx
+++ b/website/src/content/docs/index.mdx
@@ -22,7 +22,7 @@ banner:
We just launched something cool! πJan now supports image πΌοΈ attachments π
---
-import { Aside } from '@astrojs/starlight/components';
+import { Aside, LinkCard } from '@astrojs/starlight/components';

@@ -121,11 +121,10 @@ The best AI is the one you control. Not the one that other control for you.
- Run powerful models locally on consumer hardware
- Connect to any cloud provider with your API keys
- Use MCP tools for real-world tasks
-- Access transparent model evaluations
### What We're Building
- More specialized models that excel at specific tasks
-- Expanded app ecosystem (mobile, web, extensions)
+- Expanded app ecosystem (mobile, self-hosted server, web, extensions)
- Richer connector ecosystem
- An evaluation framework to build better models
@@ -147,6 +146,13 @@ hardware, and better techniques, but we're honest that this is a journey, not a
2. Choose a model - download locally or add cloud API keys
3. Start chatting or connect tools via MCP
4. Build with our [local API](./api-server)
+5. Explore the [API Reference](/api) for Local and Server endpoints
+
+
## Acknowledgements
diff --git a/website/src/content/docs/local-server/index.mdx b/website/src/content/docs/local-server/index.mdx
index 8afa3c8e7..76c7de6b7 100644
--- a/website/src/content/docs/local-server/index.mdx
+++ b/website/src/content/docs/local-server/index.mdx
@@ -3,7 +3,7 @@ title: Local API Server
description: Build AI applications with Jan's OpenAI-compatible API server.
---
-import { Aside } from '@astrojs/starlight/components';
+import { Aside, LinkCard } from '@astrojs/starlight/components';
Jan provides an OpenAI-compatible API server that runs entirely on your computer. Use the same API patterns you know from OpenAI, but with complete control over your models and data.
@@ -31,10 +31,17 @@ curl http://localhost:1337/v1/chat/completions \
## Documentation
+- [**API Reference**](/api) - Interactive API documentation with Try It Out
- [**API Configuration**](./api-server) - Server settings, authentication, CORS
- [**Engine Settings**](./llama-cpp) - Configure llama.cpp for your hardware
- [**Server Settings**](./settings) - Advanced configuration options
+
+
## Integration Examples
### Continue (VS Code)
@@ -94,14 +101,14 @@ Jan implements the core OpenAI API endpoints. Some advanced features like functi
## Why Use Jan's API?
-**Privacy** - Your data stays on your machine with local models
-**Cost** - No API fees for local model usage
-**Control** - Choose your models, parameters, and hardware
-**Flexibility** - Mix local and cloud models as needed
+**Privacy** - Your data stays on your machine with local models
+**Cost** - No API fees for local model usage
+**Control** - Choose your models, parameters, and hardware
+**Flexibility** - Mix local and cloud models as needed
## Related Resources
- [Models Overview](/docs/jan/manage-models) - Available models
- [Data Storage](/docs/jan/data-folder) - Where Jan stores data
- [Troubleshooting](/docs/jan/troubleshooting) - Common issues
-- [GitHub Repository](https://github.com/janhq/jan) - Source code
\ No newline at end of file
+- [GitHub Repository](https://github.com/janhq/jan) - Source code
diff --git a/website/src/pages/api-reference.astro b/website/src/pages/api-reference.astro
new file mode 100644
index 000000000..81e7c3f87
--- /dev/null
+++ b/website/src/pages/api-reference.astro
@@ -0,0 +1,22 @@
+
+
+
+
+
+ Redirecting to API Documentation | Jan
+
+
+
+
+
+
+
+
diff --git a/website/src/pages/api-reference/cloud.astro b/website/src/pages/api-reference/cloud.astro
new file mode 100644
index 000000000..7fb634e58
--- /dev/null
+++ b/website/src/pages/api-reference/cloud.astro
@@ -0,0 +1,331 @@
+---
+import ApiReferenceLayout from '../../components/ApiReferenceLayout.astro'
+import ScalarApiReferenceMulti from '../../components/react/ScalarApiReferenceMulti.jsx'
+
+const title = 'Jan Server API Reference'
+const description = 'OpenAI-compatible API documentation for Jan Server powered by vLLM'
+---
+
+
+
+ Self-hostable Jan Server powered by vLLM for high-throughput serving
+
+
+
+ Base URL:
+ http://your-server:8000/v1
+
+
+ Engine:
+ vLLM
+
+
+ Format:
+ OpenAI Compatible
+
+
+
+
+
+
+
+
+
+
+ Authentication Required: All requests to Jan Server require authentication.
+ Include your API key in the Authorization header as Bearer YOUR_API_KEY.
+ Configure authentication in your server settings.
+
+
+
+
+
+
+
+
+
High Performance
+
Powered by vLLM's PagedAttention for efficient memory usage and high throughput
+
+
+
+
+
+
Auto-Scaling
+
Automatically scales to handle your workload with intelligent load balancing
+
+
+
+
+
+
Multi-Model Support
+
Support for various model formats and sizes with optimized serving configurations
+
+
+
+
+
+
+
+
+
diff --git a/website/src/pages/api-reference/local.astro b/website/src/pages/api-reference/local.astro
new file mode 100644
index 000000000..f860620e3
--- /dev/null
+++ b/website/src/pages/api-reference/local.astro
@@ -0,0 +1,222 @@
+---
+import ApiReferenceLayout from '../../components/ApiReferenceLayout.astro'
+import ScalarApiReferenceMulti from '../../components/react/ScalarApiReferenceMulti.jsx'
+
+const title = 'Jan Local API Reference'
+const description = 'OpenAI-compatible API documentation for Jan running locally with llama.cpp'
+---
+
+
+
+ Run Jan locally on your machine with llama.cpp's high-performance inference engine
+
+
+
+ Base URL:
+ http://localhost:1337
+
+
+ Engine:
+ llama.cpp
+
+
+ Format:
+ OpenAI Compatible
+
+
+
+
+
+
+
+
+
+
+ Getting Started: Make sure Jan is running locally on your machine.
+ You can start the server by launching the Jan application or running the CLI command.
+ Default port is 1337, but you can configure it in your settings.
+
+
+
+
+
+
+
+
+
diff --git a/website/src/pages/api.astro b/website/src/pages/api.astro
new file mode 100644
index 000000000..5f28fe3b3
--- /dev/null
+++ b/website/src/pages/api.astro
@@ -0,0 +1,257 @@
+---
+import ApiReferenceLayout from '../components/ApiReferenceLayout.astro'
+
+const title = 'Jan API Documentation'
+const description = 'OpenAI-compatible API for local and server deployments'
+---
+
+
+
+
+
πJan API Documentation
+
OpenAI-compatible API for local and server deployments