MindPlug
  • 🧠Introduction
  • 🔹How does it work?
  • 🍁JavaScript SDK
  • 🌴API
    • 📗API Setup - Text
    • 📗API Setup - Audio
      • 🔉Performing Transcription
    • 📗API Setup - PDFs
    • 📙Storing Data
    • 📙Store PDF
    • 📙Store Web
    • 📙Query Data
      • 🧠Using Metadata Filters
    • 📙Query By Ids
    • 📙Query by collection
    • 📙Delete By Ids
    • 📙Delete By Upload Id
    • 📙Delete Collection
    • 📙Delete Project
    • 📙List Projects
    • 📙List Collections
    • 📙Search Web
    • Parse Webpage
Powered by GitBook
On this page
  1. API

API Setup - Text

Required for Mindplug API access

Last updated 1 year ago

Base Instance

In this setup, we will use 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.

src/mindplugAPI.ts
// Axios instance with mindplug auth
import axios from 'axios';

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

 export default mindplug; 

🌴
📗
axios