This guide will help you start logging your LLM requests with Muxx in just a few minutes.
Prerequisites
- A Muxx account (sign up here)
- An API key from your LLM provider (OpenAI, Anthropic, or Google)
Step 1: Create a Project
- Log in to the Muxx dashboard
- Create or select an organization
- Click New Project and give it a name
- Add your LLM provider API key in the project settings
Step 2: Create Your Muxx API Key
- In your project, go to Settings → API Keys
- Click Create Key
- Choose Live for production or Test for development
- Click Create and copy the key immediately
muxx_sk_live_xxxxxxxxxxxxxxxxxxxx
The full key is only shown once. Store it securely—you’ll need it to authenticate requests.
See API Keys for more details on key management and security best practices.
Step 3: Choose Your Integration
Gateway Only
Python SDK
TypeScript SDK
The simplest option—just change your base URL.from openai import OpenAI
client = OpenAI(
api_key="your-openai-key", # Or use OPENAI_API_KEY env var
base_url="https://gateway.muxx.dev/v1",
default_headers={
"X-Muxx-Api-Key": "muxx_sk_live_xxxxxxxxxxxx"
}
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
For deeper tracing with spans and decorators.from muxx import Muxx
from openai import OpenAI
muxx = Muxx(api_key="muxx_sk_live_xxxxxxxxxxxx")
client = muxx.wrap(OpenAI())
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
For Node.js and TypeScript applications.import { Muxx } from 'muxx';
import OpenAI from 'openai';
const muxx = new Muxx({ apiKey: 'muxx_sk_live_xxxxxxxxxxxx' });
const client = muxx.wrap(new OpenAI());
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello!' }],
});
Step 4: View Your Logs
After making a request, head to the Muxx dashboard. You’ll see:
- Request logs with full payloads
- Token usage and cost breakdown
- Latency measurements
- Model and provider information
Next Steps