Get started in 2 minutes
Add Metriqual to your application with just a few lines of code. Works as a drop-in replacement for OpenAI and other providers.
Install the SDK
Choose your language and install Metriqual
Initialize the client
Add your API key and configure options
Make your first request
Use Metriqual as a drop-in replacement
View your dashboard
See real-time metrics and insights
Step 1: Install the SDK
pip install metriqual
Step 2-3: Initialize and Make Requests
from metriqual import Metriqual
# Initialize the client
client = Metriqual(
api_key="your-api-key",
environment="production" # optional
)
# Make a request (OpenAI compatible)
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"}
],
temperature=0.7
)
# Access the response
print(response.choices[0].message.content)
# Access metrics (automatically tracked)
print(f"Cost: ${response.metrics.cost}")
print(f"Latency: {response.metrics.latency}ms")
print(f"Tokens: {response.metrics.tokens.total}")
What you get out of the box
No configuration needed. Everything works automatically.
Real-time Monitoring
Every request is automatically tracked. See latency, costs, and errors instantly.
Smart Routing
Automatically routes to the best model based on your requirements and availability.
Quality Checks
Built-in evaluations catch issues before they reach users. No setup required.
Step 4: View Your Dashboard
Once you've made your first request, head to your dashboard to see real-time metrics, cost tracking, and performance insights.
Need help getting started?
Our team is here to help you succeed. Choose the support option that works best for you.