Endpoint | Description |
---|
Here are the parameters and examples for Endpoint 1:
Params | Desc | Required |
---|---|---|
query | Ask something | true |
key | Your API Key | true |
Define Your API Config
const api = {
xterm: {
url: "https://ai.xterm.codes",
key: "YOUR_APIKEY"
}
};
Simple request:
https://ai.xterm.codes/api/chat/bard?query=query&key=YOUR_APIKEY
Full code:
async function bard(q) {
let ai = await fetch(`${api.xterm.url}/api/chat/bard?query=${q}&key=${api.xterm.key}`)
.then(response => response.json());
return ai
}
bard("Hello, who are you?")
.then(a => console.log(a))