OpenAI API
How to Integrate OpenAI API with Jan
This guide provides step-by-step instructions for integrating the OpenAI API with Jan, allowing users to utilize OpenAI's capabilities within Jan's conversational interface.
Integration Steps
Step 1: Configure OpenAI API Key
- Obtain OpenAI API Key from your OpenAI Platform (opens in a new tab) dashboard.
- Copy your OpenAI Key and the endpoint URL you want to use.
- Navigate to the Jan app > Settings.
- Select the OpenAI Inference Engine.
- Insert the API Key and the endpoint URL into their respective fields.
You can also manually edit the JSON file in ~/jan/settings/@janhq/inference-openai-extension
.
Step 2: Select Model
- Navigate to the Hub section.
- Ensure you have downloaded the OpenAI model you want to use.
The OpenAI Inference Engine is the default extension for the Jan application. All the OpenAI models are automatically installed when you install the Jan application.
Step 3: Start the Model
- Navigate to the Thread section.
- Under the Model section, click Remote.
- Select the OpenAI model you want to use.
- Start the conversation with the OpenAI model.
OpenAI Models
You can also use specific OpenAI models you cannot find in the Hub section by customizing the model.json
file, which you can see in the ~/jan/models/
. Follow the steps in the Manage Models to manually add a model.
- You can find the list of available models in the OpenAI Platform (opens in a new tab).
- The
id
property must match the model name in the list.- For example, if you want to use the GPT-4 Turbo (opens in a new tab), you must set the
id
property togpt-4-1106-preview
.
- For example, if you want to use the GPT-4 Turbo (opens in a new tab), you must set the
Troubleshooting
If you encounter any issues during the integration process or while using OpenAI with Jan, consider the following troubleshooting steps:
- Double-check your API credentials to ensure they are correct.
- Check for error messages or logs that may provide insight into the issue.
- Reach out to OpenAI API support for assistance if needed.