This commit is contained in:
geoffsee
2025-05-22 23:14:01 -04:00
commit 33679583af
242 changed files with 15090 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
(async () => {
// Run the script with bun so it automatically picks up the env
const apiKey = process.env.GROQ_API_KEY;
try {
const response = await fetch("https://api.groq.com/openai/v1/models", {
method: "GET",
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
const data = await response.json();
console.log(JSON.stringify(data));
} catch (error) {
console.error("Error fetching data:", error);
}
})();