---
title: "Using Vercel v0 with Kilo Code"
description: "Connect Vercel's v0 models to Kilo Code for UI-focused code generation. Setup guide for VS Code and the CLI."
sidebar_label: v0
---

# Using v0 With Kilo Code

Kilo Code supports v0, Vercel's AI model provider that offers an OpenAI-compatible API. This allows you to use v0's models with Kilo Code through the familiar OpenAI API interface.

## Prerequisites

To use v0 with Kilo Code, you'll need:

- A team account with Vercel v0
- A v0 API key

## Configuration

{% tabs %}
{% tab label="VSCode (Legacy)" %}

Setting up v0 in Kilo Code is straightforward:

1. In Kilo Code settings (click the {% codicon name="gear" /%} icon):
   - Under **API Provider**, select: **OpenAI Compatible**
   - Set the **Base URL**: `https://api.v0.dev/v1`
   - Paste in your v0 API key
   - Set the **Model ID**: `v0-1.0-md`
   - Click **Verify** to confirm the connection

<!-- <img src="/docs/img/providers/v0-setup.png" alt="v0 configuration in Kilo Code settings" width="600" /> -->

{% /tab %}
{% tab label="VSCode" %}

Open **Settings** (gear icon) and go to the **Providers** tab to add an OpenAI Compatible provider. Set the base URL to `https://api.v0.dev/v1` and enter your v0 API key.

The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format.

{% /tab %}
{% tab label="CLI" %}

v0 uses the OpenAI-compatible provider. Set the API key and base URL in your config:

**Environment variable:**

```bash
export OPENAI_API_KEY="your-v0-api-key"
```

**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`):

```jsonc
{
  "provider": {
    "openai-compatible": {
      "env": ["OPENAI_API_KEY"],
      "baseURL": "https://api.v0.dev/v1",
    },
  },
}
```

Then set your default model:

```jsonc
{
  "model": "openai-compatible/v0-1.0-md",
}
```

{% /tab %}
{% /tabs %}

## Troubleshooting

- **"Invalid API Key":** Double-check that you've entered the API key correctly.
- **"Model Not Found":** Make sure you're using the correct model ID (`v0-1.0-md`).
- **Connection Errors:** Verify the Base URL is correct (`https://api.v0.dev/v1`).
- **Access Issues:** Confirm that your Vercel v0 team account is active and properly set up.

## Additional Resources

- [v0 Official Documentation](https://v0.dev)
- [Vercel AI Documentation](https://vercel.com/docs/ai)
