> For the complete documentation index, see [llms.txt](https://rqndomhax.gitbook.io/versaapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rqndomhax.gitbook.io/versaapi/initializing-the-api.md).

# Initializing the API

To start using the API you will have to add in your `plugin.yml` the following line:

```
depend: [VersaAPI]
```

You also have to put the `Versa.jar` in your `plugins` folder

{% hint style="danger" %}
The JAR file is not the API, it's the Minecraft plugin !!!
{% endhint %}

Now you will need to get the API in your plugin.

Here is an example on how to do this:

```java
public class Main extends JavaPlugin {

    VersaAPI api;

    @Override
    public void onEnable() {
        GetVersaAPI getApi = (GetVersaAPI) Bukkit.getServicesManager().load(GetVersaAPI.class); // We're getting the API

        if (getApi == null) {    // If the API couldn't be found we'll stop the plugin
            onDisable();
            return;
        }
        api = getApi.getAPI();    // We're saving the api for later use
        super.onEnable();
    }

}
```

Now everything is set up, you can interact with the `VersaAPI` using the `api` variable.

Good luck !
