> For the complete documentation index, see [llms.txt](https://docs.vysp.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vysp.ai/typescript-js-client/quick-setup-with-ts-js-client-library.md).

# Quick Setup with TS/JS Client Library

Setting up the Client Library for VYSP API is easy. Follow these steps to integrate it into your project.

## Installation

Use npm to install the library:

```bash
npm install --save-dev vysp@latest
```

## Basic Usage

Here is a simple example to get you started:

```typescript
import VYSPClient, { VYSPClientConfig } from 'vysp';

const vyspClientConfig: VYSPClientConfig = {
  tenantApiKey: process.env.VYSP_TENANT_API_KEY!,
  gateApiKey: process.env.VYSP_GATE_API_KEY!,
  installationType: "cloud",
}

const client = VYSPClient.clientFromConfig(vyspClientConfig)

const prompt = 'sample input'; // gather input from user
const modelOutput = 'sample model output'; // send a request to model

async function performCheckInput() {
    try {
        const response = await client.checkInput('user1', prompt);
        console.log(response);
    } catch (error) {
        console.error('Error:', error.message);
    }
}

async function performCheckOutput() {
    try {
        const response = await client.checkOutput('user1', prompt, modelOutput);
        console.log(response);
    } catch (error) {
        console.error('Error:', error.message);
    }
}

performCheckInput();
performCheckOutput();
```
