Skip to main content

What is Oximy Gateway?

Oximy Gateway is a secure proxy that sits on top of any OpenAI-compatible SDK. It provides intelligent guardrails and unified access to 20+ AI providers while keeping your existing code unchanged. It’s a drop-in replacement — just change your base URL and add a few headers.

How Gateway Works

Gateway sits between your application and AI providers, applying security policies to protect sensitive data:
  1. Request arrives with project identifier
  2. Project loads its assigned policy
  3. Policy applies configured guardrails
  4. Guardrails detect and sanitize sensitive content
  5. Clean request is sent to AI provider
  6. Response is logged for audit and monitoring

Learn the Fundamentals

Step 1: Get Your API Key

Visit the Oximy Dashboard to get your API credentials:
  • x-oximy-api-key: Your Oximy Gateway API key
  • x-oximy-project-id: Your project identifier

Step 2: Install OpenAI SDK

npm install openai

Step 3: Configure Your Client

Change your base URL to https://gateway.oximy.com/v1 and add the required headers:
import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: 'https://gateway.oximy.com/v1',
  apiKey: 'your-openai-api-key', // Your actual OpenAI key
  defaultHeaders: {
    'x-oximy-api-key': 'oxi-live-YOUR_API_KEY',
    'x-oximy-project-id': 'your-project-slug'
  }
});

Step 4: Make Your First Request

Use exactly like the OpenAI SDK:
const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }]
});

console.log(response.choices[0].message.content);

Step 5: Verify Guardrails Are Working

Check the response headers to see guardrails in action:
console.log('Guardrails status:', response.headers['x-oximy-guardrails-status']);
console.log('Violations detected:', response.headers['x-oximy-violations']);

That’s It!

You’re now using Oximy Gateway with intelligent guardrails protecting your requests. Your code works exactly the same as before, but now with:
  • Automatic protection against security threats
  • Unified access to 20+ AI providers
  • Complete request logging for audit and compliance
  • Real-time monitoring via response headers
Need validation without the proxy? Gateway also offers the /v1/validate-text endpoint for standalone validation. See the Validate Text API for details.

Need Help?

Questions? Contact us at [email protected] or visit the Dashboard for more resources.