# Jan AI: Using Desktop LLMs with Langchain or llama-index

`Jan` allows you to deploy and run LLMs on your Windows or macOS computer! 16 Gigabytes of memory and a M1 chip was enough for me to run Mistral locally. Now how do you take Jan and use libraries like `Langchain`?

%[https://jan.ai] 

# Local API Server

Click the `[<>]` icon to open the API Server pane. Click "**Start Server**".

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708789750036/753cb143-ef78-4bb5-9eea-bf3726154d7f.png align="center")

# OpenAI Environment Variables

Jan AI exposes an Open-AI compatible `/chat/completions` endpoint. That means, you can convert your existing LLM applications to run on locally hosted models through configuring the `OPENAI_API_BASE` environment variable.

```bash
export OPENAI_API_BASE=http://127.0.0.1:1337/v1
```

Granted, if your library or application relies on the Python/Node.js `openai` package.

> If you are using Langchain or llama-index, this is enough!

And for the API key, well you don't need one. It can be any random value.
