@mvkproject/nexus
Version:
Free AI SDK with API key (500 free daily requests). Access 25+ LLM models (GPT-4, Gemini, Llama, DeepSeek), generate images with 14+ models (Flux, Stable Diffusion), and integrate Akinator game - all completely free.
39 lines (29 loc) ⢠1.07 kB
JavaScript
import NexusClient from '../src/index.js';
const NEXUS_API_KEY = process.env.NEXUS_API_KEY;
if (!NEXUS_API_KEY) {
console.error('ā Error: NEXUS_API_KEY is not configured');
console.log('\nš” To run this test:');
console.log('1. Get your free API key at: https://nexus.drexus.xyz');
console.log('2. Configure it as an environment variable in Replit (Secrets)');
console.log('3. Run: npm run demo\n');
process.exit(1);
}
const client = new NexusClient({ apiKey: NEXUS_API_KEY });
console.log('š Quick test of Nexus SDK\n');
async function quickTest() {
try {
console.log('š Testing text generation...');
const response = await client.text.generate({
model: 'gemini-2.5-flash',
prompt: 'Greet briefly in English',
temperature: 0.7
});
console.log('ā
SDK working correctly!');
console.log('š Response:', response.completion);
console.log('\n⨠The SDK is ready to use\n');
} catch (error) {
console.error('ā Error:', error.message);
process.exit(1);
}
}
quickTest();