> For the complete documentation index, see [llms.txt](https://docs.night-api.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.night-api.com/start-with-the-npm-module.md).

# Start with the NPM module

### Installation

You can simply install dependence on your project from NPM:

```bash
$ npm install night-api
```

### Start

#### Importation

```javascript
// ES6 (includes typings)
import { NightAPI } from 'night-api';

// CommonJS
const { NightAPI } = require('night-api');
```

#### Initialization

{% hint style="warning" %}
To use the API, you need an authentication key that you can get by connecting or register to [Night-API](https://night-api.com/register)
{% endhint %}

```javascript
const api = new NightAPI('YOUR_API_KEY');
```
