LLM Gateway

1 min read Original article ↗

import OpenAI from "openai";

const client = new OpenAI({

apiKey: process.env.LLM_GATEWAY_API_KEY,

baseURL: "https://api.llmgateway.io/v1"

});

const response = await client.chat.completions.create({

model: "gpt-5",

messages: [

{ role: "user", content: "Hello, how are you?" }

]

});

console.log(response.choices[0].message.content);