# API Setup - PDFs

### Base Instance

In this setup, we will use [axios](https://www.npmjs.com/package/axios) which is an industry standard package for making API calls.

It is recommended to create a base instance of axios which utilizes your mindplug key in one file. This makes it easier to manage for the future. The file can be stored anywhere within the src directory.&#x20;

This instance is the same as the Text instance with only difference being in the headers.

{% code title="src/mindplugAPI.ts" overflow="wrap" lineNumbers="true" %}

```javascript
// Axios instance with mindplug auth
import axios from 'axios';

const mindplug = axios.create({
    baseURL: "https://connect.mindplug.io/api",
    headers: {
        "Content-Type": "multipart/form-data",
        "Authorization": "Bearer <MINDPLUG_KEY>"
    }
});

 export default mindplug; 
```

{% endcode %}
