Lunos logoLunos

Observability

Observability lets you capture structured debugging data for specific completion requests. It is opt-in per request, so your normal traffic stays lightweight.

Why use it

Enable observability when you need to inspect:

  • exact request payload sent by your app
  • generated output from the model response
  • usage details (tokens, cost, TPS)
  • generated completion id tied to the same log row

How it works

  1. Send a completion request with observability: true.
  2. Lunos processes the completion as usual.
  3. Lunos stores observability payload data linked to the same query history entry.
  4. In Dashboard Logs, open Detail on that row to inspect structured data.

Request flag

Field Type Required Description
observability boolean No When true, observability payload is stored for that request.

If omitted or set to false, no observability payload is written.

Quick start

curl -X POST "https://api.lunos.tech/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-4-26b-a4b-it",
    "observability": true,
    "messages": [
      {
        "role": "user",
        "content": [{ "type": "text", "text": "Can you jogging?" }]
      }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.lunos.tech/v1",
)

response = client.chat.completions.create(
    model="google/gemma-4-26b-a4b-it",
    observability=True,
    messages=[{"role": "user", "content": "Can you jogging?"}],
)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.LUNOS_API_KEY!,
  baseURL: "https://api.lunos.tech/v1",
});

const response = await client.chat.completions.create({
  model: "google/gemma-4-26b-a4b-it",
  observability: true,
  messages: [{ role: "user", content: "Can you jogging?" }],
});

Viewing observability data

  1. Open Dashboard → Logs
  2. Find the request row
  3. Click Detail

You will see structured sections for request messages, response output, and usage metrics.

Next steps