Hi @hgarg ,
Currently we don’t provide documentation for JS (or TS).
You could probably use simple fetch:
const HF_API_TOKEN = "api_xxxx";
const model = "XXX"

const data = {inputs:"Something here"};

const response = await fetch(`https://api-inference.huggingface.co/models/${model}`, {headers: {"Authorization": `Bearer ${HF_API_TOKEN}`}, method: "POST", data:JSON.stringify(data)});
const data = await response.json()

should work.
Cheers,
Nicolas