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

# Kilo Code Integration Guide

Kilo Code is a Coding Agent plugin that runs in an IDE and is suitable for completing development tasks such as code generation, code modification, and debugging through natural language. By configuring the OpenAI Compatible API, Kilo Code can connect to Step models and directly call inference capabilities inside the editor.

This document explains the prerequisites, configuration method, parameter recommendations, and basic test flow for integrating the Step API with Kilo Code.

## Overview

Kilo Code is suitable for natural language programming collaboration inside the editor. After API configuration is complete, you can directly call Step models in the IDE panel.

## Prerequisites

### Development Environment

The following IDEs are supported:

* Cursor (recommended)
* VS Code

### Install the Kilo Code Plugin

Search for and install the following in the IDE Marketplace:

```text theme={null}
Kilo Code
```

After installation, the Kilo Code panel will appear in the IDE.

### Subscribe to Step Plan

Before you start configuring, make sure your current account has an active Step Plan subscription. Only accounts with the required plan or calling permissions can use model calls and quotas normally.

To subscribe or purchase, visit [Step Plan subscription](https://platform.stepfun.ai/step-plan)

### Obtain a Step API Key

Visit the [Step Open Platform Console](https://platform.stepfun.ai/interface-key) to create an API Key and keep it safe:

## Configuration Steps

Open the Kilo Code settings page and configure the API Provider.

### Connection Configuration

Fill in the following parameters:

* `API Provider`: `OpenAI Compatible`
* `Base URL`: `https://api.stepfun.ai/step_plan/v1`
* `API Key`: enter the Step API Key
* `Model ID`: enter `<model_id>`

> Note: In the examples below, replace `<model_id>` with `step-3.7-flash`, `step-3.5-flash-2603`, or `step-3.5-flash`.

### Parameter Recommendations

Recommended parameters are as follows:

```text theme={null}
Stream: Enabled
Context Window: 256000
Include max output tokens: Off
Max Output Tokens: -1
```

### Compatibility Notes

In some plugin versions, if `Include max output tokens` is enabled, the request may automatically include the following fields:

```text theme={null}
max_tokens
max_output_tokens
```

Different OpenAI Compatible APIs may differ in compatibility with these fields, which may cause the plugin request to fail and display:

```text theme={null}
OpenAI completion error: Connection error
```

If you encounter this issue, you can try:

* Turn off `Include max output tokens`
* Or keep `Max Output Tokens = -1` and let the server decide the output length

## Test the Integration

After configuration is complete, you can enter a simple task for verification:

```text theme={null}
Create a hello world script in Python
```

If the integration is successful, the model will usually return content similar to:

```python theme={null}
print("Hello, world!")
```

## Common Issues

### Connection error

If the following error occurs:

```text theme={null}
OpenAI completion error: Connection error
```

Please check:

1. Whether the `Base URL` is `https://api.stepfun.ai/step_plan/v1`.
2. Whether the API Key is valid.
3. Whether the `Model ID` is `<model_id>`.
4. Whether `Include max output tokens` has been turned off.

### API Key Error

If the following error occurs:

```text theme={null}
401 Incorrect API key
```

Please check:

* Whether the key was copied completely
* Whether the key belongs to the correct environment

## Summary

After completing the OpenAI Compatible configuration, Kilo Code can use Step models in the IDE for tasks such as code generation, file editing, and assisted project development. It is recommended to prioritize the recommended parameter combination and perform a minimal task verification first.
