+ +
+
+

1. Let's make a test request

+
The gateway supports 250+ models across 36 AI providers. Choose your provider and API + key below.
+
+
🐍 Python
+
📦 Node.js
+
🌀 cURL
+
+
+ +
+
+
+
+
+
+
+
+
+
+ + + +
+
+ +
+

2. Create a routing config

+
Gateway configs allow you to route requests to different providers and models. You can load balance, set fallbacks, and configure automatic retries & timeouts. Learn more
+
+
Simple Config
+
Load Balancing
+
Fallbacks
+
Retries & Timeouts
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + +
+ + +
+
+ + + + +

Setup a Call

+

Get personalized support and learn how Portkey can be tailored to your needs.

+ Schedule Consultation +
+
+ + + + + +

Enterprise Features

+

Explore advanced features and see how Portkey can scale with your business.

+ View Enterprise Plan +
+
+ + + + +

Join Our Community

+

Connect with other developers, share ideas, and get help from the Portkey team.

+ Join Discord +
+
+
+
+ +
+
+

Real-time Logs

+
+ + +
+
+ + + + + + + + + + + + + + + + + + +
TimeMethodEndpointStatusDurationActions
+
+ Listening for logs... +
+
+
+
+ + + + + + + + + + + + + + diff --git a/src/start-server.ts b/src/start-server.ts index 7152dd26f..10168432d 100644 --- a/src/start-server.ts +++ b/src/start-server.ts @@ -27,6 +27,25 @@ await initClickhouse(); await initMongo(); initializeMemCache(); +// Restore /public/ console (removed in 2.x; assets shipped via Dockerfile cp). +{ + const { join, dirname } = await import('node:path'); + const { fileURLToPath } = await import('node:url'); + const { readFileSync } = await import('node:fs'); + try { + const scriptDir = dirname(fileURLToPath(import.meta.url)); + const indexContent = readFileSync( + join(scriptDir, 'public/index.html'), + 'utf-8' + ); + app.get('/public/logs', (c) => c.html(indexContent)); + app.get('/public/', (c) => c.html(indexContent)); + app.get('/public', (c) => c.redirect('/public/')); + } catch { + console.warn('Console asset missing — /public/ disabled'); + } +} + // Extract the port number from the command line arguments const argv = minimist(process.argv.slice(2), { default: {