Move from OpenAI or OpenRouter to LLMTR in 5 minutes
This guide is for developer teams moving an existing OpenAI-compatible client to the LLMTR gateway and verifying the first paid top-up flow.
1. Change the base URL
Section titled “1. Change the base URL”Point your OpenAI-compatible client to the LLMTR gateway.
export OPENAI_BASE_URL="https://llmtr.com/v1"export OPENAI_API_KEY="llmtr-your_key"You can keep the same SDK and change only base_url, apiKey, and model.
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, baseURL: process.env.OPENAI_BASE_URL});
const response = await client.chat.completions.create({ model: "llmtr/turkce-llama-3-8b", messages: [{ role: "user", content: "Hello" }]});
console.log(response.choices[0]?.message.content);2. Create an API key
Section titled “2. Create an API key”Open API Keys in the dashboard and store the new key only as a server-side environment variable. The raw key is shown once.
3. Send the first request with a free model
Section titled “3. Send the first request with a free model”Choose a chat model marked as free in the model catalog, or send the first request from Playground. This verifies that the gateway and usage-record flow work with zero balance.
4. Top up $5
Section titled “4. Top up $5”Start a $5 top-up on Billing. The backend preview shows credit added, 6% platform margin, USD charge amount, and approximate TRY estimate before checkout.
| Credit added | Platform margin | Amount charged |
|---|---|---|
| $5.00 | $0.30 | $5.30 |
After payment completes, the balance should update and the receipt link should appear in transaction history.
5. Pre-production check
Section titled “5. Pre-production check”- Is the API key stored server-side?
- Does the selected model’s data policy fit your team requirements?
- Does the free-model request appear in usage?
- After the $5 top-up, are balance, transaction history, and receipt correct?
- Is the OpenAI/OpenRouter fallback plan and canonical model ID list documented?
References: Node.js SDK, Billing, Security.