Getting Started with KANA

Learn how to integrate KANA's divine intelligence into your projects in just a few minutes.

Quick Start

1. Installation

Install the KANA SDK via npm or yarn:

terminal
# Using npm
npm install @kana/sdk
# Using yarn
yarn add @kana/sdk

2. Initialize KANA

Import and initialize KANA in your project:

JavaScript
import { Kana } from '@kana/sdk'

// Initialize KANA
const kana = new Kana({
  apiKey: process.env.KANA_API_KEY,
  network: 'mainnet-beta', // Solana network
})

// Start chatting
const response = await kana.chat('gm')
console.log(response)

3. Ask Questions

Query KANA's knowledge base:

JavaScript
// Ask about Solana
const solanaInfo = await kana.chat('Tell me about Solana')

// Security question
const securityTips = await kana.chat('How to avoid phishing?')

// Dev humor
const coffeeWisdom = await kana.chat('Tell me about coffee')

Configuration

Customize KANA's behavior with configuration options:

const kana = new Kana({
  // Required
  apiKey: 'your-api-key',

  // Optional
  network: 'mainnet-beta',        // 'mainnet-beta' | 'devnet' | 'testnet'
  temperature: 0.7,                // Response creativity (0-1)
  maxTokens: 500,                  // Max response length
  knowledge: ['solana', 'web3'],   // Knowledge domains
  personality: 'divine',           // 'divine' | 'casual' | 'technical'
})
API Key

Get your API key from the KANA dashboard. Keep it secure and never expose it in client-side code.

Network

Choose the Solana network. Mainnet for production, devnet for testing.

Knowledge Base

Access comprehensive knowledge on Solana, Web3, security, and more.

Learn more

Security First

Built-in security checks and best practice recommendations.

Learn more

Easy Integration

Simple API, extensive examples, and great developer experience.

View examples