The AI Toolkit for Visual Studio Code is a free extension that lets you download, test, fine‑tune, and use AI models directly from VS Code, either on your own machine or in the cloud. It gives you a simple, step‑by‑step experience so you can go from “no model” to “AI inside my app” without leaving your editor.

What the AI Toolkit does

The AI Toolkit adds a side panel in VS Code where you can see your models, browse a catalog of available models, and open tools like Playground, Bulk Run, Evaluation, and Fine‑tuning. You can start with a ready‑made model, try it in chat, and then decide whether to run it locally or call it from your app.​

In simple terms, it helps you

Before you start

You need Visual Studio Code installed on your machine. If you are new to VS Code, the official “Getting started” guide shows how to install and use the basics of the editor.​

Because you are working with AI, it is also recommended to read Microsoft’s guidance on building responsible AI apps, especially if you plan to use real user data.​

Step 1: Install the AI Toolkit extension

After installation, a new AI Toolkit icon appears in the Activity Bar; this is your entry point to all features.​

AI toolkit-

Step 2: Download a model from the catalog

Open the AI Toolkit view and go to the Catalog section to see available models. From there you can open the Model Catalog and filter by:​

For example, on Windows devices with a GPU you will see options like:

You can turn on Fine‑Tuning Support to show only models that you can later fine‑tune for your own data. When you pick a model (such as Phi‑3 Mini 4K) and click Download, the model files are saved to your machine; larger models may take a few minutes.​

load_model_into_playground

Step 3: Run the model in the Playground

Once the download finishes, your model appears under My Models → Local models. Right‑click it and choose Load in Playground to open an interactive chat window.​

In the Playground you can:

Step 4: Choose the best hardware option

Step 5: Connect the model to your app

When you are happy with a model in the Playground, you can use it from your own application in two main ways.​

Option 1: Local REST API server

  
    pip install openai
  

  
    from openai import OpenAI

client = OpenAI(
    base_url="http://127.0.0.1:5272/v1/",
    api_key="x" # required by API but not used
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "what is the golden ratio?",
        }
    ],
    model="Phi-3-mini-4k-directml-int4-awq-block-128-onnx",
)

print(chat_completion.choices[0].message.content)
  

You can

Option 2: ONNX Runtime in your app

If you want to ship the model with your app and run fully on‑device, you can use ONNX Runtime GenAI directly.​

The article shows

What you can do next

After you have a model running, the next recommended step is to learn how to fine‑tune it using AI Toolkit so that it better matches your own data and use case. The VS Code AI Toolkit docs also cover Prompt Builder, Batch evaluation, and more advanced workflows, all from inside the same extension.​

In everyday language: AI Toolkit turns VS Code into a simple control center for AI install one extension, pick a model, try it in chat, and then plug it into your app with either a local API or ONNX Runtime.