Installation

How to install and configure deepseek-kit in your project.

Prerequisites

Install Package

npm
pnpm
bun
yarn
npm i deepseek-kit zod dotenv

Configure API Key

Create a .env file in your project root:

DEEPSEEK_API_KEY=your_api_key

The createModel function automatically reads the DEEPSEEK_API_KEY environment variable.

Alternatively, you can pass the API key directly:

import { createModel } from 'deepseek-kit'

const model = createModel({
  model: 'deepseek-v4-flash',
  apiKey: 'your-api-key',
})

Verify Installation

Create a simple script to verify the installation:

import { createModel } from 'deepseek-kit'

const model = createModel({
  model: 'deepseek-v4-flash',
  apiKey: 'your-api-key',
})
const balance = await model.balance()
console.log(balance)