Skip to main content

Open Models

Interact with custom or fine-tuned models using their unique identifier directly through the Knowledgator TypeScript SDK.


Available Modules​


Example Usage​

import { createClient } from '@knowledgator/typescript-sdk';

const kg = createClient('YOUR_API_KEY');

// Initialize the model client
const model = kg.model('your-model-id');

// Generic prediction
const response = await model.predict({
input: 'text to process'
});
console.log(response);

// Method-based inference
const generator = kg.model('your-model-id', 'generate');
const result = await generator.predict({
prompt: 'Tell me a story about a brave knight.'
});
console.log(result);