Test all available AI models on api.wsgpolar.me
// Chat with AI models using the API
const API_KEY = "api_your_key_here";
async function chat(message) {
const response = await fetch("https://api.wsgpolar.me/v1/ai/chat?API=" + API_KEY, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "openai/gpt-oss-120b",
messages: [{ role: "user", content: message }],
max_tokens: 2048,
temperature: 0.7
})
});
const data = await response.json();
return data.choices[0].message.content;
}
// Example usage
const reply = await chat("Hello! Tell me a joke.");
console.log(reply);