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

# Connect Kilo Code

> Set up Kilo Code in VS Code with the Fortytwo API: install the extension, add Fortytwo as a custom OpenAI-compatible provider and select qwen/qwen3.8-27b.

[Kilo Code ](https://kilo.ai/) is a coding agent for VS Code. For the terminal version, see [Kilo CLI](https://docs.fortytwo.network/agents/kilo-cli.md).

> [!NOTE]
>
> **Before you start:** create a Fortytwo API key and buy credits — see [Quickstart, step 1](https://docs.fortytwo.network/docs/quickstart.md#1-create-an-api-key). Give each agent its own key with a **Spend limit**.
>
> | Setting | Value |
> | - | - |
> | Base URL | `https://api.fortytwo.network/v1` |
> | Model ID | `qwen/qwen3.8-27b` |

**1. Install Kilo Code**

In VS Code, open **Extensions**, search for **Kilo Code** and press **Install** on **Kilo Code: AI Coding Agent** by the verified publisher **Kilo Code**. The extension is also on the [VS Code Marketplace ](https://marketplace.visualstudio.com/items?itemName=kilocode.kilo-code) and [Open VSX ](https://open-vsx.org/extension/kilocode/Kilo-Code).

![VS Code Extensions view: Kilo Code by the verified publisher Kilo Code, Install button](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-01.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=1b7281fb98e02ecd4da3fc907c0fbe3e)

If VS Code asks **Do you trust the publisher "Kilo Code"?**, press **Trust Publisher & Install**.

![VS Code: Trust Publisher & Install dialog for Kilo Code](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-02.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=5333da12136d0d849779582db3ab53ee)

**2. Kilo onboarding: choose how you work**

Click the Kilo icon in the side bar. On **Welcome to Kilo**, choose how you want to work: **Review first** or **High autonomy**. Either option works with Fortytwo.

![Kilo Code: Welcome to Kilo with the Review first and High autonomy options](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-03.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=a88dbe8d4b4a64df851d01d66feb6db9)

**3. Add Fortytwo as a provider**

1. Open **Settings** (the gear at the top of the Kilo panel).
2. Then the **Providers** tab → **Custom provider** → **Connect**.
3. Fill in the dialog:

| Field | Enter |
| - | - |
| **Provider ID** | `fortytwo` |
| **Display name** | `Fortytwo` |
| **Provider API** | **OpenAI Compatible** |
| **Base URL** | `https://api.fortytwo.network/v1` |
| **API key** | Your Fortytwo API key |
| **Models** | Press **Fetch models** and add `qwen/qwen3.8-27b`. Turn on **Reasoning** and **Image** |

4. Press **Submit**.

![Kilo Code: Settings gear in the Kilo panel opens Kilo Settings on the Providers tab](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-04.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=767348218931bc75b07317dd41e99b29)

![Kilo Code: Custom provider row with the Connect button](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-05.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=527984df12d7e14e7cb10a330c802d55)

![Kilo Code: Custom provider dialog filled in for Fortytwo, model qwen/qwen3.8-27b with Reasoning and Image on](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-06.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=2f2ac0b078dbe2a29a651c9a450b3400)

**4. Set the context size**

Kilo needs the model's context and output limits to manage long sessions. In **Providers**, open the **Fortytwo** provider again. In **Edit provider**, press **Edit advanced settings in the JSON config file**: `kilo.jsonc` opens in the editor. Add the `limit` line to the model:

```json ~/.config/kilo/kilo.jsonc theme={null}
"qwen/qwen3.8-27b": {
  "name": "qwen/qwen3.8-27b",
  "limit": { "context": 262144, "output": 16384 },
  "reasoning": true
}
```

Save the file.

![Kilo Code: Edit provider dialog with the Edit advanced settings in the JSON config file link](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-07.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=d8789441599c20f0a2e93fcbcdcc0198)

![kilo.jsonc: limit line added to the qwen/qwen3.8-27b model of the fortytwo provider](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-08.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=0bc440f9f40cb904cd56a6bee5a869f5)

**5. Select the model and start**

For a wider chat, press **Open in Tab** at the top of the editor: Kilo opens in an editor tab.

![Kilo Code: Open in Tab button](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-09.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=00ab8dc82774e48618e4f616ae22d27e)

1. Click the model selector under the message box. It shows **Auto Free** until you change it.
2. Search for `Fortytwo`.
3. Choose **qwen/qwen3.8-27b** and press **Select**.

   ![Kilo Code: model selector, search for Fortytwo, qwen/qwen3.8-27b and Select](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-10.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=2efcaa1382005ae8a30588d8687b5755)

The selector now shows `qwen/qwen3.8-27b`. Type a message or a task and press **Enter**. The reply shows the model's **Reasoning** above the answer.

![Kilo Code: message ready to send with qwen/qwen3.8-27b selected](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-11.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=75af7417554c001592f892266d4d66d7)

![Kilo Code: reply from qwen/qwen3.8-27b with its reasoning](https://mintcdn.com/fortytwo-f43ac997/HbC5gKcbcuN88RH4/resources/illustrations/agents/kilo-code-12.png?fit=max\&auto=format\&n=HbC5gKcbcuN88RH4\&q=85\&s=a652e7cc13e5ad5e6042bea35d927cba)

Kilo Code and Kilo CLI share these settings. More options: [Kilo OpenAI-compatible provider ](https://kilo.ai/docs/ai-providers/openai-compatible).

***

Something not working with your agent, or using one we have not listed? Tell us in the platform: [Feedback](https://docs.fortytwo.network/docs/support.md#ideas-feedback-and-small-bugs) for ideas and small bugs, [Contact support](https://docs.fortytwo.network/docs/support.md#support-account-api-billing-credits-errors) if it blocks your work, or [Report a security issue](https://docs.fortytwo.network/docs/support.md#security-issue).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.