Node SDK: Getting Started
The Keito Node SDK (@keito/sdk) provides a typed client for TypeScript and JavaScript applications.
Install
npm install @keito/sdk
# or
yarn add @keito/sdk
# or
pnpm add @keito/sdk
Initialise
import { Keito } from '@keito/sdk';
const keito = new Keito({
apiKey: process.env.KEITO_API_KEY,
accountId: process.env.KEITO_ACCOUNT_ID,
});
The client reads KEITO_API_KEY and KEITO_ACCOUNT_ID from environment variables by default, so you can also write:
const keito = new Keito();
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | env | Your API key |
accountId | string | env | Your workspace ID |
baseUrl | string | https://api.keito.ai/v1 | API base URL |
maxRetries | number | 2 | Max retry attempts on failure |
timeout | number | 30000 | Request timeout in ms |
Your First Request
// List all projects
const projects = await keito.projects.list();
for (const project of projects.data) {
console.log(`${project.name} (${project.id})`);
}
Next Steps
- Time Entries — create, list, and manage time entries
- Expenses — log LLM token costs
- Agent Integration — the session pattern for agent workflows