Skip to main content

What are Projects?

Projects in Oximy Gateway are API endpoints or services that use specific policies for content protection. Each project has its own policy assignment, enforcement level, and API key access controls.

Project Configuration

Each project includes:
  • Policy assignment: Choose from available policies or inherit from global/environment policies
  • Enforcement level:
    • BLOCK: Prevent requests with violations
    • WARN: Allow requests but log violations
  • API key access: Assign specific API keys to control access
  • Environment settings: Configure per environment (production/staging/development)

Example Project

{
  "name": "Customer Portal API",
  "slug": "customer-portal-api",
  "policy": "customer-data-protection",
  "enforcementLevel": "BLOCK",
  "description": "Customer-facing API with strict data protection",
  "environment": "production",
  "apiKeys": ["oxi-live-customer-portal-key"]
}

Using Projects

Include the project ID in your API requests using the x-oximy-project-id header:

Node.js

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

Python

client = OpenAI(
    base_url="https://gateway.oximy.com/v1",
    api_key="your-openai-api-key",
    default_headers={
        "x-oximy-api-key": "oxi-live-YOUR_API_KEY",
        "x-oximy-project-id": "customer-portal-api"
    }
)

Best Practices

  • Organize logically: Group related APIs into projects
  • Clear naming: Use descriptive names and slugs
  • Environment separation: Separate production and development projects
  • Minimal access: Grant only necessary API key permissions
  • Monitor usage: Track API calls and policy violations per project