Jan Local AI Server Port
π Open localhost:1337Access your Jan local AI model server running on port 1337
Localhost:1337 is the default port for Jan, a privacy-focused open-source alternative to ChatGPT that runs 100% offline on any Windows, Mac, or Linux computer. The number “1337” (historically spelling “leet”, as in “elite”) gives a nod to hacker culture, making it an instantly memorable API endpoint.
Jan exposes an OpenAI-equivalent API natively. It spins up a local server on port 1337 with the identical layout as api.openai.com/v1, making it exceptionally easy for developers to plug Jan into applications meant for ChatGPT simply by changing the base URL.
Use Pinggy tunnel to share your Jan server globally:
This allows other applications on foreign networks to communicate securely with your local Jan models.
When Jan boots up its inference server, replacing the endpoint inside your Python or Node tools with http://localhost:1337/v1 immediately pipes your traffic securely into your offline machine rather than OpenAI’s servers.
If you can’t access localhost:1337, here’s how to diagnose and fix common Jan development server issues:
Action: Confirm that Jan application is active.
How to check: Ensure the Jan desktop app is open and the local API server feature is enabled in its settings.
Action: Ensure no other program is using port 1337.
How to fix: Use lsof -i :1337 (macOS/Linux) or netstat -ano | findstr :1337 (Windows) to see if another process is taking the port.
Action: Verify that the local API is accessible.
How to test: Run curl http://localhost:1337/v1/models to see if it responds with a list of models.
Here are typical issues with localhost:1337 and how to resolve them:
Problem: Jan's API server is down.
Solution: Open Jan Desktop and ensure the local API server button is switched on in the settings.
Problem: Another application is occupying port 1337.
Solution: Find the conflicting process (often a local dev server or game server) and stop it, or configure Jan to use a different port if needed.
Problem: The API responds but requests time out or fail to generate.
Solution: Ensure a model is downloaded and actively loaded into Jan's memory before sending API requests.
localhost:1337 is the default port for the Jan offline local LLM.# Connect OpenAI SDK to Jan
export OPENAI_API_BASE="http://localhost:1337/v1"