# Auto-completion

The **Auto-completion** feature is a convenient function that recommends code based on the user's input using gpt-4.1-mini-based AI, which can be immediately applied in the editor.

### Key features <a href="#key-features" id="key-features"></a>

* **Real-time code completion**\
  As you type, AI predicts the next code to be entered and automatically completes it for you.
* **Support for various programming languages**\
  It supports a wide range of languages, including Python, JavaScript, and Java, for your convenience.

### How to Set Up the Feature <a href="#how-to-set-up-the-feature" id="how-to-set-up-the-feature"></a>

* Clicking the **\[Auto completion]** button at the bottom right of the workspace toggles the feature on or off. When the feature is enabled, the **\[Auto completion]** button appears purple.

<figure><img src="/files/RJkwQOOCoZRcCssi8mkN" alt=""><figcaption></figcaption></figure>

### How to Use <a href="#how-to-use" id="how-to-use"></a>

{% stepper %}
{% step %}
When you enter code in the editor, AI-recommended code will be displayed as gray text to the right.

<figure><img src="/files/eiqKTgVaubA9ulFfutVZ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
If you like to use the recommended code, press the <kbd>Tab</kbd> key to apply it.

<figure><img src="/files/zcXMhtsaoWdEnjHykPgs" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}

* This feature is only available to credit plan (Free, Membership) users.
* Free plan users are provided with limited usage. For more usage, please use the Membership plan.
* Excessive use may restrict usage until the end of the month, but usage will be reset on the 1st of each month.
  {% endhint %}

### Use in Shared Containers <a href="#use-in-shared-containers" id="use-in-shared-containers"></a>

The AI code completion feature is also available in shared containers.

* It can only be used if the container owner has enabled AI code completion.
* The usage of the AI code completion feature in shared containers is charged to the container owner.
* If all provided usage is exhausted, the feature cannot be used in that container.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkain.io/user-guide/arkain-ai/auto-completion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
