> ## Documentation Index
> Fetch the complete documentation index at: https://docs.typingmind.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI Fine-tuning Models

OpenAI's fine-tuning model can be used on TypingMind. Here are 3 simple steps to set it up:

## 1. Access Fine-tuning on OpenAI

First, log into your OpenAI API account at [https://platform.openai.com](https://platform.openai.com/) and go to “**Fine-tuning**”

<img src="https://mintcdn.com/typingmind/7fxalBaEFNO2seEf/manage-and-connect-ai-models/openai-fine-tuning-models/image.webp?fit=max&auto=format&n=7fxalBaEFNO2seEf&q=85&s=e6ffaebb6aa6bf4795a11c5273c689ef" alt="image.webp" width="2832" height="1558" data-path="manage-and-connect-ai-models/openai-fine-tuning-models/image.webp" />

## 2. Create a fine-tuning model

Click “**Create new**” and select the **GPT-3.5-turbo** as the base model (TypingMind doesn’t support other base models now)

Upload the .jsonl file to use for training, please follow the [OpenAI instructions](https://platform.openai.com/docs/guides/fine-tuning) to create the file.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/typingmind/manage-and-connect-ai-models/openai-fine-tuning-models/image%201.webp" alt="image.webp" />

## 3. Get the model ID and API key

Once you're done with all of that, you'll get the **model ID**.

Copy it along with your OpenAI API key to a safe place, you will need them soon.

<img src="https://mintcdn.com/typingmind/7fxalBaEFNO2seEf/manage-and-connect-ai-models/openai-fine-tuning-models/Untitled.webp?fit=max&auto=format&n=7fxalBaEFNO2seEf&q=85&s=a20b5d83f7d0f7b04c9d6ae205744211" alt="Untitled" width="3048" height="1862" data-path="manage-and-connect-ai-models/openai-fine-tuning-models/Untitled.webp" />

## 4. Set up fine-tuning model on TypingMind

Head over to [typingmind.com](http://typingmind.com), click "**Models**" on the left side panel. Then, select “**Add Custom Model**”.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/typingmind/manage-and-connect-ai-models/openai-fine-tuning-models/image%202.webp" alt="image.webp" />

Here’s how you fill in the fields:

* Name: `GPT-3.5 Fine-tuning` (or you can set any name you want)
* Endpoint: `https://api.openai.com/v1/chat/completions`
* Model ID: input the model ID you have just copied at step 3
* Context Length: 4096
* You can enable the “**Support Plugins**” toggle if you want to use the plugins for your fine-tuning model.
* Click “**Add Custom Headers**” and add: `Authorization`: `Bearer {{your OpenAI API key}}`

Here is what it looks like:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/typingmind/manage-and-connect-ai-models/openai-fine-tuning-models/Untitled%201.webp" alt="Untitled" />

Hit “**Test**” to make sure the model work well and then click “**Add Model**”.

That's it! You're all set!
