Follow these steps to send your first successful request through Lunos. This guide assumes you can run shell commands locally.
Note: You need a Lunos account. Create one if you have not already, then open the dashboard.
development-laptop).Important: Keys are secrets. Do not commit them to git or expose them in frontend bundles.
Note:
@lunos/clientis the first-party SDK for TS/JS. For Python and other languages you can use the OpenAI SDK against the Lunos base URL, or plain HTTP.
Warning: The npm package may lag behind the live API and can fail for newer endpoints or options. If you hit errors, switch to the OpenAI JavaScript SDK with
baseURL: "https://api.lunos.tech/v1"and your Lunos API key, or use raw HTTP.
pnpm add @lunos/client
pip install openai
import { LunosClient } from "@lunos/client";
const client = new LunosClient({
apiKey: process.env.LUNOS_API_KEY!,
baseURL: "https://api.lunos.tech/v1",
appId: "my-app-v1", // optional, for analytics
});
from openai import OpenAI
client = OpenAI(
api_key="your_api_key_here",
base_url="https://api.lunos.tech/v1",
default_headers={"X-App-ID": "my-app-v1"}, # optional
)
const response = await client.chat.createCompletion({
model: "openai/gpt-4o",
messages: [
{
role: "user",
content: "Write a short poem about artificial intelligence.",
},
],
max_tokens: 150,
temperature: 0.7,
});
console.log(response.choices[0].message.content);
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[
{"role": "user", "content": "Write a short poem about artificial intelligence."},
],
max_tokens=150,
temperature=0.7,
)
print(response.choices[0].message.content)
Add observability: true to a completion request when you need deeper inspection for a specific call.
const response = await client.chat.completions.create({
model: "google/gemma-4-26b-a4b-it",
observability: true,
messages: [{ role: "user", content: "Can you jogging?" }],
});
response = client.chat.completions.create(
model="google/gemma-4-26b-a4b-it",
observability=True,
messages=[{"role": "user", "content": "Can you jogging?"}],
)
Then open Dashboard → Logs, click Detail on that request row, and inspect structured request/output/usage data.
Email hello@lunos.tech or read the FAQ.
No headings found on this page.
