Skip to main content
There are two ways to send your LLM traffic to Avaliar. Both capture every request and response as a trace and run safety detection — pick the one that fits your stack.

Proxy API

Route your LLM calls through Avaliar’s endpoint. No SDK, no decorators — swap your provider URL and add your Avaliar key. Works with any language.
Best for: quick setup, non-Python apps, blocking prompt injection.

Python SDK

Wrap your LLM functions with the @traceable decorator. Code-native and gives you local or cloud detection.
Best for: Python apps, the free plan, fine-grained tracing.

Which should I use?

Proxy APIPython SDK
How you integrateChange your endpoint URLAdd a @traceable decorator
LanguageAny (HTTP)Python
Code changesNone beyond the URLDecorate your LLM functions
DetectionCloudLocal or Cloud
Blocks prompt injectionYes (before it reaches the LLM)No
Plan requiredProFree
Not sure? If you’re in Python and on the free plan, start with the SDK. If you want zero code changes or you’re not on Python, use the Proxy API.

Set up your method

Both paths start with an API key from the Avaliar Dashboard under Settings → API Keys — the only difference is the scope you pick.
1

Create a Proxy API key

  1. Open Settings → API Keys in the dashboard.
  2. Click Create Key and select the proxy scope.
  3. Copy the key — you won’t be able to see it again.
Use your Avaliar key only in server-side code. Never expose it in a browser or client app.
2

Point your requests at the proxy

Replace your provider’s endpoint with the matching Avaliar Proxy URL and add your api_key to the request body. Your existing provider key (OpenAI, Anthropic, …) stays in the body exactly where it was.
ProviderProxy Endpoint
OpenAIPOST https://proxy.avaliar.ai/api/openai_service/chat_completion
AnthropicPOST https://proxy.avaliar.ai/api/anthropic_service/chat_completion
Google GeminiPOST https://proxy.avaliar.ai/api/gemini_service/chat_completion
import requests

response = requests.post(
    "https://proxy.avaliar.ai/api/openai_service/chat_completion",
    json={
        "api_key": "your-avaliar-api-key",    # Avaliar key — new
        "openai_api_key": "your-openai-key",   # Your existing OpenAI key
        "model": "gpt-4o",
        "messages": [{"role": "user", "content": "Hello!"}],
    },
)
print(response.json())
Detection runs automatically on every proxy request — there’s nothing extra to enable. See Proxy Setup for all parameters, confidential requests, and error handling.
3

View in the dashboard

Open app.avaliar.ai/traces to see your traces, detected issues, latency, and cost in real time — a trace appears within a few seconds of the call.

Next Steps

Proxy Integration

Full proxy reference — supported models, confidential mode, and the request pipeline.

@traceable Decorator

All decorator options: span types, custom metadata, and nested traces.

Detection

Configure detectors, choose local vs cloud mode, and set severity thresholds.