Skip to content

Quickstart - API Monitoring Setup

1. Create a project

Sign up at kohicorp.com and create a project. You get a project key and secret key.

2. Set up the SDK

You can use the setup wizard or do it manually.

Run this in your project directory and follow the prompts. It detects your framework, installs the right SDK, and configures your credentials.

npx @kohicorp/wizard

The wizard supports Express, Next.js, FastAPI, Flask, net/http, and fasthttp. Once it finishes you can skip straight to deploying.

Manual setup

Install

npm install kohi-node dotenv

Add your keys

Add to .env (or .env.local for Next.js):

KOHI_PROJECT_KEY=pk_your_project_key
KOHI_SECRET_KEY=your_secret_key

Initialize

Must be the first middleware, before express.json(), cors(), or any routes.

require("dotenv").config();
const express = require("express");
const { init } = require("kohi-node");
const app = express();
const { expressMiddleware } = init({
projectKey: process.env.KOHI_PROJECT_KEY,
secretKey: process.env.KOHI_SECRET_KEY,
});
app.use(expressMiddleware());
app.use(express.json());
// ... your routes

3. Deploy

Deploy your app. Requests and errors start appearing in your dashboard within seconds.