
Getting Started with LLM Gateway in 5 Minutes
This guide walks you through making your first LLM request through LLM Gateway. By the end, you'll have a working API key and a completed request visible in your dashboard. Step 1: Get an API Key Sign in to the LLM Gateway dashboard . Create a new Project . Copy the API key. Export it in your shell or add it to a .env file: export LLM_GATEWAY_API_KEY = "llmgtwy_XXXXXXXXXXXXXXXX" Step 2: Make Your First Request LLM Gateway uses an OpenAI-compatible API. Point your requests to https://api.llmgateway.io/v1 and you're done. Using curl curl -X POST https://api.llmgateway.io/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $LLM_GATEWAY_API_KEY " \ -d '{ "model": "gpt-4o", "messages": [ {"role": "user", "content": "What is an LLM gateway?"} ] }' Using Node.js (OpenAI SDK) import OpenAI from " openai " ; const client = new OpenAI ({ baseURL : " https://api.llmgateway.io/v1 " , apiKey : process . env . LLM_GATEWAY_API_KEY , }); const response = await client
Continue reading on Dev.to Tutorial
Opens in a new tab

