Required Headers
These headers must be included with every request to Oximy Gateway:| Header | Description | Example |
|---|---|---|
x-oximy-api-key | Your Oximy Gateway API key | oxi-live-xxxxxxxxxxxxxxxxxxxxxxxxx |
x-oximy-project-id | Your project identifier | my-project-slug |
Authorization | Your AI provider API key | Bearer sk-your-openai-key |
Example Configuration
Optional Headers
These headers provide additional control over Gateway behavior:| Header | Description | Values | Default |
|---|---|---|---|
x-oximy-provider | Specify AI provider | openai, anthropic, google, etc. | openai |
x-oximy-disable | Disable guardrails | true, false | false |
x-oximy-cache | Bypass guardrails cache | true, false | false |
Provider Selection
Usex-oximy-provider to explicitly specify which AI provider to use:
Disabling Guardrails
For testing or when guardrails aren’t needed:Response Headers
Oximy Gateway adds these headers to every response:| Header | Description | Example |
|---|---|---|
x-oximy-guardrails-status | Processing status | success, failed, bypassed |
x-oximy-violations | Total violations detected | 2 |
x-oximy-request-violations | Request violations count | 1 |
x-oximy-response-violations | Response violations count | 1 |
x-oximy-cache-hit | Configuration cache status | true, false |
x-oximy-cache-timestamp | Cache timestamp | 2025-01-27T10:30:00.000Z |
Checking Response Headers
Supported AI Providers
Gateway supports 20+ AI providers. Here are the most common ones:| Provider | Header Value | Example Model |
|---|---|---|
| OpenAI | openai | gpt-4o |
| Anthropic | anthropic | claude-3-5-sonnet-20241022 |
google | gemini-1.5-pro | |
| Azure OpenAI | azure-openai | gpt-4o |
| Together AI | together | meta-llama/Llama-2-70b-chat-hf |
| Cohere | cohere | command |
| Perplexity | perplexity | llama-3-sonar-small-128k-online |
| Groq | groq | llama3-70b-8192 |
Error Handling
When headers are missing or invalid, Gateway returns clear error messages:| Error | Description | Solution |
|---|---|---|
missing_api_key | No x-oximy-api-key header | Add required header |
missing_project_id | No x-oximy-project-id header | Add project identifier |
invalid_api_key | Invalid API key format | Check key format |
gateway_unreachable | Cannot connect to AI provider | Check network connectivity |
Example Error Response
Best Practices
1. Environment Variables
Store your credentials securely:2. Provider Fallback
Implement fallback logic for reliability:FAQ
How do I get an API key?
- Visit the Oximy Dashboard
- Sign up or log in to your account
- Navigate to “API Keys” section
- Click “Create New Key”
- Copy your
x-oximy-api-keyandx-oximy-project-id
What are the rate limits?
Oximy Gateway inherits rate limits from your AI provider:- OpenAI: Based on your OpenAI plan (free tier: 3 requests/minute, paid: varies by model)
- Anthropic: Based on your Anthropic plan (free tier: 5 requests/minute, paid: varies by model)
- Google: Based on your Google AI Studio quota
Can I use multiple providers simultaneously?
Yes. You can switch providers per request using thex-oximy-provider header, or implement fallback logic to try multiple providers in sequence.
How do I disable guardrails for testing?
Set thex-oximy-disable header to true:
What happens if guardrails fail?
Gateway uses a “fail-open” approach. If guardrails processing fails, the request continues without protection. Check thex-oximy-guardrails-status header to monitor guardrails health.