Documentation v1.0.0

Open AI Proxy

Drop-in OpenAI Integration

Secure Your AI with One Line

Trylon's OpenAI proxy lets you add enterprise-grade security and compliance to your existing AI applications without rewriting code. Just change the base URL, and you're protected.

5-Minute Setup
Full API Compatibility
Enterprise Security

Quick Integration

Start protecting your AI in minutes

Simply initialize the OpenAI client with your Trylon configuration:

from openai import OpenAI

client = OpenAI(
    api_key='<your OpenAI API key>',
    base_url='<your Trylon base URL>',
    default_headers={'X-TRYLON-API-KEY': '<your Trylon API key>'}
)

# Use the client exactly as before
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello world"}],
    user="user-123"  # Optional: Add user ID for better monitoring
)

Enterprise Features

Everything you need for production AI

100% API Compatible

Works with all OpenAI models, parameters, and features including streaming and function calling

Advanced Security

Real-time protection against prompt injection, PII exposure, and harmful content

Usage Monitoring

Track costs, usage patterns, and security incidents across your organization

Policy Controls

Define and enforce company-wide AI usage policies with granular controls

Common Use Cases

Ready-to-use integration examples

Streaming Responses

# Enable streaming for real-time responses
stream = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Write a story"}],
    stream=True,
    max_tokens=1000
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Ready to get started?

Protect your AI applications in minutes with our enterprise-grade security layer.