API
JavaScript SDK
Use the VULK SDK for easy integration
The SDK is currently in beta. For production use, we recommend using the REST API directly.
Overview
The @vulk/sdk package provides a simple way to integrate VULK into your applications.
Installation
npm install @vulk/sdkQuick Start
import { VulkClient } from '@vulk/sdk';
const vulk = new VulkClient({
apiKey: 'vk_your_api_key_here'
});
// List your projects
const projects = await vulk.projects.list();
// Create a new project
const project = await vulk.projects.create({
prompt: 'Create a landing page for a SaaS product'
});Configuration
const vulk = new VulkClient({
apiKey: 'vk_xxx', // Required
baseUrl: 'https://vulk.dev/api/v1', // Optional
timeout: 30000 // Optional (ms)
});Projects
List Projects
const { projects } = await vulk.projects.list({
limit: 20,
offset: 0
});Get Project
const project = await vulk.projects.get('project-id');Create Project
const project = await vulk.projects.create({
prompt: 'Build a dashboard for analytics',
model: 'google/gemini-3-pro-preview' // Optional
});Models
List Available Models
const { models } = await vulk.models.list();
// Returns array of available AI models with:
// - id, name, provider, category, multiplierUsage Stats
const usage = await vulk.usage.get();
// Returns:
// - apiKeys (list of your keys)
// - recentUsage (last 50 requests)
// - totalRequestsError Handling
try {
const project = await vulk.projects.create({ prompt: '...' });
} catch (error) {
if (error.status === 401) {
console.error('Invalid API key');
} else if (error.status === 429) {
console.error('Rate limit exceeded');
}
}TypeScript
The SDK is fully typed:
import type { Project, AIModel, ApiUsage } from '@vulk/sdk';Coming Soon
- Streaming generation updates
- Webhook support
- Team/Organization management