innov8ing
v1.0.1
Published
Official TypeScript/Node.js SDK for the Innov8ing Unified Intelligence & Media Gateway
Maintainers
Readme
Innov8ing Node.js & TypeScript SDK
Official JavaScript/TypeScript SDK for the Innov8ing Developer Platform.
Provides zero-overhead client bindings for multi-provider AI model orchestration, token-by-token SSE streaming, and normalized stock media ingestion.
Installation
npm install innov8ingQuickstart
1. Chat Completion (Non-Streaming)
import { Innov8ing } from 'innov8ing';
const client = new Innov8ing({
apiKey: process.env.INNOV8ING_API_KEY, // or pass directly
});
async function run() {
const completion = await client.chat.completions.create({
model: 'inv-chat-fast',
messages: [
{ role: 'system', content: 'You are an executive video scripting copilot.' },
{ role: 'user', content: 'Draft a 15-second product hook for an AI video editor.' },
],
temperature: 0.7,
});
console.log('AI Response:', completion.content);
}
run();2. Real-Time Token Streaming (Async Generator)
import { Innov8ing } from 'innov8ing';
const client = new Innov8ing({ apiKey: 'inv_live_YOUR_KEY' });
async function streamDemo() {
const stream = await client.chat.completions.create({
model: 'inv-chat-fast',
messages: [{ role: 'user', content: 'Explain streaming architecture in 2 lines.' }],
stream: true,
});
for await (const token of stream) {
process.stdout.write(token);
}
}
streamDemo();3. Unified Stock Media Search
const searchResults = await client.media.search({
query: 'cyberpunk neon city drone hyperlapse',
mediaType: 'video',
page: 1,
perPage: 10,
});
console.log('Total Results:', searchResults.totalResults);
console.log('Top Asset URL:', searchResults.results[0]?.url);4. Health & Platform Status
const health = await client.status.health();
console.log('Gateway Health:', health.status); // 'healthy'
const status = await client.status.get();
console.log('Platform Telemetry:', status.description);Error Handling
The SDK exposes granular typed error classes:
import { Innov8ing, AuthenticationError, RateLimitError, Innov8ingError } from 'innov8ing';
try {
const client = new Innov8ing({ apiKey: 'inv_live_invalid' });
await client.models.list();
} catch (error) {
if (error instanceof AuthenticationError) {
console.error('Invalid credentials (401)');
} else if (error instanceof RateLimitError) {
console.error('Rate limit reached (429), please retry with backoff');
} else if (error instanceof Innov8ingError) {
console.error('API Error:', error.message);
}
}License
MIT © Innov8ing
