Get Started
Deployment - JavaScript/TypeScript
Deploy your Kinetix ML pipeline to JavaScript or TypeScript in less than 5 minutes.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Deploy your Kinetix ML pipeline to JavaScript or TypeScript in less than 5 minutes.
yarn add kml-pipe-ts
import { KMLPipeline } from 'kml-pipe-ts';
var pipeline = new KMLPipeline("[Your Project Name]", "[Your API Key]");
await pipeline.initialize();
await pipeline.execute([]) // the [] should be replaced with your list of inputs
<video id="webcam" autoplay />
let outputs = []
let processing = false
async function runInference() {
if (!processing) {
processing = true;
outputs = await pipe.execute([videoSource]);
processing = false;
}
document.getElementById("webcam").requestVideoFrameCallback(runInference); // run inference on every frame
};
async function startWebcam() {
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
document.getElementById("webcam").srcObject = stream;
await document.getElementById("webcam").play();
document.getElementById("webcam").requestVideoFrameCallback(runInference);
};