Skip to content

Quick Start

This guide will help you make your first API call with the Exnest AI SDK.

Before you begin, make sure you have:

  • An Exnest AI API Key (Get one from the Exnest Dashboard)
  • Node.js 18+ or Python 3.8+ installed

The ExnestAI client provides full control over configuration, retries, and access to all features including EBC.

import { ExnestAI } from '@exnest-dev/ai';
const exnest = new ExnestAI({
apiKey: 'your-api-key',
baseUrl: 'https://api.exnest.app/v1', // Optional
timeout: 30000, // Optional
retries: 3, // Optional
retryDelay: 1000, // Optional
debug: true // Optional
});
// Simple chat completion
const response = await exnest.chat('gpt-4.1-mini', [
{ role: 'user', content: 'Hello, how are you?' }
]);
console.log(response.data.choices[0].message.content);

For quick and simple use cases.

import { ExnestWrapper } from '@exnest-dev/ai';
const exnest = new ExnestWrapper('your-api-key');
// Simple response
const response = await exnest.response('claude-3-haiku', 'What is TypeScript?');
console.log(response.data.choices[0].message.content);